JPH02154530A - Conversion system to binary number - Google Patents
Conversion system to binary numberInfo
- Publication number
- JPH02154530A JPH02154530A JP30805988A JP30805988A JPH02154530A JP H02154530 A JPH02154530 A JP H02154530A JP 30805988 A JP30805988 A JP 30805988A JP 30805988 A JP30805988 A JP 30805988A JP H02154530 A JPH02154530 A JP H02154530A
- Authority
- JP
- Japan
- Prior art keywords
- binary
- digit
- decimal
- unit
- binary number
- 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.)
- Granted
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 20
- 238000000034 method Methods 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 abstract 1
- JEIPFZHSYJVQDO-UHFFFAOYSA-N ferric oxide Chemical compound O=[Fe]O[Fe]=O JEIPFZHSYJVQDO-UHFFFAOYSA-N 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 5
- 230000010365 information processing Effects 0.000 description 5
- 240000002853 Nelumbo nucifera Species 0.000 description 3
- 235000006508 Nelumbo nucifera Nutrition 0.000 description 3
- 235000006510 Nelumbo pentapetala Nutrition 0.000 description 3
- OVSKIKFHRZPJSS-UHFFFAOYSA-N 2,4-D Chemical compound OC(=O)COC1=CC=C(Cl)C=C1Cl OVSKIKFHRZPJSS-UHFFFAOYSA-N 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- OIQXFRANQVWXJF-LIQNAMIISA-N (1s,2z,4r)-2-benzylidene-4,7,7-trimethylbicyclo[2.2.1]heptan-3-one Chemical compound O=C([C@]1(C)CC[C@H]2C1(C)C)\C2=C/C1=CC=CC=C1 OIQXFRANQVWXJF-LIQNAMIISA-N 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
Landscapes
- Complex Calculations (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Analogue/Digital Conversion (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
この発明は情報処理装置における10進数を処理のため
2進数への変換方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for converting decimal numbers into binary numbers for processing in an information processing device.
第3図は従来の情報処理装置の要部のブロック図であり
、図において、1は演算ユニット(ALU) 、2は乗
算ユニット (MPY) 、3はレジスタファイルで、
4はX−ハス(X−Bus)、5はYハス(Y−Bus
)、6はZバス(ZBus)である。FIG. 3 is a block diagram of the main parts of a conventional information processing device. In the figure, 1 is an arithmetic unit (ALU), 2 is a multiplication unit (MPY), 3 is a register file,
4 is X-Bus, 5 is Y-Bus
), 6 is the Z bus (ZBus).
次にこの情報処理装置のファームウェアの動作について
説明する。今10桁の10進数を2進数に変換するもの
とすると32ビツトの2進数となる。Next, the operation of the firmware of this information processing device will be explained. If we now convert a 10-digit decimal number into a binary number, it will become a 32-bit binary number.
例えば、
4.294.967.296 (1,0進数)=111
・・・・・・11 (2進数)の変換を行うものとする
。For example, 4.294.967.296 (decimal number) = 111
・・・・・・11 (binary number) shall be converted.
4 294 967.296=4X109 +2X10
8+9X1×10i +4X106→9X105+6X
1×10i +7X103 +2X1×102i +
9X1×10i+6X10° (上位桁−下位桁)−6
X10°十gx1×10i +2X102+7X103
→−6Xl×10i →−9Xl05→−4Xl06+
9X107+2X10B→−4Xl09(下位桁−上位
桁)・・・・・・(1)であるので夫々の係数を4ビツ
トの2進で、又各桁数を必要なビットの2進数で表わし
、これらの積を各桁ごとに求め、2進数でのそれらの総
和を取って10進数を2進数に変換する。4 294 967.296=4X109 +2X10
8+9X1×10i +4X106→9X105+6X
1×10i +7X103 +2X1×102i +
9X1×10i+6X10° (upper digit - lower digit) -6
X10°10gx1x10i +2X102+7X103
→-6Xl×10i →-9Xl05→-4Xl06+
9X107 + 2X10B → -4Xl09 (lower digit - upper digit) (1) Therefore, each coefficient is expressed in 4-bit binary, and each digit is expressed in binary with the necessary bits, and these are Find the product for each digit, take their sum in binary numbers, and convert the decimal number to binary.
即ち、(1)式を0110 X 0001 + 100
1 X1010→−0010X ]、 100100+
・・・・・・・・・(2)と表わし
次に0110+1011010+
11001000+・・・ ・・・・・・(3)と
し、(3)式の和を取って2進数とする。That is, formula (1) is 0110 x 0001 + 100
1 X1010→-0010X], 100100+
......(2), then 0110+1011010+11001000+......(3), and the sum of equation (3) is taken to make a binary number.
← 4X109
11001000← 2X]0210
11010− 9xlO+”)
OI L O← 6×
10゜・・・1・・・・・・・・・000−4,29
4,976.296以上を一般式で表わすと、10桁の
10進数をaq ae a7ab as a4a3a2
a、aoS(但しS:符号)で表わすと、演算ユニット
1によりai→A、を取り出す。ここでi−0〜9でA
は4ビツト2進数である。← 4X109 11001000← 2X]0210
11010-9xlO+”)
OI L O← 6×
10°...1...000-4,29
If 4,976.296 or more is expressed in a general formula, the 10-digit decimal number is aq ae a7ab as a4a3a2
When expressed as a, aoS (where S: sign), the arithmetic unit 1 extracts ai→A. Here, A for i-0 to 9
is a 4-bit binary number.
次に、乗算ユニット2によりA1とB1を乗算する。B
、は10進の1×10i (i=o〜9)対応の2進
数である。この計算を各桁ごとに10回行い、各桁A、
x13.をレジスタユニット3に格納し、次に演算ユ
ニット1でΣA、 x13.を、即ちAoxBo (1
0進10°相等) +AI XB(10進1×10i
相等)+・・・・・・十A9×B9 (10進109対
応)を求める。Next, the multiplication unit 2 multiplies A1 and B1. B
, is a binary number corresponding to 1×10i (i=o to 9) in decimal. Perform this calculation 10 times for each digit, and each digit A,
x13. is stored in the register unit 3, and then the arithmetic unit 1 stores ΣA, x13. , that is, AoxBo (1
+AI XB (decimal 1×10i
Equivalent)+...10A9×B9 (corresponds to decimal 109).
その後、演算ユニット1により例外処理を行い、又2進
数変換時に、符号が負の場合は補数に変換する。Thereafter, the arithmetic unit 1 performs exception handling, and when converting the binary number, if the sign is negative, it is converted to a complement number.
従来のファームウェアでは10進数を2進数に変換する
のに処理時間が長くなるという問題があった。Conventional firmware has a problem in that it takes a long time to convert a decimal number to a binary number.
この発明は上記問題点を解決するためになされたもので
、10進数から2進数への変換を高速化するとともに、
2進データが32ビツトを超える10進パツクデータに
対しても容易に処理が可能な2進数への変換方式を提供
することを目的としている。This invention was made to solve the above problems, and it speeds up the conversion from decimal numbers to binary numbers, and
The object of the present invention is to provide a method for converting into binary numbers which can easily process even decimal pack data having more than 32 bits of binary data.
この発明においては、第2図に示すように、与えられた
n桁の10進数
an all−+ ・・・ai a+−+ −a+
ao 4ci桁数毎に演算ユニット1で10進数の(a
、、×10″+・”) 、 (・・−+a2.X 1
×102i ) 、 (a2i−+Xio・・・+
・・・+ai x 1×10i ) 、(a+−+
×10寡−1→−・・・+a+ XIO’ +a6
xlQ0)へと分割して、レジスタユニット3へ夫々
格納し、これらの1桁数毎の10進数を該レジスタユニ
・ノド3から順次取り出し、2進数変換ユニ・ノド8に
より夫々対応する1桁数毎の2進数
(An1+・・・・・・)、(・・・・・・A3=)
、(Asi−1+・・・・・・Azi) 、 (Az
i−1+Ai ) 、 (Ai−+ +・・・・・・
A1十A。)へ夫々順次一括変換し、該レジスタユニッ
ト3へ格納する。次に、予め該レジスタユニット3に記
憶しておいた各10進数・・・・・・、1×102i1
02i、1×10i対応の各2進数・・・・・・、 B
3t、 Bz、B、を夫々取り出し、各1桁数毎の2進
数と乗算ユニット2で順次乗算し、
・・・、(A4□−+ + Azi) X B:+;
、(A3t−1+・・・・・・A 2 、) X B
z r 、(A z i −1+・・・+A i +
l →−Ai ) Biを夫々求め、順次レジスタユ
ニット3へ格納し、これら全ての2進数及び最下位の1
桁数の2進数(Ai.、l +・・・・・A1 +A0
)を、該レジスタユニット3から取り出し、演算ユニッ
ト3でこれらの総和
・・・→−(A a+−+ x B 3r 4−・・・
→−A zi XB 3i) 十(A3i−+XBz□
+・・・十A2□X B 2i) →−(At−+
十・・・+A+ +Ao )を求めて、2進数を得
るようにした。In this invention, as shown in FIG. 2, a given n-digit decimal number an all-+ ...ai a+-+ -a+
ao Every 4ci digits, arithmetic unit 1 calculates the decimal number (a
,,×10″+・”) , (・・−+a2.X 1
×102i), (a2i-+Xio...+
・・・+ai x 1×10i) , (a+-+
×10-1→-...+a+ XIO' +a6
xlQ0), and store them in the register unit 3, respectively, and take out the decimal numbers for each one-digit number sequentially from the register unit node 3, and convert them into corresponding one-digit numbers by the binary number conversion unit node 8. Each binary number (An1+...), (...A3=)
, (Asi-1+...Azi) , (Az
i-1+Ai) , (Ai-+ +...
A10A. ) and stored in the register unit 3. Next, each decimal number stored in the register unit 3 in advance..., 1x102i1
02i, 1x10i compatible binary numbers...B
Take out 3t, Bz, and B, respectively, and multiply each one-digit binary number and multiplication unit 2 sequentially, ・・・, (A4□−+ + Azi) X B:+;
, (A3t-1+...A 2 ,) X B
z r , (A z i −1+...+A i +
l → -Ai) Bi are obtained and stored in the register unit 3 in sequence, and all these binary numbers and the lowest 1 are obtained.
Binary number of digits (Ai., l +...A1 +A0
) from the register unit 3, and the arithmetic unit 3 calculates their sum...→-(A a+-+ x B 3r 4-...
→-A zi XB 3i) 10 (A3i-+XBz□
+...10 A2□X B 2i) →-(At-+
10...+A+ +Ao) to obtain a binary number.
専用の1桁数の2進数変換ユニット8を設け、上位の1
桁数の(a2z−+X 102”−1+・・・+a、x
10′)の2進数への変換を行い、(A2□−1+・・
・Ai)を求める。この(A2、+・・・+A、)に1
×102i対応の2進数B1を乗算ユニット2で乗じて
いるとき、並行して2進数変換ユニット8で下位の1桁
数(a;−+ X 1×10i−’ +・−→−a+
1×10i +a。A dedicated 1-digit binary number conversion unit 8 is provided, and the upper 1
Number of digits (a2z-+X 102"-1+...+a, x
10') into binary number, (A2□-1+...
・Find Ai). 1 for this (A2, +...+A,)
When the binary number B1 corresponding to ×102i is multiplied by the multiplication unit 2, the lower one digit number (a;-+ X 1×10i-' +・-→-a+
1×10i +a.
100)の2進数への変換等を行うようにする。100) into a binary number.
かして並列処理をn74回行うため大きな桁数nの10
進数を2進数に変換するような場合高速となり、短時間
内に処理が可能となる。10 with a large number of digits n to perform parallel processing n74 times.
When converting a base number to a binary number, it is fast and can be processed within a short time.
以下、この発明を図面を参照して説明する。 Hereinafter, the present invention will be explained with reference to the drawings.
第1図は本発明が実行される情報処理装置の要部のブロ
ック図であり、図において、1は演算ユニット (AL
U) 、2は乗算ユニット (MPY)、3はレジスフ
ファイルで、4はXハス(X2進数変換ユニット8は1
0進数の5桁毎に10進数を2進数に変換する機能型の
集積回路(Format Convet LSI)
である。FIG. 1 is a block diagram of the main parts of an information processing device in which the present invention is executed, and in the figure, 1 is an arithmetic unit (AL
U), 2 is the multiplication unit (MPY), 3 is the register file, 4 is the X hash (X binary conversion unit 8 is 1
A functional integrated circuit (Format Convet LSI) that converts a decimal number into a binary number every five digits of a decimal number.
It is.
演算ユニット11乗算ユニット2及び2進数変換ユニッ
ト8の各入力端はXバス4.及びXバス5に接続され、
これらの出力側はXハス6に接続さている。演算ユニッ
ト12乗算ユニット2及び2進数変換ユニット8の各演
算結果はXハス6を介してレジスタユニット3に与えら
れ、そこで格納される。レジスタユニット3の出力側は
Xバス4、Xバス5に接続され、演算ユニット11乗算
ユニット2及び2進数変換ユニット8は必要なデータを
レジスタユニット3から入力される。Each input terminal of the arithmetic unit 11, the multiplication unit 2, and the binary number conversion unit 8 is connected to the X bus 4. and connected to X bus 5,
These output sides are connected to the X lotus 6. The calculation results of the calculation unit 12, the multiplication unit 2 and the binary conversion unit 8 are given to the register unit 3 via the X lotus 6 and stored there. The output side of the register unit 3 is connected to the X bus 4 and the X bus 5, and the arithmetic unit 11, multiplication unit 2, and binary conversion unit 8 receive necessary data from the register unit 3.
次に本装置におけるファームウェアの動作について第2
図に従って説明する。Next, we will discuss the operation of the firmware in this device in the second section.
This will be explained according to the diagram.
今10桁の10進数
a9as a7a6as a、a3a2a、ao S(
但しS:符号)を32ビツトの2進数に変換するものと
する。Now 10 digit decimal number a9as a7a6as a, a3a2a, ao S(
However, S: code) is converted into a 32-bit binary number.
ステップS1では、レジスタユニット3から10進数の
上位5桁のデータa9ae a7ah asを取り出し
、2進数変換ユニット8にて一括して2進数変換を行う
。即ち
Aq XB4 +As XB3 +A7 XB2 +A
b ×B、+A5XBoを得る。ここでAi(i=5〜
9)はa r (+ = 5〜9 )の対応2進数で
、B8(i−0〜4)は10″ (j−0〜4)の対応
2進数である。ステップS2ではこの
Ag X B4 +AB X B3 +・・・+A s
x B oをレジスタユニット3のワークレジスタ(
WRIO)へ格納する。In step S1, data a9ae a7ah as of the upper five digits of the decimal number are taken out from the register unit 3 and are collectively converted into binary numbers by the binary number conversion unit 8. That is, Aq XB4 +As XB3 +A7 XB2 +A
Obtain b×B, +A5XBo. Here, Ai (i=5~
9) is the corresponding binary number of a r (+ = 5 to 9), and B8 (i-0 to 4) is the corresponding binary number of 10'' (j-0 to 4). In step S2, this Ag +AB X B3 +...+A s
x B o to the work register of register unit 3 (
WRIO).
ここでは同時に、32ビット符号は2進数演算のオーバ
ーフローチエツクを実行する。オーバーフローチエツク
は2進数変換ユニット8内にて自動的にチエツクし、判
定信号を出力しており、オーバーフローがあればシーケ
ンザーに”ζコニシー処理へジャンプする。At the same time, the 32-bit code performs an overflow check for binary operations. The overflow check is automatically checked in the binary number conversion unit 8 and a judgment signal is output, and if there is an overflow, the sequencer jumps to the "ζconicy process".
ステップS3では、予めレジスタユニット3のワークレ
ジスタ(WRO)に10進数の10sに対応する2進数
のB、が記録されているので、レジスタユニット3のW
RIOからAq XB4 +AaXB+ +−As X
13oを、WROからBs (105対応)を夫々取
り出し、乗算ユニソ+2に入力し乗算
(A9XBJ +へ〇×B3→−・・・+A、×130
)XB。In step S3, since the binary number B corresponding to the decimal number 10s is recorded in the work register (WRO) of the register unit 3 in advance, the WRO of the register unit 3 is
From RIO Aq XB4 +AaXB+ +-As X
Take out 13o and Bs (corresponding to 105) from WRO, input them to the multiplication Uniso+2, and multiply them (to A9XBJ +〇×B3→-...+A,×130
)XB.
=Aq XB4 XB、、+A、x133xn、+・・
・・・・(−As X Bo X Bs
= Aq X B q + An X B 8+・・・
・・・+As Xl3Sを行う。これは10進数のaq
X 109+allx108+・・・・・・十a5×
105を2進数に変換したものである。このとき並列処
理として、2進数変換ユニット8では、レジスタユニソ
l〜3から、10進数の下位5桁のデータa4 A3
az aI a。=Aq XB4 XB,, +A, x133xn, +...
...(-As X Bo X Bs = Aq X B q + An X B 8+...
...+As Xl3S is performed. This is decimal aq
X 109+allx108+...10a5x
105 converted into a binary number. At this time, as parallel processing, the binary number conversion unit 8 converts the lower five digits of decimal number data a4 A3 from registers Unisol 1 to 3.
az aI a.
を取り出し、一括して2進数変換を行う。即ちA4 X
B4 +A3 XB3 +A2 XB2 +/’z X
Bl +AOx13oを得る。ここでAt(i=O〜
4)ばai (+=0〜4)の対応2進数で、BL(
i−0〜4)は1×10i (i=o〜4)の対応2
進数である。ここでは同時に、10進データ例外のチエ
ツクも進数変換ユニノ+8内にて自動的にチエツクし、
例外があればシーケンサにてエラー処理ヘジャンプする
。, and perform binary conversion all at once. That is A4
B4 +A3 XB3 +A2 XB2 +/'z X
Obtain Bl+AOx13o. Here, At(i=O~
4) In the corresponding binary numbers of baai (+=0 to 4), BL(
i-0~4) is 1×10i (i=o~4) correspondence 2
It is a base number. At the same time, the check for decimal data exceptions is automatically checked in the decimal conversion Unino+8.
If there is an exception, the sequencer jumps to error handling.
ステップS4では、この
As X Ba + A:+ X B3 +−−→−A
o x13oをレジスタユニットのワークレジスタWR
IOへ格納する。In step S4, this As X Ba + A: + X B3 +--→-A
o x13o as work register WR of register unit
Store in IO.
ステップS5では、ステップS3の前半の結果の上位5
桁AQXB9 →−A、XT3i+・・・・・・+A。In step S5, the top five results of the first half of step S3 are
Digit AQXB9 → -A, XT3i+...+A.
xBsをレジスタユニットのワークレジスタWR7へ格
納する。xBs is stored in the work register WR7 of the register unit.
ステップS6では、レジスタユニット3のワークレジス
タWR7からステップS、のA、XB。In step S6, A, XB of step S from work register WR7 of register unit 3.
+A8XB8+・・・・・・+AsxBsを、又ステッ
プ。+A8XB8+...+AsxBs, step again.
B4 のA4 xB、+A3 XB3 →−・・
・ ・・・ + A o X B 。B4 A4 xB, +A3 XB3 →-...
・ ... + A o X B.
をWRIOから夫々取り出し、演算ユニット1に入力し
て、これらを加算する。即ち、A、xI3゜+”””
+ A5 X B5 + A4 X Bs 4− ””
”Ao X Baを求め、上位5桁と下位5桁の和であ
る目的の2進数を得て、レジスタユニ・ノド3のワーク
レジスタWRIOへ格納する。これにより10桁10進
数が少ない実行回数で短時間で32ピッ+の2進数に変
換される。are respectively taken out from WRIO, input to the arithmetic unit 1, and added. That is, A, xI3゜+”””
+ A5 X B5 + A4 X Bs 4- ""
”Determine Ao It is converted into a binary number of 32 pi+ in a short time.
なお20桁10進数を64ビツト2進数に変換する場合
も、予めレジスタユニットのワークレジスタに、10進
数の1×102i、1×102iに夫々対応する2進数
BIO+ Bzoを記録しておくことにより、上述同
様に積を求めて、高速処理の10進数から2進数への変
換が可能となる。Also, when converting a 20-digit decimal number to a 64-bit binary number, by recording the binary numbers BIO+Bzo corresponding to the decimal numbers 1×102i and 1×102i in the work register of the register unit in advance, By calculating the product in the same manner as described above, it is possible to convert a decimal number into a binary number with high speed processing.
以」二説明してきたように、この発明によれば、与えら
れた1桁の10進数
an a、l−+ as at−1a、a、を1
桁数毎に演算ユニットで10進数の(afiXLo’
→−・・・・・・)、・・・・・・、 (・・・+a2
、X 1×102i) 、 (a2i−+X102“
−1+・・・+”+ ×1×10i ) 、(ai−1
x1×10i−’ +・・・”−aI x l O’
十a0×100)へと分割して、レジスタユニソ1〜へ
夫々格納し、これらの1桁数毎の10進数を該レジスタ
ユニットから順次取り出し、2進数変換ユニットにより
夫々対応する1桁数毎の2進数(An十・・・)、(・
・・A3h) 、 (A:+t−1+・・・A2i)
、 (A2□−1+・・・Aり(Ai−+ 十・・
・/’2iAo>へ夫々順次一括変換し、該レジスタユ
ニソI・へ格納する。次に、予め該レジスタユニットに
記憶しておいた各10進数・・・・・・1×102i、
1×102i、1×10i対応の各2進数・・・・・・
B3i、B2′、B”を夫々取り出し、各1桁数毎の2
進数と乗算ユニットで順次乗算し、・・・・・・、
(A a + −1+・・・A 3 t ) X B
x 8.(A 3□−1千・・・十A2正) XB21
. (A2i−1+・・・+A8゜+ +A、)X
B、を夫々求め、順次レジスタユニットへ格納し、これ
ら全ての2進数及び最下位の1桁数の2進数(Ai−+
+−Ai +Ao )を、該レジスタユニットから取
り出し、演算ユニットでこれらの総和
・・・・・・+ (A4++XBs;+・・・+A31
XB3.)+(A 3+−+ X B zr+・・・+
A 2i XB 2i )→−(Ai−+ 十・・・+
AI+AO)を求めて、2進数を得るようにしたので、
大きな桁数の10進数であっても短時間のうちに高速に
2進数へ変換することが可能となる。As explained above, according to the present invention, a given 1-digit decimal number an a, l-+ as at-1a, a, can be converted into 1
For each number of digits, the calculation unit calculates the decimal number (afiXLo'
→−・・・・・・),・・・・・・, (・・・+a2
, X 1×102i) , (a2i−+X102“
-1+...+”+ ×1×10i), (ai-1
x1×10i-'+..."-aI x l O'
The decimal numbers for each one digit are sequentially taken out from the register unit, and the binary number conversion unit converts them into 2 for each corresponding one digit. Base number (An ten...), (・
...A3h), (A:+t-1+...A2i)
, (A2□-1+...Ari(Ai-+ 10...
・/'2iAo>, respectively, and stored in the corresponding register Uniso I. Next, each decimal number stored in the register unit in advance...1×102i,
Binary numbers compatible with 1 x 102i and 1 x 10i...
Take out B3i, B2', and B'' respectively, and calculate 2 for each 1-digit number.
Multiply the base number and the multiplication unit sequentially, and...
(A a + -1+...A 3 t ) X B
x8. (A 3□-1,000...10 A2 correct) XB21
.. (A2i-1+...+A8゜+ +A,)X
B, are obtained and stored in the register unit sequentially, and all these binary numbers and the lowest one-digit binary number (Ai-+
+-Ai +Ao) is taken out from the register unit and summed up by the arithmetic unit...+ (A4++XBs;+...+A31
XB3. )+(A 3+-+ X B zr+...+
A 2i XB 2i )→-(Ai-+ 10...+
I calculated AI+AO) and got a binary number, so
Even a decimal number with a large number of digits can be quickly converted into a binary number in a short time.
第1図は本発明が実施される情報処理装置のブロック図
、第2図は本発明の詳細な説明するフローチャートで、
第3図は従来の装置のブロック図である。
1・・・・・・演算ユニット、2・・・・・・乗算ユニ
ット、3・・・・・・レジスタユニット、4,5.6・
・・・・・ハス、8・・・・・・2進数変換ユニット。
代理人 大君 増圧(ほか2名)
書(自発)
1.事件の表示
特願昭63−308059号
発明の名称
3、補正をする者
事件との関係 特許出願人
住 所 東京都千代田区丸の内二丁目2番3号名
称 (601)三菱電機株式会社代表者志岐守哉FIG. 1 is a block diagram of an information processing device in which the present invention is implemented, and FIG. 2 is a flowchart explaining the present invention in detail.
FIG. 3 is a block diagram of a conventional device. 1... Arithmetic unit, 2... Multiplication unit, 3... Register unit, 4, 5.6.
...Lotus, 8...Binary conversion unit. Representative: Daikun (2 others) Written (on his own initiative) 1. Display of the case Title of the invention in Patent Application No. 63-308059 3, Person making the amendment Relationship with the case Patent applicant Address 2-2-3 Marunouchi, Chiyoda-ku, Tokyo Name (601) Representative of Mitsubishi Electric Corporation Moriya Shiki
Claims (1)
・a_ia_0をi桁数毎に演算ユニットで10進数の
(a_n×10^n+・・・)、・・・、(・・・+a
_2_i×10^2^i)、(a_2_i_−_1×1
0^2^i^−^1+・・・+a_i×10^i)、(
a_i_−_1×10^i^−^1+・・・+a_1×
10^1+a_0×10^0)へと分割して、レジスタ
ユニットへ夫々格納し、これらのi桁数毎の10進数を
該レジスタユニットから順次取り出し、2進数変換ユニ
ットにより夫々対応するi桁数毎の2進数(A_n+・
・・)、(・・・A_3_i)、(A_3_i_−_1
+・・・A_2_i)、(A_2_i_−_1+A_i
)、(A_i_−_1+・・・A_1+A_0)へ夫々
順次一括変換し、該レジスタユニットへ格納する。次に
、予め該レジスタユニットに記憶しておいた各10進数
・・・・・・、10^3^i、10^2^i、10^i
対応の各2進数・・・・・・、B_3_i、B_2_i
、B_iを夫々取り出し、前記各i桁数毎の2進数と乗
算ユニットで順次乗算し、・・・・・・、(A_4_i
_−_1+・・・A_3_i)×B_3_i(A_3_
i_−_1+・・・+A_2_i)×B_2_i、(A
_2_i_−_1+・・・+A_i_+_1+A_i)
×B_iを夫々求め、順次レジスタユニットへ格納し、
これら全ての2進数及び最下位のi桁数の2進数(A_
i_−_1+・・・A_1+A_0)を、該レジスタユ
ニットから取り出し、演算ユニットでこれらの総和 ・・・・・・+(A_4_i_−_1×B_3_i+・
・・+A_3_i×B_3_i)+(A_3_i_−_
1×B_2_i+・・・+A_2_i×B_2_i)+
(A_i_−_1+・・・+A_1+A_0)を求めて
、2進数を得るようにした2進数への変換方式。[Claims] A given n-digit decimal number a_na_n_-_1...a_ia_i_-_1...
・A_ia_0 is converted into decimal number (a_n×10^n+...),...,(...+a
_2_i×10^2^i), (a_2_i_−_1×1
0^2^i^-^1+...+a_i×10^i), (
a_i_-_1×10^i^-^1+...+a_1×
10^1+a_0×10^0) and store them in register units, respectively, and take out these decimal numbers for each i-digit number sequentially from the register unit, and use the binary conversion unit to convert the decimal numbers for each i-digit number. The binary number (A_n+・
...), (...A_3_i), (A_3_i_-_1
+...A_2_i), (A_2_i_-_1+A_i
), (A_i_-_1+...A_1+A_0), respectively, and stored in the register unit. Next, each decimal number stored in the register unit in advance..., 10^3^i, 10^2^i, 10^i
Corresponding binary numbers..., B_3_i, B_2_i
, B_i are taken out and multiplied sequentially by the binary number of each i-digit number using a multiplication unit, . . . , (A_4_i
____1+...A_3_i)×B_3_i(A_3_
i_−_1+...+A_2_i)×B_2_i, (A
_2_i_−_1+...+A_i_+_1+A_i)
Find each ×B_i and store them in the register unit sequentially,
All these binary numbers and the lowest i-digit binary number (A_
i_-_1+...A_1+A_0) is taken out from the register unit, and the arithmetic unit calculates their sum...+(A_4_i_-_1×B_3_i+.
・・・+A_3_i×B_3_i)+(A_3_i_-_
1×B_2_i+...+A_2_i×B_2_i)+
A conversion method to binary numbers that obtains binary numbers by calculating (A_i_-_1+...+A_1+A_0).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63308059A JP2820701B2 (en) | 1988-12-06 | 1988-12-06 | Conversion method to binary |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63308059A JP2820701B2 (en) | 1988-12-06 | 1988-12-06 | Conversion method to binary |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH02154530A true JPH02154530A (en) | 1990-06-13 |
JP2820701B2 JP2820701B2 (en) | 1998-11-05 |
Family
ID=17976387
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63308059A Expired - Lifetime JP2820701B2 (en) | 1988-12-06 | 1988-12-06 | Conversion method to binary |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2820701B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6918076B2 (en) * | 2000-08-28 | 2005-07-12 | Verisity Ltd. | Method for providing bitwise constraints for test generation |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62200918A (en) * | 1986-02-28 | 1987-09-04 | Hioki Denki Kk | Bcd/binary conversion circuit |
-
1988
- 1988-12-06 JP JP63308059A patent/JP2820701B2/en not_active Expired - Lifetime
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS62200918A (en) * | 1986-02-28 | 1987-09-04 | Hioki Denki Kk | Bcd/binary conversion circuit |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6918076B2 (en) * | 2000-08-28 | 2005-07-12 | Verisity Ltd. | Method for providing bitwise constraints for test generation |
US7613973B2 (en) | 2000-08-28 | 2009-11-03 | Cadence Design (Israel) Ii Ltd. | Method for providing bitwise constraints for test generation |
Also Published As
Publication number | Publication date |
---|---|
JP2820701B2 (en) | 1998-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS60229140A (en) | Double precision multiplier | |
JPH0612229A (en) | Multiplication and accumulation circuit | |
JP3736741B2 (en) | Data processing unit | |
JPH0368416B2 (en) | ||
JPH04291418A (en) | Pre-processor for division circuit | |
JPH02154530A (en) | Conversion system to binary number | |
US4823300A (en) | Performing binary multiplication using minimal path algorithm | |
US4190894A (en) | High speed parallel multiplication apparatus with single-step summand reduction | |
JP2734438B2 (en) | Multiplier | |
JPS63118936A (en) | Arithmetic unit with double accuracy | |
JPS6259828B2 (en) | ||
JPH0784762A (en) | Multiplication circuit | |
SU1179322A1 (en) | Device for multiplying two numbers | |
SU860054A1 (en) | Converter of binary code to bcd-hexadecimal code | |
JPH086762A (en) | Multiplying circuit | |
JPS62147526A (en) | Multiplier | |
SU748409A1 (en) | Device for multiplying binary-decimal numbers | |
JPS61224036A (en) | Arithmetic unit | |
JP2002304288A (en) | Data processing device and program | |
JPS63310023A (en) | Fixed decimal point multiplier with sign | |
JPH10149277A (en) | Multiplication device | |
RU2248094C2 (en) | Device for transforming numbers from decimal to binary notation scale | |
JPS59197936A (en) | Digital signal processing system | |
JPH0375927A (en) | Square root arithmetic unit | |
JPH0833815B2 (en) | High digit multiplier |