JPS6175433A - Dividing device - Google Patents

Dividing device

Info

Publication number
JPS6175433A
JPS6175433A JP59195722A JP19572284A JPS6175433A JP S6175433 A JPS6175433 A JP S6175433A JP 59195722 A JP59195722 A JP 59195722A JP 19572284 A JP19572284 A JP 19572284A JP S6175433 A JPS6175433 A JP S6175433A
Authority
JP
Japan
Prior art keywords
output
register
partial remainder
adder
shifter
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
Application number
JP59195722A
Other languages
Japanese (ja)
Other versions
JPH0351006B2 (en
Inventor
Kenji Hirose
健二 廣瀬
Tadaaki Bando
忠秋 坂東
Hidekazu Matsumoto
松本 秀和
Shinichiro Yamaguchi
伸一郎 山口
Yoichi Hirayama
洋一 平山
Hiroaki Nakanishi
宏明 中西
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.)
Hitachi Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Engineering Co Ltd
Hitachi 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 Hitachi Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Engineering Co Ltd
Priority to JP59195722A priority Critical patent/JPS6175433A/en
Publication of JPS6175433A publication Critical patent/JPS6175433A/en
Publication of JPH0351006B2 publication Critical patent/JPH0351006B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F5/012Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising in floating-point computations

Landscapes

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

Abstract

PURPOSE:To perform normalization speedily regardless of whether an addition/ subtraction result is plus or minus by providing a shift number judging means which judges how many bits a partial residue is shifted for the normalization of a partial residue outputted from an adder. CONSTITUTION:A normalized divided A is set in a register 20 and a normalized divisor B is set in a register 30 in the 1st cycle of division. The output of the register 20 is normalized by being shifted to left by a shifter 40 according to the output 101 of a bit sequence detector 100. The output of the register 30 is outputted by a complement device 50 after being inverted or as it is according to the output signal of a register 70. In this case, 0 is set in the register 70, so the output is inverted and outputted. When the addition result of the adder 60 is plus, an output 62 in the complementary representation '2' is inputted to the bit sequence detector 100 to determine the number of times of shifting of the shifter 40, and when the addition result of the adder 60 is negative, an output 131 in absolute value representation is inputted to the bit sequence detector 100 to determine the number of times of shifting of the shifter 40. Thus, the normalization is speeded up.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は除算装置に係り、特に改良型SRT除算方式を
用いる場合に好適な除算装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a division device, and particularly to a division device suitable for using an improved SRT division method.

〔発明め背景〕[Background of the invention]

第7図(a)、(b)はIEEE標準の浮動小数点デー
タフォーマットであるが、このように、仮数部が絶対値
表現である浮動小数点での高速除算方式としては、“コ
ンピュータの高速演算方式”、堀越監訳、近代科学社、
昭和55年9月、pp230〜p p ’233に紹介
されている改良型SRT除算方式が知られている。第8
図は前記改良型SRT除算方式による除算処理櫨示すフ
ローチャートである。同図に於いて、まず、ステップS
1で正規化された小数である被除数及び除数を、それぞ
れA。
Figures 7(a) and (b) show the IEEE standard floating point data format. ”, supervised translation by Horikoshi, Kindai Kagakusha,
An improved SRT division method introduced in September 1980, pp. 230 to 233 is known. 8th
The figure is a flowchart showing division processing by the improved SRT division method. In the same figure, first, step S
Let A be the dividend and the divisor, which are decimal numbers normalized by 1.

Bとする0次に、ステップS2において、A−Bの減算
を行ない、最初の部分剰余Cを求める。ステップS4に
おいて、部分剰余Cが正か負かを判断し、正の場合には
ステップS5において、商デジットq1をパ1”とする
0次に、ステップS6において1部分剰余Cを正規化す
るため、部分剰余Cの先頭に存在する110 #の数α
だけ、部分剰余Cの先頭に存在する“0″に続くデータ
を左ヘシフトする。そして、部分剰余Cの先頭には必ず
# 1 pgが立つ様にして、この部分剰余Cを新たな
被除数Aとする6次に、ステップS7において、商デジ
ットq、以降のqll)l〜q+ + a−1にパ0”
を立て、ステップS8でili+αに置き換える0次に
、ステップS9でiが所定値nより大きいか否かを判定
し、NOの場合にはステップS2にもどり、再び部分剰
余Cを求める処理を繰り返す。
Next, in step S2, A-B is subtracted to obtain the first partial remainder C. In step S4, it is determined whether the partial remainder C is positive or negative, and if it is positive, in step S5, the quotient digit q1 is set to ``0'', and in step S6, the 1 partial remainder C is normalized. , the number α of 110 # existing at the beginning of the partial remainder C
Shifts the data following "0" at the beginning of partial remainder C to the left by 0. Then, make sure that # 1 pg stands at the beginning of the partial remainder C, and use this partial remainder C as the new dividend A.Next, in step S7, the quotient digit q and subsequent qll)l~q+ + Pa0 to a-1”
is set and replaced with ili+α in step S8. Next, in step S9, it is determined whether or not i is larger than a predetermined value n. If NO, the process returns to step S2 and the process of calculating the partial remainder C is repeated again.

