Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0150930B2 - - Google Patents
[go: Go Back, main page]

JPH0150930B2 - - Google Patents

Info

Publication number
JPH0150930B2
JPH0150930B2 JP17962383A JP17962383A JPH0150930B2 JP H0150930 B2 JPH0150930 B2 JP H0150930B2 JP 17962383 A JP17962383 A JP 17962383A JP 17962383 A JP17962383 A JP 17962383A JP H0150930 B2 JPH0150930 B2 JP H0150930B2
Authority
JP
Japan
Prior art keywords
carry
output
leading
result
calculation
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
Application number
JP17962383A
Other languages
Japanese (ja)
Other versions
JPS6072021A (en
Inventor
Yoshihisa Soda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP17962383A priority Critical patent/JPS6072021A/en
Publication of JPS6072021A publication Critical patent/JPS6072021A/en
Publication of JPH0150930B2 publication Critical patent/JPH0150930B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Description

【発明の詳細な説明】 本発明は演算装置、とくに浮動小数点演算の仮
数部の演算を行なうための演算装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an arithmetic device, and particularly to an arithmetic device for performing arithmetic operations on the mantissa part of floating point arithmetic operations.

一般に、正規化された浮動小数点数はその正負
を表わす符号と、指数部と、正規化された絶対値
をもつ仮数部とより構成される。
Generally, a normalized floating-point number is composed of a sign indicating its sign, an exponent part, and a mantissa part having a normalized absolute value.

このような浮動小数点数の演算においては、あ
る浮動小数点数の絶対値から他の浮動小数点数の
絶対値の引き算を行ない結果を正規化する必要が
生ずる場合がしばしばある。
In such floating point number operations, it is often necessary to subtract the absolute value of one floating point number from the absolute value of another floating point number and normalize the result.

この場合には、まず指数部の大きい方の数の指
数に指数部の小さい方の数の指数が等しくなるま
で、指数部の小さい方の数の仮数部を右シフトし
てから、両者の仮数部の絶対値の間で指定された
順序の引き算を行なう。
In this case, first shift the mantissa of the number with the smaller exponent part to the right until the exponent of the number with the larger exponent part is equal to the exponent of the number with the smaller exponent part, and then shift the mantissa of the number with the smaller exponent part to the right. Performs subtraction in the specified order between the absolute values of the parts.

この引き算において、得られる結果の正負を決
定し、その絶対値を求め、かつ、この絶対値を正
規化する演算を行なう。
In this subtraction, the sign of the obtained result is determined, its absolute value is determined, and an operation is performed to normalize this absolute value.

この正規化を行なうためには、引き算の結果生
ずる絶対値を表わす数の最初の桁に“1”のビツ
トが現われるまで最上位の桁からの“0”(以後
これをリーデイング0という)の数を数える必要
がある。
To perform this normalization, the number of “0”s (hereinafter referred to as leading 0) from the most significant digit is counted until a “1” bit appears in the first digit of the number representing the absolute value resulting from the subtraction. need to be counted.

従来装置においては、後に詳述するように、上
述の絶対値の引き算が完了し結果の絶対値が一義
的に定まつてからリーデイング0の数を数える演
算を開始しており、このためにそれだけ演算時間
が長くなるという欠点がある。
In the conventional device, as will be explained in detail later, the operation of counting the number of leading 0s is started after the above-mentioned absolute value subtraction is completed and the absolute value of the result is uniquely determined. The disadvantage is that the calculation time is long.

本発明の目的は上述の従来の欠点を除去した演
算装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an arithmetic device which eliminates the above-mentioned conventional drawbacks.

本発明の装置は、絶対値演算を行ないその演算
結果を正規化する機能を有する演算装置におい
て、下位からのキヤリイ入力“1”の演算を行な
いこの演算結果に相当する値のリーデイング
“0”をカウントする回路と、下位からのキヤリ
イ入力“0”の演算を行ないこの演算結果に相当
する値の各桁毎の補数のリーデイング“0”をカ
ウントする回路と、この二つの回路のいずれかの
出力を前記演算結果により生ずるキヤリイに応答
して選択するようにした選択回路とを含む。
The device of the present invention is an arithmetic device having a function of performing absolute value calculation and normalizing the result of the calculation, and calculates a carry input "1" from the lower order and returns a leading "0" of the value corresponding to the result of this calculation. A circuit for counting, a circuit for calculating the carry input “0” from the lower order and counting the leading “0” of the complement of each digit of the value corresponding to the result of this calculation, and an output of either of these two circuits. and a selection circuit configured to select a carry in response to a carry generated by the calculation result.

次に、図面を参照して本発明を詳細に説明す
る。
Next, the present invention will be explained in detail with reference to the drawings.

第1図は本発明の一実施例を示すブロツク図で
ある。
FIG. 1 is a block diagram showing one embodiment of the present invention.

本実施例は、第1オペランド格納レジスタ1、
第2オペランド格納レジスタ2、キヤリー入力
“1”の演算器3、キヤリー入力“0”の演算器
4、反転器5、選択器6,10、演算結果格納レ
ジスタ7、リーデイング0カウント回路8,9お
よびカウント数保持レジスタ11を含む。
In this embodiment, the first operand storage register 1,
Second operand storage register 2, arithmetic unit 3 with carry input “1”, arithmetic unit 4 with carry input “0”, inverter 5, selectors 6, 10, operation result storage register 7, leading 0 count circuit 8, 9 and count number holding register 11.

さて、本実施例において絶対値で表わされた第
1オペランドから絶対値で表わされた第2オペラ
ンドを引く引き算は以下のようにして行なわれ
る。
Now, in this embodiment, subtraction of subtracting the second operand expressed in absolute value from the first operand expressed in absolute value is performed as follows.

今、第1オペランドをA、第2オペランドをB
とするとA0,B0である。
Now, set the first operand to A and the second operand to B.
Then, they are A0 and B0.

これから行なう演算は、A0,B0の条件
の下で引き算A―Bを行なつて、その結果の正負
の情報を得ることと、引き算結果の絶対値|A―
B|を得ることと、この|A―B|に現われるリ
ーデイング0の数を得ることである。
The calculation we will perform from now on is to perform subtraction A-B under the conditions of A0 and B0, obtain information on the positive and negative of the result, and the absolute value of the subtraction result |A-
The two tasks are to obtain B| and to obtain the number of leading 0s appearing in this |AB|.

第1オペランドAはそのまま第1オペランド格
納レジスタ1に格納される。一方、第2オペラン
ドBはその各桁の“1”,“0”を反転したもの、
すなわちBの補数としたものが第2オペランド
格納レジスタ2に格納される。
The first operand A is stored in the first operand storage register 1 as is. On the other hand, the second operand B is the inversion of “1” and “0” in each digit,
That is, the complement of B is stored in the second operand storage register 2.

こうしてレジスタ1およびレジスタ2に格納さ
れたAおよびは、それぞれ演算器3および演算
器4で加算される。
A and thus stored in register 1 and register 2 are added by arithmetic unit 3 and arithmetic unit 4, respectively.

但し、演算器3は最小桁へのキヤリーがある場
合(キヤリー入力“1”)のAとの加算、つま
りA++1の加算を行なう。
However, when there is a carry to the minimum digit (carry input "1"), the arithmetic unit 3 performs addition with A, that is, addition of A++1.

一方、演算器4の側は最小桁へのキヤリーがな
い場合(キヤリー入力“0”)のA+の加算、
つまり、通常のA+の加算を行ない、その加算
結果を反転器5により各桁の“1”,“0”を反転
してその補数(つまり(+)を作る。
On the other hand, on the side of the arithmetic unit 4, when there is no carry to the minimum digit (carry input "0"), addition of A+,
That is, ordinary addition of A+ is performed, and the inverter 5 inverts the "1" and "0" of each digit of the addition result to create its complement (that is, (+)).

こうして得られるA++1を与えるべき出力
3000および(+)を与えるべキ出力5000は、
一方においては選択器6のそれぞれの入力に導か
れ、他方においてはそれぞれ、A++1のリー
デイング0をカウントするリーデイング0カウン
ト回路8、および(+)のリーデイング0を
カウントするリーデイング0カウント回路9に導
かれ、こうしてカウントされたそれぞれのリーデ
イング0の数は、選択器10のそれぞれの入力に
導かれる。
The output that should give A++1 obtained in this way
The power output 5000 that gives 3000 and (+) is
On the one hand, they are led to the respective inputs of the selector 6, and on the other hand, to a leading 0 count circuit 8, which counts the leading 0 of A++1, and a leading 0 count circuit 9, which counts the leading 0 of (+), respectively. , the respective leading zero numbers thus counted are led to respective inputs of the selector 10.

さて、演算器4が前述の演算A+を行なつた
結果オーバーフローが起り最上位桁からキヤリー
が出ると、このキヤリー出力はライン4000を介し
て選択器6および10に導かれる。この結果、選
択器6はキヤリー出力4000にキヤリーが出力した
場合には、演算器3の出力3000のA++1を選
択し、またキヤリー出力4000にキヤリーが出力し
ない場合には反転器5からの出力5000の(+
B)を選択して、これらのうちの選択した方の出
力を演算結果格納レジスタ7に格納する。
Now, when arithmetic unit 4 performs the above-mentioned operation A+, an overflow occurs and a carry is output from the most significant digit, and this carry output is led to selectors 6 and 10 via line 4000. As a result, the selector 6 selects A++1 of the output 3000 of the arithmetic unit 3 when the carry is output to the carry output 4000, and selects the output 5000 from the inverter 5 when the carry is not output to the carry output 4000. of (+
B) is selected, and the output of the selected one of these is stored in the calculation result storage register 7.

一方、選択器10は同様にキヤリー出力4000に
キヤリーが出力した場合にはカウント回路8から
のA++1のリーデイング0をカウントした出
力を選択し、また、キヤリー出力4000にキヤリー
が出力しない場合にはカウント回路9からの(
+B)のリーデイング0をカウントした出力を選
択して、これらのうちの選択した方の出力をカウ
ント数保持レジスタ11に格納する。
On the other hand, the selector 10 similarly selects the output that counts the leading 0 of A++1 from the count circuit 8 when the carry output is output to the carry output 4000, and when the carry output is not output to the carry output 4000, the selector 10 selects the output that counts the leading 0 of A++1 from the count circuit 8. From circuit 9 (
+B) is selected, and the selected output is stored in the count holding register 11.

以上の処理により、キヤリー出力4000はA―B
の演算結果の正負の情報(キヤリー出力がある場
合には正、ない場合には0または負を表わす)を
出力し、レジスタ7の出力7000は引き算結果の絶
対値|A―B|を出力し、またレジスタ11の出
力1100は引き算結果の絶対値|A―B|のリーデ
イング0の数を出力する。こうしてA―Bの引き
算において以後の処理に必要な結果がすべて得ら
れたことになる。
With the above processing, the carry output 4000 is A-B
It outputs the positive/negative information of the operation result (if there is a carry output, it is positive, otherwise it is 0 or negative), and the output 7000 of register 7 outputs the absolute value of the subtraction result |A-B| , and the output 1100 of the register 11 outputs the number of leading zeros of the absolute value |AB| of the subtraction result. In this way, all the results necessary for the subsequent processing are obtained in the AB subtraction.

上述の処理により必要な結果が正しく得られる
理由は下記の通りである。
The reason why the above-described processing can correctly obtain the necessary results is as follows.

最初に、A>Bであると仮定する。 First, assume that A>B.

B0の場合、Bの補数とは演算器のすべて
の桁を“1”とした数(これを以後Fで表わすこ
とにする)からBを引いた数に等しい。
In the case of B0, the complement of B is equal to the number obtained by subtracting B from the number in which all digits of the arithmetic unit are "1" (hereinafter expressed as F).

すなわち、B0の場合には、 =F−B ……(1) である。従つて、 A+=A+F−B=F+(A−B) であるが、A−B>0であるため、Fに正の数を
加える結果となりA+は必らずオーバーフロー
しキヤリーを出すので、出力4000を結果が正(0
または負ではない)であることを示す情報として
用いることができる。
That is, in the case of B0, =F-B... (1). Therefore, A+=A+F-B=F+(A-B), but since A-B>0, a positive number is added to F, and A+ will always overflow and produce a carry, so the output 4000 if the result is positive (0
or non-negative).

次に、 A+=F+A−B =F+1−1+A−B これより、 A++1=F+1+A−B となるが、F+1は上位から出るキヤリーを表わ
すので A++1=A−B+上位からのキヤリー
……(2) となる。
Next, A+=F+A-B =F+1-1+A-B From this, A++1=F+1+A-B, but since F+1 represents the carry coming from the higher rank, A++1=A-B+the carry coming from the higher rank.
...(2) becomes.

すなわち、A>Bの場合にはA+つまり演算
器4の出力4000は必らずキヤリーを出し、この結
果選択器6により演算器3の出力3000のA++
1が選ばれ、これはA−B=|A―B|よりA−
Bの絶対値を正しく出力していることになる(演
算器3の上位からのキヤリーは無視されている)。
In other words, when A>B, A+, that is, the output 4000 of the arithmetic unit 4 will always be a carry, and as a result, the selector 6 will change the output 3000 of the arithmetic unit 3 to A++.
1 is selected, which means A-B=|A-B|
This means that the absolute value of B is correctly output (the carry from the upper part of the arithmetic unit 3 is ignored).

また、このときは、選択器10によりA++
1のリーデイング0をカウントするカウント回路
8側の出力8000が選択されるので、これも正しく
A−Bの絶対値のリーデイング0を出力すること
になる。
Also, at this time, the selector 10 selects A++.
Since the output 8000 on the side of the count circuit 8 which counts the leading 0 of 1 is selected, this also correctly outputs the leading 0 of the absolute value of A-B.

以上より、A>Bの場合にはすべてが正しい出
力であることが分る。
From the above, it can be seen that all outputs are correct when A>B.

次に、ABと仮定すると以下のようになる。 Next, assuming AB, the following will be obtained.

前と同様に、式(1)を用いて、 A+=A+F−B A+=F−(B−A) ……(3) となる。しかるに、(B−A)は上の仮定より0
または正の数であるためFから(B−A)を引い
てもキヤリーがでることはない。
As before, using equation (1), A+=A+F-B A+=F-(B-A)...(3). However, (B-A) is 0 according to the above assumption.
Or, since it is a positive number, subtracting (B-A) from F will not result in a carry.

従つてこの場合に演算器4のA+の演算の結
果は上位の桁からキヤリーを出さず、出力4000は
結果が0または負であることを示す情報を正しく
出力している。
Therefore, in this case, the result of the operation of A+ in the arithmetic unit 4 does not produce a carry from the upper digits, and the output 4000 correctly outputs information indicating that the result is 0 or negative.

次に式(1)のBのかわりに(B−A)を用いる
と、 (−)=F−(B−A) ……(4) これに式(3)の関系を用いると A+=(B−A) ∴(−)=B−A=|A―B| となる。前述のように、出力4000がキヤリーを出
さず、このため選択器6により出力5000の(+
B)が選ばれるが、これは上式で明らかなよう
に、A−Bの絶対値を正しく表わしている。
Next, if we use (B-A) instead of B in equation (1), (-)=F-(B-A)...(4) If we use the relationship in equation (3), we get A+= (B-A) ∴(-)=B-A=|A-B|. As mentioned above, the output 4000 does not output carry, and therefore the selector 6 selects the output 5000 (+
B) is selected, which correctly represents the absolute value of AB, as is clear from the above equation.

また、このときは選択器10により(+)
のリーデイング0をカウントするカウント回路9
側の出力が選択されるので、これも正しくA−B
の絶対値のリーデイング0を出力することにな
る。
Also, at this time, the selector 10 selects (+)
Count circuit 9 that counts the leading 0 of
Since the side output is selected, this is also correct A-B.
The absolute value of leading 0 will be output.

かくして、A>Bの場合にもABの場合にも
上述の処理は正しい結果を与えることが分る。
Thus, it can be seen that the above process gives correct results both in the case of A>B and in the case of AB.

さて、本実施例においては、A++1のリー
デイング0をカウントするカウント回路8と、
(A+B)のリーデイング0をカウントするカウ
ント回路9とを別々に設けた結果、A++1の
演算と(+)の演算とを並行して行なえるば
かりでなく、A++1の演算とA++1のリ
ーデイング0を数える演算とをオーバラツプして
行なうようにし、また(+)の演算と(+
B)のリーデイング0を数える演算とをオーバー
ラツプして行なうようにし、演算器4からキヤリ
ー4000を出力する時点においては、回路8による
リーデイング0の演算も回路9によるリーデイン
グ0の演算も充分進行していて、このキヤリー
4000が出る時点で、レジスタ7に|A―B|が得
られるばかりでなく、レジスタ11に|A―B|
のリーデイング0をカウントした結果の数をも殆
んど同時に得られるようにすることができる。
Now, in this embodiment, a count circuit 8 that counts leading 0 of A++1,
As a result of providing a separate count circuit 9 for counting the leading 0 of (A+B), it is not only possible to perform the operation of A++1 and the operation of (+) in parallel, but also to count the operation of A++1 and the leading 0 of A++1. The operations for (+) and (+) are performed in an overlapping manner.
The operation of counting the leading 0 in B) is performed in an overlapping manner, and at the time when the carry 4000 is output from the arithmetic unit 4, the calculation of the leading 0 by the circuit 8 and the calculation of the leading 0 by the circuit 9 have sufficiently progressed. Hey, this Cary
When 4000 comes out, not only will you get |A-B| in register 7, but you will also get |A-B| in register 11.
It is also possible to obtain the results of counting the leading zeros almost simultaneously.

本実施例のこのメリツトは、従来例と比較する
と特に明らかとなる。
This advantage of this embodiment becomes especially clear when compared with the conventional example.

第2図は、上述の実施例と同様な処理を行なう
従来例の演算装置を示したものである。
FIG. 2 shows a conventional arithmetic unit that performs the same processing as in the above-described embodiment.

第2図の参照数字1′の第1オペランド格納レジ
スタ1′から参照数字7′までは、前記実施例の対応
する参照数字の要素と同様な動作を行なう。
The first operand storage register 1' with reference numeral 1' to 7' in FIG. 2 perform the same operations as the elements with the corresponding reference numerals in the previous embodiment.

従つて、前述の説明で明らかなように、演算器
4′からキヤリー4000′が出る時点で演算結果格納
レジスタ7′には|A―B|の正しい演算結果が
出力される。
Therefore, as is clear from the above explanation, the correct operation result of |AB| is output to the operation result storage register 7' at the time when the carry 4000' is output from the arithmetic unit 4'.

こうして|A―B|の値が一義的に、決定した
あとでリーデイング0カウント回路12はこの|
A―B|のリーデイング0のカウントを開始し、
そのカウント結果をカウント数格納レジスタ1
1′に出力する。
In this way, after the value of |A−B| is uniquely determined, the leading 0 count circuit 12
Start counting the leading 0 of A-B|,
The count result is stored in count storage register 1.
Output to 1'.

この結果、従来例においては|A―B|の演算
が完全にすんでその正しい結果が一義的に与えら
れてから、はじめてそのリーデイング0のカウン
トが開始され、|A―B|の演算とリーデイング
0の演算とはオーバーラツプすることができず必
らず縦統された演算となる。
As a result, in the conventional example, the counting of the leading 0 is started only after the operation of |A-B| is completed and the correct result is uniquely given, and the operation of |A-B| It cannot overlap with the operation of , and it is necessarily a vertically controlled operation.

このため本発明の実施例の方がその演算時間が
短縮されることは明らかである。
Therefore, it is clear that the calculation time of the embodiment of the present invention is shorter.

実際に従来装置においては|A―B|の演算結
果が確定した後にリーデイング0のカウントを行
なつているために演算サイクルとリーデイング0
のカウントサイクルの2サイクル必要であるが、
本発明の実施例によると1サイクルでリーデイン
グ0のカウントまで行なうようにすることができ
る。
In fact, in the conventional device, the leading 0 is counted after the calculation result of |A-B| is determined, so the calculation cycle and the leading 0 are counted.
Two counting cycles are required, but
According to the embodiment of the present invention, it is possible to count up to leading 0 in one cycle.

次に、演算器とリーデイング0カウント回路と
の間でオーバーラツプする動作を行なうようにし
た一例を、キヤリー入力0の演算器側(第1図の
演算器4反転器5およびリーデイング0カウント
回路9を含む側)について例示する。
Next, we will explain an example of overlapping operations between the arithmetic unit and the leading 0 count circuit. The following is an example of the including side).

