JPH0783268B2 - Hexadecimal converter - Google Patents
Hexadecimal converterInfo
- Publication number
- JPH0783268B2 JPH0783268B2 JP62242839A JP24283987A JPH0783268B2 JP H0783268 B2 JPH0783268 B2 JP H0783268B2 JP 62242839 A JP62242839 A JP 62242839A JP 24283987 A JP24283987 A JP 24283987A JP H0783268 B2 JPH0783268 B2 JP H0783268B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- input
- decimal
- hexadecimal
- adder
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000006243 chemical reaction Methods 0.000 claims description 21
- 238000000034 method Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 238000004904 shortening Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
Landscapes
- Analogue/Digital Conversion (AREA)
- Complex Calculations (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、10進データを16進データに変換する変換装置
(以下単に「16進変換装置」という。)に関するもので
ある。Description: TECHNICAL FIELD The present invention relates to a conversion device for converting decimal data into hexadecimal data (hereinafter, simply referred to as “hexadecimal conversion device”).
従来、10進データを16進データに変換する際には、10進
データにおける各桁のデータ(桁データ)に各桁に対応
した16進データを乗じ、その後に乗算後の各桁データを
加算する手法がとられていた。Conventionally, when converting decimal data to hexadecimal data, the data of each digit in the decimal data (digit data) is multiplied by the hexadecimal data corresponding to each digit, and then each digit data after multiplication is added. The method of doing was taken.
すなわち、例えば、(123)10が入力データの場合には
下記演算により10進/16進変換が行われていた。That is, for example, when (123) 10 is input data, decimal / hexadecimal conversion was performed by the following calculation.
1×(64)16+2×(A)16+3=(7B)16 なお、( )10はカッコ内の数字が10進数である事、
( )16の場合は16進数である事を示しており、以下適
宜この表記法を用いる。1 x (64) 16 + 2 x (A) 16 + 3 = (7B) 16 In addition, () 10 means that the number in parentheses is a decimal number,
() 16 indicates that it is a hexadecimal number, and this notation will be used as appropriate below.
〔発明が解決しようとする問題点〕 上記した従来技術に係る10進/16進変換手法において
は、順次供給される桁データが何の桁のものであるかを
16進変換装置が認識しなければ演算ができない。[Problems to be Solved by the Invention] In the decimal / hexadecimal conversion method according to the above-described conventional technique, it is necessary to determine what digit the digit data is sequentially supplied to.
If the hexadecimal converter does not recognize it, the operation cannot be performed.
すなわち、(123)10の場合には上記の例のとおりであ
るが、(12)10の場合には順次入力される最初の2桁の
桁データはそれぞれ1、2であり同一であるにも拘ら
ず、(123)10の1に対しては(64)16を(12)10の1
に対しては(A)16をそれぞれ乗じなければならない。
従って、桁データのみならず桁そのものに関するデータ
を別途必要とするのである。That is, in the case of (123) 10 , it is as in the above example, but in the case of (12) 10 , the first two digit data that are sequentially input are 1 and 2, respectively, which are the same. Regardless of (123) 10 of 1 (64) 16 of (12) 10 of 1
Must be multiplied by (A) 16 .
Therefore, not only the digit data but also the data relating to the digit itself is separately required.
そのため、従来技術に係る16進変換装置においてはシリ
アルデータとして供給された10進データを一旦シフトレ
ジスタ等よりなるバッファに保持し、各桁データに対応
した桁を正確に把握した後に演算を開始していた。従っ
て、10進データの入力時に10進/16進変換の演算を行う
事ができず、10進データの入力時間と10進/16進変換の
変換時間が縦列的に加え合される為に10進データ入力開
始から16進データを得るまでの総合的時間が短縮できな
いという欠点を有していた。Therefore, in the hexadecimal conversion device according to the related art, the decimal data supplied as serial data is temporarily held in a buffer such as a shift register and the calculation is started after the digit corresponding to each digit data is accurately grasped. Was there. Therefore, the decimal / hexadecimal conversion operation cannot be performed when decimal data is input, and the decimal data input time and decimal / hexadecimal conversion conversion time are added in cascade. It has a drawback that the total time from the start of inputting hexadecimal data to the acquisition of hexadecimal data cannot be shortened.
かかる欠点は、情報処理装置や通信装置における処理時
間の短縮化における大きな障害となっており、その解決
が切望されていた。Such a drawback is a major obstacle in shortening the processing time in the information processing device and the communication device, and its solution has been earnestly desired.
本発明は、10進/16進変換に要する総合的時間の短縮化
が可能な16進変換装置を提供する事を目的とするもので
あり、一方の入力端子に入力10進データが供給された2
入力加算部の出力データをレジスタ部に保持した後、演
算部にて10倍し2入力加算部の他入力にフィードバック
し、レジスタ部は初期状態においては0入力10進データ
の各桁データが順次入力されるごとに保持データを更新
する事によって入力10進データの桁データが最下位桁ま
で入力された時点で加算部またはレジスタ部の出力端子
に出力16進データが得られるように構成されている。An object of the present invention is to provide a hexadecimal conversion device capable of shortening the total time required for decimal / hexadecimal conversion, and input decimal data is supplied to one input terminal. Two
After the output data of the input adder is held in the register, it is multiplied by 10 in the calculator and fed back to the other input of the 2-input adder. In the initial state, each digit of 0 input decimal data is sequentially stored. It is configured so that the output hexadecimal data can be obtained at the output terminal of the adder or register when the digit data of the input decimal data is input to the least significant digit by updating the held data each time it is input. There is.
すなわち、本発明に係る16進変換装置においては各桁デ
ータの入力に同期して逐次10進/16進変換の演算処理が
行われるように構成されている。That is, in the hexadecimal conversion device according to the present invention, the arithmetic processing of the sequential decimal / hexadecimal conversion is performed in synchronization with the input of each digit data.
以下、本発明を実施例に基づき詳細に説明する。 Hereinafter, the present invention will be described in detail based on examples.
第1図に示すブロック図において、入力10進データは加
算部1の一方の入力端子1aに供給されている。加算部1
の出力端子1cはレジスタ部2の入力端子2aに接続されて
おり、レジスタ部2の出力端子2bは演算部3の入力端子
3aに接続されている。演算部3の出力端子は加算部1の
他方の入力端子に接続されフィードバックループを形成
している。レジスタ部2にはリセット信号が供給される
リセット端子Rとデータセット信号が供給されるセット
端子Sとが設けられており、リセット信号が入力される
とレジスタ部2はその内容を0とし(リセット)、デー
タセット信号が供給されると加算部1の出力データを保
持し出力する。なお、リセット信号は10進/16進変換開
始時の初期設定時に、データセット信号は入力10進デー
タの桁データが供給されるごとに逐次図示せぬ制御部よ
り送出される。演算部3は、入力端子3aに供給されたレ
ジスタ部2の出力データを10倍し、出力端子3bに出力
し、加算部1の入力端子1bに供給する。In the block diagram shown in FIG. 1, the input decimal data is supplied to one input terminal 1a of the adder 1. Adder 1
Is connected to the input terminal 2a of the register unit 2, and the output terminal 2b of the register unit 2 is the input terminal of the arithmetic unit 3.
Connected to 3a. The output terminal of the calculation unit 3 is connected to the other input terminal of the addition unit 1 to form a feedback loop. The register unit 2 is provided with a reset terminal R to which a reset signal is supplied and a set terminal S to which a data set signal is supplied. When the reset signal is input, the register unit 2 sets the content to 0 (reset ), When the data set signal is supplied, it holds and outputs the output data of the adder unit 1. It should be noted that the reset signal is sequentially sent from the control unit (not shown) at the time of initial setting at the start of decimal / hexadecimal conversion and every time the digit data of the input decimal data is supplied. The arithmetic unit 3 multiplies the output data of the register unit 2 supplied to the input terminal 3a by 10, outputs the result to the output terminal 3b, and supplies the output data to the input terminal 1b of the addition unit 1.
以下、かかる16進変換装置の動作を10進データ(123)
10が入力された場合を例示して説明する。The operation of the hexadecimal conversion device is described below as decimal data (123)
The case where 10 is input will be described as an example.
入力10進データの最初の桁データである(1)10が入力
端子1aに供給される。このときには、レジスタ部2には
リセット信号により0が保持されており、演算部の出力
端子3aから加算部1bに供給されるデータの値は0となっ
ているために、加算部1の出力端子1cには(1)16が出
力される。(1) 10, which is the first digit data of the input decimal data, is supplied to the input terminal 1a. At this time, 0 is held in the register unit 2 by the reset signal, and the value of the data supplied from the output terminal 3a of the arithmetic unit to the adder unit 1b is 0. Therefore, the output terminal of the adder unit 1 is (1) 16 is output to 1c.
次に、第2行目の(2)10が入力端子1aに供給される直
前(または同時)に、加算部1の出力データ(1)16は
レジスタ部2に保持され加算部1の入力端子1bには
(A)16が供給されている。従って、加算部1において
は、(2)10と(A)16の加算が行われ出力端子1cには
(C)16が得られる。Next, immediately before (or simultaneously) the second row (2) 10 is supplied to the input terminal 1a, the output data (1) 16 of the adder unit 1 is held in the register unit 2 and the input terminal of the adder unit 1 is held. (A) 16 is supplied to 1b. Therefore, in the adder 1, (2) 10 and (A) 16 are added, and (C) 16 is obtained at the output terminal 1c.
同様の処理により、第3桁目の(3)10が入力端子1aに
供給されると、演算部3から供給された(C)16の10倍
である出力データ(78)16との加算が行われ、加算部1
の出力端子1cには出力16進データ(7B)16が出力され
る。すなわち、入力10進データの入力時間中にも10進/1
6進変換処理が同時進行しており、入力時間終了直後
(または同時)に演算処理が終了する。このようにし
て、入力10進データ(123)10は、出力16進データ(7
B)16として加算部1の出力端子1cに得られる。なお、
データセット信号のタイミングによっては、加算部1の
出力データは既にレジスタ部2内に保持されているの
で、レジスタ部2の出力データから出力16進データ(7
B)16を得る事も可能である。By the same process, when the third digit (3) 10 is supplied to the input terminal 1a, addition with the output data (78) 16 which is 10 times the (C) 16 supplied from the arithmetic unit 3 is performed. Done, adder 1
Output hexadecimal data (7B) 16 is output to the output terminal 1c of. In other words, during the input time of input decimal data, decimal / 1
The hexadecimal conversion process is in progress at the same time, and the arithmetic process ends immediately after (or at the same time) the input time. Thus, the input decimal data (123) 10 becomes the output hexadecimal data (7
B) 16 is obtained at the output terminal 1c of the adder unit 1. In addition,
Depending on the timing of the data set signal, the output data of the adder unit 1 is already held in the register unit 2, so the output data of the register unit 2 is changed to the output hexadecimal data (7
B) It is possible to get 16 .
第2図は、本発明の実施例を示す回路図である。図にお
いて、第1図と同一符号は対応部分を表わしており、説
明は省略する。FIG. 2 is a circuit diagram showing an embodiment of the present invention. In the figure, the same reference numerals as those in FIG. 1 represent corresponding parts, and a description thereof will be omitted.
入力10進データは、BCD(Binary Coded Decimal)形式
にて加算部1の入力端子1aとしてのレジスタAに供給さ
れ、レジスタAの出力は、加算器Bの下位4ビットの入
力端子に供給されている。加算器B出力のうち下位8ビ
ット分は、レジスタ部2としてのレジスタCに供給され
ている。レジスタCの出力は、加算器Bおよび加算器D
に並列供給されており、加算器Bの入力の段階で各ビッ
トのウエイトが10倍されるように結線された10倍演算部
3を構成している。例えば、レジスタCの20(1)10ビ
ットについてみると、加算器Bの21(2)10ビットおよ
び加算器Dを通して、加算器Bの23(8)10ビットに結
線されており、最終的な加算出力は、10倍となっている
事が理解される。The input decimal data is supplied in the BCD (Binary Coded Decimal) format to the register A as the input terminal 1a of the adder 1, and the output of the register A is supplied to the lower 4 bit input terminal of the adder B. There is. The lower 8 bits of the output of the adder B are supplied to the register C as the register unit 2. The output of the register C is the adder B and the adder D.
Are connected in parallel to each other and are connected in such a manner that the weight of each bit is multiplied by 10 at the input stage of the adder B. For example, regarding the 2 0 (1) 10 bits of the register C, the 2 1 (2) 10 bits of the adder B and the 2 3 (8) 10 bits of the adder B are connected through the adder D, It is understood that the final addition output is 10 times.
第2図の実施例においては、0〜(2559)10までの10進
/16進変換が可能であるが、加算器B、レジスタC、加
算器Dのビット数を増加させる事により、より大きな数
の変換が可能となる。In the embodiment of FIG. 2, decimal numbers from 0 to (2559) 10
Although hexadecimal conversion is possible, by increasing the number of bits of the adder B, the register C, and the adder D, a larger number of conversions can be made.
なお、上記実施例においては、加算器の結線にて10倍演
算部を構成したが、ハード的またはソフト的なマルチプ
ライアを使用しても良い事は明白である。In addition, in the above embodiment, although the 10-fold arithmetic unit is configured by connecting the adders, it is obvious that a hardware or software multiplier may be used.
以上、詳細に説明したとおり、本発明によれば、10進デ
ータの各桁データ入力時に逐次演算処理を行う為に、入
力10進データの入力時間中にも10進/16進変換処理を同
時進行させる事が可能となり、総合的変換時間の短縮化
が可能となる。As described above in detail, according to the present invention, the decimal / hexadecimal conversion process is simultaneously performed during the input time of the input decimal data in order to perform the sequential calculation process when inputting each digit data of the decimal data. It is possible to proceed, and it is possible to shorten the total conversion time.
さらに、桁データの数にて入力10進データの桁数を判断
しているために、可変長の10進データを高速にて10進/1
6進変換する事が可能である。Furthermore, since the number of digits in the input decimal data is determined by the number of digit data, variable length decimal data can
Hexadecimal conversion is possible.
第1図は、本発明の実施例を示すブロック図、第2図は
本発明の実施例を示す回路図である。 1……加算部、2……レジスタ部、 3……演算部、A、C……レジスタ、 B、D加算器。FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a circuit diagram showing an embodiment of the present invention. 1 ... Adder, 2 ... Register, 3 ... Arithmetic, A, C ... Register, B, D adder.
フロントページの続き (56)参考文献 特開 昭57−61333(JP,A) 特開 昭60−169229(JP,A) 特開 昭62−200917(JP,A) 特開 昭58−181142(JP,A) 特開 昭50−137667(JP,A) 特開 昭52−114235(JP,A) 特開 昭56−63648(JP,A) 特開 平1−86625(JP,A)Continuation of front page (56) Reference JP-A-57-61333 (JP, A) JP-A-60-169229 (JP, A) JP-A-62-200917 (JP, A) JP-A-58-181142 (JP , A) JP 50-137667 (JP, A) JP 52-114235 (JP, A) JP 56-63648 (JP, A) JP 1-86625 (JP, A)
Claims (1)
算部の出力データを保持し出力するレジスタ部と、この
レジスタ部の出力データの値を10倍し出力する演算部と
を有し、前記加算部の一方の入力端子には16進変換され
る入力10進データ、他方の入力端子には前記演算部の出
力データが供給されており、前記レジスタ部は初期状態
において0となっており、前記入力10進データの桁デー
タが最上位桁から順次入力されるごとに前記加算部の出
力データを保持し出力することにより、前記入力10進デ
ータの桁データが最下位桁まで入力された時点で前記加
算部またはレジスタ部の出力端子に変換された出力16進
データが得られることを特徴とする16進変換装置。1. An addition section having two input terminals, a register section for holding and outputting output data of the addition section, and an arithmetic section for multiplying the output data value of the register section by 10 and outputting the value. , Input decimal data to be converted into hexadecimal is supplied to one input terminal of the adding section, and output data of the arithmetic section is supplied to the other input terminal, and the register section becomes 0 in the initial state. The digit data of the input decimal data is input to the least significant digit by holding and outputting the output data of the adder every time the digit data of the input decimal data is sequentially input from the most significant digit. A hexadecimal conversion device, wherein output hexadecimal data converted to the output terminal of the adder or the register is obtained at the point of time.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62242839A JPH0783268B2 (en) | 1987-09-29 | 1987-09-29 | Hexadecimal converter |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62242839A JPH0783268B2 (en) | 1987-09-29 | 1987-09-29 | Hexadecimal converter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6486624A JPS6486624A (en) | 1989-03-31 |
| JPH0783268B2 true JPH0783268B2 (en) | 1995-09-06 |
Family
ID=17095060
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62242839A Expired - Lifetime JPH0783268B2 (en) | 1987-09-29 | 1987-09-29 | Hexadecimal converter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0783268B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS58181142A (en) * | 1982-04-15 | 1983-10-22 | Toshiba Corp | M notation-n notation converting device |
-
1987
- 1987-09-29 JP JP62242839A patent/JPH0783268B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6486624A (en) | 1989-03-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4525796A (en) | Pipelined operation unit for vector data | |
| JPS6132437Y2 (en) | ||
| US4172288A (en) | Binary or BCD adder with precorrected result | |
| JP3276852B2 (en) | Code conversion circuit | |
| EP0281132B1 (en) | Vector calculation circuit capable of rapidly carrying out vector calculation of three input vectors | |
| JP3271120B2 (en) | Device for fast multiplication of binary numbers | |
| JPH0783268B2 (en) | Hexadecimal converter | |
| JPS58129653A (en) | Multiplication system | |
| JPH02205923A (en) | Arithmetic processor | |
| JP2991788B2 (en) | Decoder | |
| JP3123060B2 (en) | Digital arithmetic circuit | |
| JP3131969B2 (en) | Arithmetic unit | |
| JPS6259828B2 (en) | ||
| JP3460780B2 (en) | Numerical arithmetic unit | |
| JPH07191830A (en) | Arithmetic unit | |
| JPH0783269B2 (en) | Hexadecimal converter | |
| JPH0754913B2 (en) | Data conversion circuit | |
| JP2575856B2 (en) | Arithmetic circuit | |
| JPH01237831A (en) | Divider | |
| JP3412368B2 (en) | Bit serial squaring circuit | |
| JPH02239325A (en) | Division circuit | |
| JPH10312269A (en) | Multiply-accumulate unit | |
| JPH04263317A (en) | Arithmetic device | |
| JP2003140881A (en) | Serial-parallel conversion circuit, and parallel-serial conversion circuit | |
| JPH06268479A (en) | Digital filter |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080906 Year of fee payment: 13 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080906 Year of fee payment: 13 |