ステップS4において1部分剰余Cが負と判断された場
合には、ステップS10において商デジットq、にII
 Ol#を立てる。次に、ステップSllにおいて、部
分剰余Cを正規化するため、部分剰余Cの先頭に存在す
る“0″の数αだけ、部分剰余Cの先頭に存在する′O
″に続くデータを左へシフトし、部分剰余Cの先頭には
必ずII I IIが立つ様にし、この正規化された部
分剰余Cを新たな被除数Aとする6次に、ステップSL
2において、商デジットCZl以降の’!+−+〜qt
* a−1に“1″を立て、さらにステップS13でi
+αをiに置き換える。
If the 1 partial remainder C is determined to be negative in step S4, the quotient digit q is set to II in step S10.
Stand up Ol#. Next, in step Sll, in order to normalize the partial remainder C, the number α of “0” existing at the beginning of the partial remainder C is equal to the number α of “0” existing at the beginning of the partial remainder C
Shift the data following `` to the left so that II I II always stands at the beginning of the partial remainder C, and use this normalized partial remainder C as the new dividend A6.Next, step SL
2, '!' after the quotient digit CZl. +-+~qt
* Set “1” to a-1, and then set i in step S13.
Replace +α with i.

そして、ステップ14において、iが設定数nより大き
いか否かを判断し、Noの場合にはステップS3に進む
。ステップS3では、前回の演算で引きすぎているので
、加算を行なう。
Then, in step 14, it is determined whether or not i is larger than the set number n, and if no, the process advances to step S3. In step S3, since too much was subtracted in the previous calculation, addition is performed.

以下同様に、加減算、正規化を繰返しながら商デジット
q、を求めて行き、商デジットが必要なデジット数に達
したか否かをステップ39,814で判断し、達したな
らば演算終了となる。
Similarly, the quotient digit q is obtained by repeating addition, subtraction, and normalization, and it is determined in step 39, 814 whether the quotient digit has reached the required number of digits, and if it has reached the required number, the calculation ends. .

以上述べた改良型SRT除算方式を用いれば。If the improved SRT division method described above is used.

通常の除算方式に比べ、平均して加減算の回数が1/3
に削減出来るとされている。
On average, the number of additions and subtractions is 1/3 compared to the normal division method.
It is said that it can be reduced to

しかし、現在のデジット計算機に於いては、減算は2の
補数との加算により行っているため、減減算の結果が負
となる場合には、その結果も2の補数表現となる。この
2の補数表現では第9図Ca)、(b)に示すように、
先頭の111 Itの数が符号付き絶対値表現に於ける
先頭の′0″の数と一致しない場合がある。その為、減
算結果を正規化するためには2の補数表現から符号付き
絶対値表現に変換しなければならず、正規化に時間がか
かるという問題があった。
However, in current digit calculators, subtraction is performed by addition with a two's complement number, so if the result of subtraction is negative, the result is also expressed as a two's complement number. In this two's complement representation, as shown in Figure 9 Ca) and (b),
The number of 111 It at the beginning may not match the number of '0' at the beginning in the signed absolute value representation.Therefore, in order to normalize the subtraction result, the signed absolute value from the two's complement representation is necessary. There was a problem in that it had to be converted into a representation, and normalization took time.

〔発明の目的〕[Purpose of the invention]

本発明は、上記した従来技術の問題点に鑑みなされたも
ので、改良型SRT除算方式を用いる場合、加減算の結
果の正負にかかわらず、正規化を1マシンサイクル内で
迅速に行なうことが可能な除算装置を提供することにあ
る。
The present invention was developed in view of the problems of the prior art described above, and when using the improved SRT division method, it is possible to quickly perform normalization within one machine cycle regardless of whether the result of addition or subtraction is positive or negative. The object of the present invention is to provide a division device that is easy to use.