この例においては、演算すべきデータのビツト
幅を2等分して(例えば16ビツト幅の演算におい
ては上位桁側8ビツトと下位桁側8ビツトとに2
等分して)、下位桁側の演算と、上位桁側の演算
とを同時に平行して行なう。但し、上位桁側の演
算は、下位桁側からのキヤリーがある場合の演算
と下位桁側からのキヤリーがない場合の演算との
両方を、下位桁側からのキヤリーのいかんにかか
わらず前もつて平行して行なつておき、下位桁か
ら実際にキヤリーが出る時点で、実際のキヤリー
の有無により、その正しい方を選択して最終出力
とする。このような方位により演算時間を大いに
短縮することができる。
In this example, the bit width of the data to be calculated is divided into two (for example, in a 16-bit width calculation, the upper 8 bits and the lower 8 bits are divided into 2 parts).
(divided into equal parts), and the operation on the lower digit side and the operation on the upper digit side are performed simultaneously and in parallel. However, the calculation on the high-order digit side has both the calculation when there is a carry from the low-order digit side and the calculation when there is no carry from the low-order digit side, regardless of the carry from the low-order digit side. When a carry actually appears from the lower digit, the correct one is selected depending on the presence or absence of an actual carry and is used as the final output. Such an orientation can greatly reduce calculation time.