〔発明の概要〕[Summary of the invention]

本発明の除算装置は、被除数又は部分剰余を格納する第
1のレジスタと、除数を格納する第2のレジスタと、第
1のレジスタから出力される部分剰余を正規化するため
、その内容をシフトするシフタと、部分剰余が正の場合
に限って第2のレジスタから出力される除数の補数をと
る補数器と、シフタの出力と補数器の出力を加算して部
分剰余を出力する加算器と、加算器から出力される部分
剰余を正規化するため、部分剰余を何ビットシフトさせ
るかを判断するシフト数判断手段と、シフト数判断手段
の判断結果と部分剰余の正負の符号から商を作成する商
作成手段を備えたものであって、上記加算器は、部分剰
余を1の補数表現とこの補数表現で出力する第1の手段
を備え、かつ上記シフト数判断手段は、加算結果が正の
場合には2の補数表現の部分剰余に基づいて何ビットシ
フトするか判断し、加算結果が負の場合には1の補数表
現の絶対値表現による部分剰余に基づいて何ビットシフ
トするかを判断する第2の手段を備えていることを特徴
としている。
The division device of the present invention has a first register that stores a dividend or a partial remainder, a second register that stores a divisor, and shifts the contents of the first register in order to normalize the partial remainder output from the first register. a complementer that takes the complement of the divisor output from the second register only when the partial remainder is positive; and an adder that adds the output of the shifter and the output of the complementer and outputs the partial remainder. , in order to normalize the partial remainder output from the adder, a shift number determining means for determining how many bits to shift the partial remainder; and a quotient is created from the determination result of the shift number determining means and the sign of the partial remainder. The adder includes first means for outputting the partial remainder in one's complement representation and the complement representation, and the shift number determining means determines whether the addition result is correct. In this case, it is determined how many bits to shift based on the partial remainder in two's complement representation, and if the addition result is negative, how many bits to shift is determined based on the partial remainder in absolute value representation in one's complement representation. The present invention is characterized in that it includes a second means for making a judgment.

即ち、減算の結果が負になる場合でも、第6図に示すよ
うに1の補数表現で演算を行えば、その結果を反転させ
るだけで絶対値表現の値を得ることができる6そこで、
1の補数表現と2の補数表現で行った演算結果が同時に
得られるようにして、演算の結果が正ならば2の補数表
現での演算結果を、負ならば1の補数表現での演算結果
の反転により得られる絶対値表現を用いることにより、
常に絶対値表現の演算結果を得ることができる。さらに
、この絶対値表現演算結果の先頭の論理値11011の
数をシフト数判断手段で計数し、正規化のためのシフト
数を求め、シフタで部分剰余をシフトすることにより、
部分剰余の正規化を1マシンサイクル内で行うことがで
きる。
In other words, even if the result of subtraction is negative, if the operation is performed in one's complement representation as shown in Figure 6, the value in absolute value representation can be obtained by simply inverting the result6.Therefore,
The result of the operation performed in 1's complement representation and 2's complement representation is obtained at the same time.If the result of the operation is positive, the result is obtained in 2's complement representation, and if it is negative, the result is obtained in 1's complement representation. By using the absolute value expression obtained by inverting ,
You can always obtain calculation results expressed in absolute value. Furthermore, by counting the number of logical values 11011 at the beginning of this absolute value expression calculation result with a shift number determining means, determining the number of shifts for normalization, and shifting the partial remainder with a shifter,
Partial remainder normalization can be performed within one machine cycle.

〔発明の実施例〕[Embodiments of the invention]

以下、添付の図面に示す実施例により、更に詳細に本発
明について説明する。
Hereinafter, the present invention will be explained in more detail with reference to embodiments shown in the accompanying drawings.

第1図は、本発明の一実施例を示す図である。FIG. 1 is a diagram showing an embodiment of the present invention.

図示する様に、この実施例に示す除算装置は、被除数(
又は、部分剰余)Aをセットするレジスタ20と、除数
Bをセットするレジスタ30と5部分剰余を正規化する
ために一度に左へ複数ビットシフトできるシフタ40と
、部分剰余より除数Bを減算するために除数の補数をと
る補数器5oと、シフタ40の出力41と補数器50の
出力51との加算を行い、最下位ビットへの桁上がりが
ない場合の加算(1の補数表現)61と桁上がりがある
場合の加算(2の補数表現)62とを同時に得ることが
できる加算器60と、加算器60からの出力61をラッ
チするレジスタ90と、同じく加算器60からの出力6
2をラッチするレジスタ80と、加算結果の符号をラッ
チするレジスタ70と、レジスタ90の出力91の各ビ
ットを反転させるためのインバータ130と、セレクタ
110と、部分剰余の先頭の140”ビット列の長さを
カウントするビット列検出器100と、除算結果である
商を作成する商作成部120を主な構成要素としている
As shown in the figure, the division device shown in this example has a dividend (
Or, partial remainder) A register 20 for setting A, a register 30 for setting divisor B, a shifter 40 that can shift multiple bits to the left at once to normalize the partial remainder, and subtracting divisor B from the partial remainder. Therefore, the complementer 5o takes the complement of the divisor, and the output 41 of the shifter 40 and the output 51 of the complementer 50 are added, and the addition (one's complement representation) 61 when there is no carry to the least significant bit is performed. An adder 60 that can simultaneously obtain addition (two's complement representation) 62 when there is a carry, a register 90 that latches the output 61 from the adder 60, and an output 6 from the adder 60 as well.
2, a register 70 that latches the sign of the addition result, an inverter 130 that inverts each bit of the output 91 of the register 90, a selector 110, and the length of the first 140" bit string of the partial remainder. The main components are a bit string detector 100 that counts the number of bits, and a quotient generator 120 that creates a quotient that is the result of division.

次に、第1図に示す実施例の動作を第2図に示すフロー
チャートに従って説明する。除算の最初のマシンサイク
ルでは、ステップ5200において、正規化された被除
数Aがレジスタ20にセットされ、正規化された除数B
がレジスタ30にセットされる。このとき、加算結果の
符号をラッチするレジスタ70には正を表わす論理値″
0”をセットし、更に出力101が全て論理値“0″と
なる様にビット列検出器100をセットしておく1次に
、ステップ5210において、レジスタ20の出力がシ
フタ40でビット列検出器100の出力101に従って
左ヘシフトされ、正規化される。
Next, the operation of the embodiment shown in FIG. 1 will be explained according to the flowchart shown in FIG. In the first machine cycle of division, in step 5200, the normalized dividend A is set in register 20 and the normalized divisor B
is set in register 30. At this time, the register 70 that latches the sign of the addition result has a logical value "
0" and further set the bit string detector 100 so that all outputs 101 have the logical value "0". Next, in step 5210, the output of the register 20 is transferred to the bit string detector 100 by the shifter 40. It is shifted to the left and normalized according to the output 101.

しかし、この場合には、出力101が全て論理値″0”
となっているため、シフトされずに、そのまま出力され
る。この正規化の処理と同時に、ステップ5210にお
いて、レジスタ30の出力が、補数器50でレジスタ7
0からの出力信号71に従い、反転(出カフ1がII 
Ol#の場合)されて又はそのまま出力(出カフ1がI
I 171の場合)される。
However, in this case, the output 101 is all logical value "0"
Therefore, it is output as is without being shifted. Simultaneously with this normalization process, in step 5210, the output of register 30 is input to register 7 by complementer 50.
According to the output signal 71 from 0, it is inverted (output cuff 1 is
Ol#) or output as is (if output cuff 1 is I
In the case of I 171).

この場合には、レジスタ70には“01″がセットされ
ているため、反転されて出力される。
In this case, since "01" is set in the register 70, the signal is inverted and output.

次に、ステップ5220において、シフタ40からの出
力41と補数器50からの出力51との加算が、加算器
60で行なわれる。加算器60は、図示する様に、加算
結果を1の補正表現を用いた出力61と、2の補数表現
を用いた出力62として出力する。次に、ステップ52
30において、lの補数表現を用いた出力61がレジス
タ90にラッチされ、2の補数表現を用いた出力62が
レジスタ80にラッチされ、加算結果の正負を表わす符
号′″0”(正)、”1”(負)がレジスタ70にラッ
チされる。さらに、レジスタ90の出力9工は、インバ
ータ130で反転され、絶対値表現に変換された後、出
力131としてセレクタ110に入力され、レジスタ8
0の出力81はそのままセレクタ110に入力される。
Next, in step 5220, the output 41 from shifter 40 and the output 51 from complementer 50 are added in adder 60. As shown in the figure, the adder 60 outputs the addition result as an output 61 using 1's correction representation and an output 62 using 2's complement representation. Next, step 52
At 30, an output 61 using l's complement representation is latched in a register 90, an output 62 using two's complement representation is latched in a register 80, and a sign ``0'' (positive) representing the sign of the addition result; “1” (negative) is latched into register 70. Furthermore, the output 9 of the register 90 is inverted by the inverter 130 and converted into absolute value representation, and then inputted to the selector 110 as the output 131, and
The output 81 of 0 is input to the selector 110 as is.