第3図は、このような動作をする演算器4と反
転器5とリーデイング0カウント回路9との構成
を示したもので、演算器41は下位桁側の演算
器、演算器42は下位桁側からのキヤリーがない
としたときの上位桁側の演算器、また演算器43
は下位桁側からのキヤリーがあるとしたときの上
位桁側の演算器、反転器51,52,および53
はそれぞれ演算器41,42,43の出力の補数
をとる反転器、リーデイング0カウント回路91
および92はそれぞれ、前もつて下位桁からのキ
ヤリーがないとして演算した場合、および前もつ
てキヤリーがあるとして演算した場合の演算結果
のリーデイング0を求める回路、また切替器4
4,45および93はそれぞれ、下位桁からのキ
ヤリー4100がある場合に、前もつてキヤリーがあ
るとして演算した方の側の各演算結果を選択して
出力し、キヤリー4100がない場合に前もつてキヤ
リーがないとして演算した方の側の各演算結果を
選択して出力する選択器である。
FIG. 3 shows the configuration of the arithmetic unit 4, inverter 5, and leading 0 count circuit 9 that operate as described above. The arithmetic unit on the upper digit side when there is no carry from the side, and the arithmetic unit 43
are the arithmetic units, inverters 51, 52, and 53 on the upper digit side when there is a carry from the lower digit side.
are an inverter and a leading 0 count circuit 91 that take the complements of the outputs of the arithmetic units 41, 42, and 43, respectively.
and 92 are circuits for calculating the leading 0 of the calculation result when the calculation is performed assuming that there is no carry from the lower digits in the front, and when the calculation is performed assuming that there is a carry in the front, respectively;
4, 45, and 93 respectively select and output the calculation results on the side calculated assuming that there is a carry before when there is a carry 4100 from the lower digit, and when there is no carry 4100, This is a selector that selects and outputs each calculation result on the side calculated assuming that there is no carry.

この第3図に示した部分の動作は、以上の説明
と第1図を参照することとにより容易に理解され
るであろう。
The operation of the portion shown in FIG. 3 will be easily understood by referring to the above explanation and FIG. 1.

なお、以上の例では、演算すべきデータの全ビ
ツト幅を2等分し、上位桁側については下位桁か
らのキヤリーがある場合とない場合とを前もつて
平行に演算するようにしたが、このかわりに、さ
らに分割数を多くして、最下位桁以外について
は、下位桁からのキヤリーがある場合とない場合
とについても前もつて平行して演算を行ない、最
下位桁側からのキヤリー出力によつて、それらの
結果の中から正しい組合せを選択するというよう
にすることもできる。
Note that in the above example, the total bit width of the data to be computed is divided into two equal parts, and the upper digits are computed in parallel with and without carry from the lower digits. , instead of this, the number of divisions is further increased, and for digits other than the least significant digit, calculations are performed in parallel with and without carry from the least significant digit, and It is also possible to select the correct combination from among these results by using the carry output.

以上のように本発明を用いると、絶対値演算を
行ないその演算結果を正規化する機能を有する演
算装置において絶対値の引き算に対する演算時間
を短縮できるという効果がある。
As described above, the present invention has the effect of shortening the calculation time for absolute value subtraction in an arithmetic device having the function of performing absolute value calculation and normalizing the result of the calculation.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示すブロツク図、
第2図は従来例を示すブロツク図および第3図は
前記実施例の一部を詳細に説明するためのブロツ
ク図である。 図において、1……第1オペランド格納レジス
タ、2……第2オペランド格納レジスタ、3……
キヤリー入力“1”の演算器、4……キヤリー入
力“0”の演算器、6,10……選択器、7……
演算結果格納レジスタ、8,9……リーデイング
0カウント回路、11……カウント数保持レジス
タ、41,42,43……演算器、51,52,
53……反転器、91,92……リーデイング0
カウント回路、44,45,93……選択器。
FIG. 1 is a block diagram showing one embodiment of the present invention;
FIG. 2 is a block diagram showing a conventional example, and FIG. 3 is a block diagram for explaining a part of the embodiment in detail. In the figure, 1...first operand storage register, 2...second operand storage register, 3...
Arithmetic unit with carry input "1", 4...Arithmetic unit with carry input "0", 6, 10...Selector, 7...
Operation result storage register, 8, 9... Leading 0 count circuit, 11... Count number holding register, 41, 42, 43... Arithmetic unit, 51, 52,
53...Inverter, 91,92...Leading 0
Count circuit, 44, 45, 93...selector.