セレクタ110は、入力される2つの信号のいずれか一
方をレジスタ70の出カフ1に基づいて選択し、出力1
11として出力する。その選択論理を第3図に示す、即
ち、加算器60の加算結果が正の場合には、2の補数表
現である出力81が選択され、加算器60の加算結果が
負の場合には、1の補数表現である出力91の反転信号
(絶対値表現)である出力131が選択される。即ち、
加算器60の加算結果が正の場合には、2の補数表現の
出力62をビット列検出器100に入力して、シフタ4
0でシフトする数を定め、加算器60の加算結果が負の
場合には絶対値表現の出力131をビット列検出器10
0に入力して、シフタ40でシフトする数を定めるので
ある。これによって、加算結果が負の場合でも、正規化
をすみやかに行なうものである。
The selector 110 selects one of the two input signals based on the output 1 of the register 70, and outputs the output 1.
Output as 11. The selection logic is shown in FIG. 3. That is, when the addition result of the adder 60 is positive, the output 81 which is a two's complement representation is selected, and when the addition result of the adder 60 is negative, the output 81 is selected. Output 131, which is an inverted signal (absolute value representation) of output 91, which is expressed in one's complement, is selected. That is,
If the addition result of the adder 60 is positive, the output 62 in two's complement representation is input to the bit string detector 100 and the shifter 4
The number to be shifted is determined by 0, and if the addition result of the adder 60 is negative, the output 131 in the absolute value representation is sent to the bit string detector 10.
0 to determine the number to be shifted by the shifter 40. Thereby, even if the addition result is negative, normalization is quickly performed.

2回目のマシンサイクル以降では、まず、ステップS2
0においてセレクタ120から出力121が部分剰余A
としてレジスタ20にセットされる。
After the second machine cycle, first, step S2
0, the output 121 from the selector 120 is the partial remainder A
is set in the register 20 as .

又、レジスタ70の内容が補数器50に入力され、補数
器50はレジスタ70の内容が正を表わす論理値“0′
″の場合にはレジスタ30の内容を反転して出力し、レ
ジスタ70の内容が負を表わす論理値″l”の場合には
レジスタ30の内容をそのまま出力する。
Further, the contents of the register 70 are input to the complementer 50, and the complementer 50 inputs the logical value "0" indicating that the contents of the register 70 are positive.
'', the contents of the register 30 are inverted and output, and when the contents of the register 70 are a logical value ``l'' representing a negative value, the contents of the register 30 are output as they are.

また、各マシンサイクルでは同時に商作成部に於いて、
レジスタ70からの出カフ1及びビット列検出器100
からの出力101に基づき商デジットを作成して行く。
In addition, at the same time in each machine cycle, in the quoting section,
Output cuff 1 from register 70 and bit string detector 100
A quotient digit is created based on the output 101 from.

第4図は、第1図に示す加算器60の一具体例を示す図
である。第4図に示す加算器60は、被除数Aと除数B
が10ビツトであり、シフタ40と補数器50のそれぞ
れの出力41.51が16ビツトである場合の加算器構
成を示している。即ち、出力41.51の0〜3ビツト
のラインは、全加算器310a、320aに入力され、
4〜7ビツトのラインは、全加算器310b、320b
に入力され、以下同様に、8〜11ビツトのラインは全
加算器310’c、320cに入力され、12〜15ビ
ツトのラインは全加算器310d。
FIG. 4 is a diagram showing a specific example of the adder 60 shown in FIG. 1. The adder 60 shown in FIG. 4 has a dividend A and a divisor B.
is 10 bits, and each output 41.51 of shifter 40 and complementer 50 is 16 bits. That is, the 0 to 3 bit lines of output 41.51 are input to full adders 310a and 320a,
The 4 to 7 bit lines are full adders 310b and 320b.
Similarly, lines of 8 to 11 bits are input to full adders 310'c and 320c, and lines of 12 to 15 bits are input to full adder 310d.