Claims (1)

【特許請求の範囲】 1 絶対値演算を行ないその演算結果を正規化す
る機能を有する演算装置において、 下位からのキヤリイ入力“1”の演算を行ない
この演算結果に相当する値のリーデイング“0”
をカウントする回路と、 下位からのキヤリイ入力“0”の演算を行ない
この演算結果に相当する値の各桁毎の補数のリー
デング“0”をカウントする回路と、 この二つの回路のいずれかの出力を前記演算結
果により生ずるキヤリイに応答して選択するよう
にした選択回路とを含むことを特徴とする演算装
置。
[Scope of Claims] 1. In an arithmetic device having a function of performing absolute value calculation and normalizing the result of the calculation, a calculation is performed on a carry input “1” from a lower order, and a value corresponding to the result of this calculation is read “0”.
, a circuit that calculates the carry input “0” from the lower order and counts the leading “0” of the complement of each digit of the value corresponding to the result of this calculation, and one of these two circuits. An arithmetic device comprising: a selection circuit configured to select an output in response to a carry generated by the arithmetic result.
JP17962383A 1983-09-28 1983-09-28 Operating device Granted JPS6072021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17962383A JPS6072021A (en) 1983-09-28 1983-09-28 Operating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17962383A JPS6072021A (en) 1983-09-28 1983-09-28 Operating device