320dに入力されている。ここで、全加算器310a
〜310dの桁上入力端子Cには、It O##を常に
入力し、全加算器320a〜320dの桁上入力端子C
には“1′″を常に入力する。こうして、あらかじめ桁
上入力がある場合とない場合の加算結果を用意しておく
、そして、全加算器310a〜310dの各出力と全加
算器320a〜320dの各出力は、図示する様に、セ
レクタ330a〜330d及びセレクタ340a 〜3
40dにそれぞれ入力される。セレクタ330a〜33
0d及びセレクタ340a〜340dは1桁上人力があ
る場合と桁上入力がない場合の加算結果のうち、一方を
選択して、1の補正表現を用いた出力61と2の補数表
現を用いた出力62を得るものである。そして、2の補
数表現を用いた出力62の最上位ビットにより、加算結
果の正負を知ることができるため、出力62の最大ビッ
トを出力63とする。
320d. Here, full adder 310a
It O## is always input to the carry input terminal C of ~310d, and the carry input terminal C of the full adders 320a~320d
Always input "1'" to . In this way, the addition results with and without carry input are prepared in advance, and each output of full adders 310a to 310d and each output of full adders 320a to 320d is connected to a selector as shown in the figure. 330a to 330d and selectors 340a to 3
40d, respectively. Selectors 330a-33
0d and the selectors 340a to 340d select one of the addition results when there is one digit input and when there is no digit input, and output 61 using 1's correction expression and 2's complement expression. An output 62 is obtained. Since the most significant bit of the output 62 using two's complement representation allows the sign or negative of the addition result to be known, the maximum bit of the output 62 is set as the output 63.

セレクタ330a〜330d及びセレクタ340a〜3
40dの選択論理は、桁上生成伝播回路370と桁上先
見回路350,360により決定される0桁上生成伝播
回路370は、出力41と51を加算した場合に、桁上
げが生じるビットを検出して出力端子Gから出力すると
共に、下位ビットで桁上げが生じた場合、それを上位の
桁に伝えるための信号を出力端子Pから出力するもので
ある0桁上先見回路350,360は、桁上生成伝播回
路370の出力を受けて、次の様に動作する0桁上先見
回路350には最下位ビットへの桁上人力信号351と
して論理値“0”を与えて、各4ビツトごとの桁上信号
352〜354として最下位ビットへの桁上人力がない
場合の出力をそれぞれ得られるようにしておき、該桁上
信号351〜354をセレクタ330a〜330dにそ
れぞれ入力することにより、該セレクタ330a〜33
0dの出力として最下位ビットへの桁上人力がない場合
の入力データ41と入力データ51との加算結果61を
得ることができる。同様に。
Selectors 330a-330d and selectors 340a-3
The selection logic of 40d is determined by the carry generation propagation circuit 370 and the carry look-ahead circuits 350 and 360. The 0 carry generation propagation circuit 370 detects a bit that causes a carry when outputs 41 and 51 are added. The 0 digit upper look-ahead circuits 350 and 360 output from the output terminal G, and when a carry occurs in the lower bit, output a signal from the output terminal P to transmit the carry to the higher digit. In response to the output of the carry generation propagation circuit 370, the logic value "0" is given as the carry input signal 351 to the least significant bit to the 0 digit upper look-ahead circuit 350 which operates as follows, By making it possible to obtain the outputs when there is no carry input to the least significant bit as the carry signals 352 to 354, respectively, and inputting the carry signals 351 to 354 to the selectors 330a to 330d, respectively. Selectors 330a-33
As the output of 0d, an addition result 61 of input data 41 and input data 51 in the case where there is no significant input to the least significant bit can be obtained. Similarly.

桁上先見回路360への桁上人力信m3stとして論理
値パ1”を与えて、最下位ビットへの桁上人力がある場
合の各ビットごとの桁上信号362〜364を得られる
ようにしておき、該桁上信号361〜364をセレクタ
340a〜340dにそれぞれ入力することにより、該
セレクタ340 a ’〜340dの出力として最下位
ビットへ桁上人力がある場合の入力データ41と入力デ
ータ51との加算結果62を得ることができる。
A logic value "P1" is given as the digit input signal m3st to the digit foresight circuit 360, so that the digit signals 362 to 364 can be obtained for each bit when there is a digit input to the least significant bit. By inputting the carry signals 361 to 364 to the selectors 340a to 340d, respectively, the input data 41 and input data 51 when there is a carry force to the least significant bit are output from the selectors 340a' to 340d. The addition result 62 can be obtained.