Publications (2)

Publication Number Publication Date
JPS6072021A JPS6072021A (en) 1985-04-24
JPH0150930B2 true JPH0150930B2 (en) 1989-11-01

Family

ID=16068998

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17962383A Granted JPS6072021A (en) 1983-09-28 1983-09-28 Operating device

Country Status (1)

Country Link
JP (1) JPS6072021A (en)

Also Published As

Publication number Publication date
JPS6072021A (en) 1985-04-24

Similar Documents

Publication Publication Date Title
EP0472139A2 (en) A floating-point processor
US4110831A (en) Method and means for tracking digit significance in arithmetic operations executed on decimal computers
JP2511527B2 (en) Floating point arithmetic unit
JPS608933A (en) Arithmetic processing unit
GB882751A (en) Error detection system
JPH0150930B2 (en)
JP3950920B2 (en) Multiply-accumulator and data processing device
JPH0352093B2 (en)
JPS59154542A (en) multiplication device
JPS5911444A (en) floating point arithmetic unit
JPS61224036A (en) Arithmetic unit
JPS63158626A (en) Arithmetic processing unit
JPH0216632A (en) Fixed point number/floating point number converting circuit
JPS61282928A (en) floating point arithmetic unit
JPS5960637A (en) Arithmetic device for floating decimal point
JP2993119B2 (en) Floating point arithmetic unit
JP3104569B2 (en) Division circuit
JPS6126135A (en) Conversion circuit of floating point data
JPH05165605A (en) Floating point multiplier and multiplying method
JPS60235239A (en) Floating point adding circuit
JP3522387B2 (en) Pipeline arithmetic unit
JPH0361224B2 (en)
JPH0413734B2 (en)
JPH07104777B2 (en) Floating point adder / subtractor
JPS6149234A (en) Multiplier circuit for floating point