このような構成を取ることにより入力データ41又は、
入力データ51のどちらか一方のデータを補数表現にす
るだけで、−の補数表現による減算結果61及び2の補
数表現による減算結果62を同時に、しかも、高速に得
ることができる。
By adopting such a configuration, the input data 41 or
By simply converting either one of the input data 51 into complement representation, a subtraction result 61 based on negative complement representation and a subtraction result 62 based on two's complement representation can be obtained simultaneously and at high speed.

第5図は、第1図に示すビット列検出器100の−具体
例を示す図である。第9図は8ビツトの場合のビット列
検出器であり、セレクタ110の出力Illの上位8ビ
ツトがANDゲートとインバータよりなるデコーダ97
によりデコードされ、′0”ビット列の長さに対応する
信号98を出力する。この信号98はマシンサイクルの
最初にレジスタ99にラッチされ、シフタ40及び商作
成部130への出力101として出力される。
FIG. 5 is a diagram showing a specific example of the bit string detector 100 shown in FIG. 1. FIG. 9 shows a bit string detector in the case of 8 bits, in which the upper 8 bits of the output Ill of the selector 110 are connected to a decoder 97 consisting of an AND gate and an inverter.
is decoded by , and outputs a signal 98 corresponding to the length of the '0'' bit string. This signal 98 is latched in a register 99 at the beginning of the machine cycle, and is output as an output 101 to the shifter 40 and the quotient generator 130. .

〔発明の効果〕〔Effect of the invention〕

本発明によれば、改良型SRT除算方式を用いた除算装
置に於いて、加減算の結果の正負に係わらず演算及び演
算結果の正規化を1マシンサイクル以内に行うことがで
きるので、従来技術(正規化を次のマシンサイクルで行
う場合)に比べ除算の実行速度を2倍近く、向上させる
ことができる。
According to the present invention, in a division device using the improved SRT division method, operations and normalization of the operation results can be performed within one machine cycle regardless of whether the result of addition or subtraction is positive or negative. The execution speed of division can be nearly doubled compared to when normalization is performed in the next machine cycle.

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

第1図は本発明の一実施例を示すブロック図、第2図は
第1図に示す実施例の動作を示すフローチャート、第3
図は第1図に示すセレクタの選択論理を示す図、第4図
は第1図に示す加算器の一具体例を示す図、第5図は第
1図に示すビット列検出器の一具体例を示す図、第6図
は1の補数表現と絶対値表現を示す説明図、第7図(a
)、(b)はIEEE’a準浮動小数点フォーマットを
示す説明図、第8図は従来の除算装置の動作を示すフロ
ーチャート、第91!I (a)は符号付き絶対値表現
を示す説明図、第9図(b)は2の補数表現を示す説明
図である。 20.30,70,80,90・・・レジスタ、40・
・・シフタ、50・・・補数器、60・・・加算器、1
00・・・ビット列検出器、110・・・セレクタ、1
20・・・商作成部。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a flowchart showing the operation of the embodiment shown in FIG. 1, and FIG.
The figure shows the selection logic of the selector shown in Fig. 1, Fig. 4 shows a specific example of the adder shown in Fig. 1, and Fig. 5 shows a specific example of the bit string detector shown in Fig. 1. Figure 6 is an explanatory diagram showing one's complement representation and absolute value representation, Figure 7 (a
), (b) is an explanatory diagram showing the IEEE'a semi-floating point format, FIG. 8 is a flowchart showing the operation of a conventional division device, and No. 91! I(a) is an explanatory diagram showing signed absolute value representation, and FIG. 9(b) is an explanatory diagram showing two's complement representation. 20. 30, 70, 80, 90... register, 40.
...Shifter, 50...Complementer, 60...Adder, 1
00...Bit string detector, 110...Selector, 1
20...Commercial preparation department.

Claims (1)

【特許請求の範囲】[Claims] 1、被除数又は部分剰余を格納する第1のレジスタと、
除数を格納する第2のレジスタと、第1のレジスタから
出力される部分剰余を正規化するため、その内容をシフ
トさせるシフタと、部分剰余が正の場合に限つて第2の
レジスタから出力される除数の補数をとる補数器と、シ
フタの出力と補数器の出力を加算して部分剰余を出力す
る加算器と、加算器から出力される部分剰余を正規化す
るため、部分剰余を何ビツトシフトさせるかを判断する
シフト数判断手段と、シフト数判断手段の判断結果と部
分剰余の正負の符号から商を作成する商作成手段を備え
た除算装置において、上記加算器は部分剰余を1の補数
表現と2の補数表現で出力する第1の手段を備え、かつ
上記シフト数判断手段は加算結果が正の場合には2の補
数表現の余分剰余に基づいて何ビツトシフトするかを判
断し、加算結果が負の場合には1の補数表現の絶対値表
現による部分剰余に基づいて何ビツトシフトするかを判
断する第2の手段を備えていることを特徴とする除算装
置。
1. a first register storing a dividend or a partial remainder;
A second register that stores the divisor, a shifter that shifts the contents in order to normalize the partial remainder output from the first register, and a shifter that shifts the contents of the partial remainder output from the second register only when the partial remainder is positive. a complementer that takes the complement of the divisor, an adder that adds the output of the shifter and the output of the complementer to output a partial remainder, and a system that normalizes the partial remainder output from the adder by shifting the partial remainder by how many bits. In the division device, the adder is equipped with a shift number determining means for determining whether the shift number is to be changed, and a quotient creating means for creating a quotient from the determination result of the shift number determining means and the positive or negative sign of the partial remainder. and a first means for outputting a representation and a two's complement representation, and the shift number determining means determines how many bits to shift based on the extra remainder of the two's complement representation when the addition result is positive, and A division device comprising second means for determining how many bits to shift based on a partial remainder in absolute value representation of one's complement representation when the result is negative.
JP59195722A 1984-09-20 1984-09-20 Dividing device Granted JPS6175433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59195722A JPS6175433A (en) 1984-09-20 1984-09-20 Dividing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59195722A JPS6175433A (en) 1984-09-20 1984-09-20 Dividing device

Publications (2)

Publication Number Publication Date
JPS6175433A true JPS6175433A (en) 1986-04-17
JPH0351006B2 JPH0351006B2 (en) 1991-08-05

Family

ID=16345876

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59195722A Granted JPS6175433A (en) 1984-09-20 1984-09-20 Dividing device

Country Status (1)

Country Link
JP (1) JPS6175433A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0356153A2 (en) * 1988-08-18 1990-02-28 Digital Equipment Corporation Radix-2**n divider method and apparatus using overlapped quotient bit selection and concurrent quotient rounding and correction
JP2005229312A (en) * 2004-02-12 2005-08-25 Daihen Corp Adaptive digital filter

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0356153A2 (en) * 1988-08-18 1990-02-28 Digital Equipment Corporation Radix-2**n divider method and apparatus using overlapped quotient bit selection and concurrent quotient rounding and correction
JP2005229312A (en) * 2004-02-12 2005-08-25 Daihen Corp Adaptive digital filter

Also Published As

Publication number Publication date
JPH0351006B2 (en) 1991-08-05

Similar Documents

Publication Publication Date Title
EP0328063B1 (en) Absolute value calculating circuit having a single adder
JP2000259394A (en) Floating point multiplier
JPH0479013B2 (en)
KR20010014992A (en) Divider and method with high radix
JP3345894B2 (en) Floating point multiplier
JPH0480815A (en) Absolute value computing circuit
JPH0619685A (en) Parallel multiplying circuit
JPH02294731A (en) Floating point arithmetic processor
JP2511527B2 (en) Floating point arithmetic unit
JPS6175433A (en) Dividing device
JPH0546363A (en) Divider
JPH0464091B2 (en)
JPH0511980A (en) Overflow detecting method and circuit
US3462589A (en) Parallel digital arithmetic unit utilizing a signed-digit format
JP2555577B2 (en) Arithmetic unit
JP2856792B2 (en) Floating point arithmetic unit
JP2537876B2 (en) Rounding circuit
JP4042215B2 (en) Arithmetic processing apparatus and method
KR0154773B1 (en) Multiplier for numericals expressed by the difference of 2-numbers
JP3482102B2 (en) Absolute distance calculation circuit
JP3104569B2 (en) Division circuit
JPH10254680A (en) Square circuit
JPS62159224A (en) Arithmetic circuit for floating point
JPS60235241A (en) Floating point adding circuit
JPH0427587B2 (en)