JPH03102519A - Divider - Google Patents

Divider

Info

Publication number
JPH03102519A
JPH03102519A JP1241260A JP24126089A JPH03102519A JP H03102519 A JPH03102519 A JP H03102519A JP 1241260 A JP1241260 A JP 1241260A JP 24126089 A JP24126089 A JP 24126089A JP H03102519 A JPH03102519 A JP H03102519A
Authority
JP
Japan
Prior art keywords
redundant binary
quotient
divisor
converter
subtractor
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
JP1241260A
Other languages
Japanese (ja)
Other versions
JPH0778724B2 (en
Inventor
Hideyo Tsuruta
英世 鶴田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP1241260A priority Critical patent/JPH0778724B2/en
Publication of JPH03102519A publication Critical patent/JPH03102519A/en
Publication of JPH0778724B2 publication Critical patent/JPH0778724B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To speed up entire division between the complement display numbers of '2' directly with use of hardware by improving algorithm in each step of the division, and extending the calculation rule of a redundance binary adder/ subtracter in one part. CONSTITUTION:In a redundant binary adder/subtracter 3, the calculation rule is extended only to the redundant binary adder/subtracter cell of the most significant bit in order to make correspondence to the negative division. In this calculation rule, regularity is disturbed concerning a transmission digit. However, since this redundant binary adder/subtracter cell is set in the most significant position, the carry is not propagated any more. A quotient determining circuit 4 determines arithmetic in the step and a value for the digit of a quotient while observing high-order three digits and the code of a divisor Y in the arithmetic result of the redundant binary adder/subtracter 3 in the preceding step. When the quotients corresponding to all n-steps and the arithmetic result of the redundant binary adder/subtracter 3 in the (n+1) step are calculated, the quotient and a remainder can be obtained.

Description

【発明の詳細な説明】 産業」二の利用分野 本発明は2の補数表現数同士あるいは符号なし数同士の
除算を行うセル配列方式に基づく減算シフト型除算器に
関する。
DETAILED DESCRIPTION OF THE INVENTION FIELD OF THE INVENTION The present invention relates to a subtractive shift type divider based on a cell arrangement method that performs division between two's complement numbers or between unsigned numbers.

従来の技術 従来の除算器としては、例えば 高木、安浦、矢島二″
冗長2進表現を利用したVLSI向き高速除算器゛,電
子通信学会論文誌(D),J67− D,  N o 
4,  pp4 50−457(昭59−04)に示さ
れている。
Conventional technology Conventional dividers include, for example, Takagi, Yasuura, Yajima 2''
High-speed divider for VLSI using redundant binary representation, Transactions of the Institute of Electronics and Communication Engineers (D), J67-D, No.
4, pp4 50-457 (Sho 59-04).

以下の記述中で、冗長2進数を[ ]SD2で、符号な
し2進数を[コ,で、2の補数表現数を[コ2cでそれ
ぞれ囲んで表記する。英大文字記号で表された数値の各
桁を例えば X”[:Xll.XIX2 ・= Xn]sD2のよ・
うに英小文字に添字の番号を伺して表す。また以下の記
述中で用いる記号の説明を表1に掲げる。
In the following description, a redundant binary number is enclosed in [ ]SD2, an unsigned binary number is enclosed in [ko, and a two's complement representation number is enclosed in [ko2c]. For example, each digit of a numerical value represented by an uppercase letter symbol is expressed as X”[:Xll.XIX2 ・=Xn]sD2
It is represented by lowercase English letters followed by a subscript number. Table 1 also lists the explanations of the symbols used in the following description.

第5図は従来の除算器のブロック図を示すものであり、
同図の例では特にn=6としている。同図において、1
は正規化された2の補数表現の正または負の除数を冗長
2進数へ変換する除数変換器、2は正または負の2の補
数表現の被除数を冗長2進数へ変換する被除数変換器、
3は冗長2進数同士の加算または減算を行う冗長2進加
減算器、4は対応する段の冗長2進加減算器において加
算もしくは減算のいずれの演算を行うべきかを決定する
と共にその段に対応する商の桁を決定する商決定用回路
、5は冗長2進表現の商を2の補数表現数へ変換する商
変換器、6は最終段の前記冗長2進加減算器の演算結果
である冗長2進数を2の補数表現数へ変換する剰余変換
器である。以下各図面において、同一物に対しては共通
の番号を使用している。
FIG. 5 shows a block diagram of a conventional divider.
In the example shown in the figure, n=6 in particular. In the same figure, 1
is a divisor converter that converts a positive or negative divisor in normalized two's complement representation into a redundant binary number; 2 is a dividend converter that converts a dividend in positive or negative two's complement representation into a redundant binary number;
3 is a redundant binary adder/subtractor that performs addition or subtraction between redundant binary numbers; 4 is a redundant binary adder/subtractor that determines whether addition or subtraction should be performed in the redundant binary adder/subtracter of the corresponding stage, and corresponds to that stage. A quotient determination circuit that determines the digit of the quotient; 5 a quotient converter that converts the quotient in redundant binary representation into a two's complement representation; and 6 a redundant 2 which is the calculation result of the redundant binary adder/subtractor in the final stage. This is a remainder converter that converts a base number to a two's complement representation number. In the drawings below, common numbers are used for the same parts.

以上のように構成された従来の除算器について、以下に
その原理及び動作を説明する。従来の除算器に刻して符
号なし2進表現の被除数Xと除数Yが与えられており、
両者はあらかじめ正規化されているとする。初めに、被
除数Xと除数Yはそれぞれ被除数変換器2と除数変換器
1により冗長2椎数R〔0》とDへ変換される。
The principle and operation of the conventional divider configured as described above will be explained below. Dividend X and divisor Y are given in unsigned binary representation by carving them into a conventional divider,
It is assumed that both have been normalized in advance. First, the dividend X and the divisor Y are converted into two redundant numbers R[0] and D by the dividend converter 2 and the divisor converter 1, respectively.

ここで符号なし2進表現から冗長2進表現への変換規則
を次に示す。
Here, the conversion rules from unsigned binary representation to redundant binary representation are shown below.

く符号なし2進表現から冗長2進表現への変換規則〉[
Xコ2=[O.XIX2   ・・’Xnl2[Xコs
nz   ←  [X コ2 とすると、 [X]12=[○.XIX2  ゜”  Xn」sn2
ここで、←は数表現の変換を表す。即ち符号なし2進表
現数はそのままで値として冗長2進表現数である。
Conversion rules from unsigned binary representation to redundant binary representation> [
Xco2=[O. XIX2...'Xnl2[Xkos
nz ← [X ko2, then [X]12=[○. XIX2 ゜"Xn"sn2
Here, ← represents conversion of number expression. That is, an unsigned binary representation number is a redundant binary representation number as it is as a value.

次にRfil+は初段の冗長2進加減算器3に対する被
減数どして入力され、Dは第5図に示すように冗長2進
加減算器に苅ずる演算数(加数もしくは減数)として各
段の冗長2進加減算器3に一斉に供給される。初段の冗
長2進加減算器3では、減算が行われる。初段より後の
冗長2進加減算器3では、その段に対応する商決定用回
路4の判断に従って加算または減算のいずれかが行われ
る。商決定用回路4は前段の冗長2進加減算器3の演算
結果の上位3桁を見てその段の演算及び商の桁の値を決
定する。n段すべてに対応する商と第(n+1)段の冗
長2進加減算器3の演算結果が求められると、冗長2進
表現の商と剰余が計算結果として得られる。冗長2進表
現の商は商変換器5により、剰余は剰余変換器6により
それぞれ2の補数表現数へ変換される。
Next, Rfil+ is input as the minuend to the redundant binary adder/subtractor 3 in the first stage, and D is input as the number of operations (addend or subtractor) to the redundant binary adder/subtracter 3 as shown in FIG. The signals are supplied to the binary adder/subtractor 3 all at once. The redundant binary adder/subtractor 3 at the first stage performs subtraction. In the redundant binary adder/subtractor 3 after the first stage, either addition or subtraction is performed according to the judgment of the quotient determination circuit 4 corresponding to that stage. The quotient determination circuit 4 looks at the upper three digits of the operation result of the redundant binary adder/subtractor 3 in the previous stage and determines the operation at that stage and the value of the quotient digit. When the quotient corresponding to all n stages and the operation result of the redundant binary adder/subtractor 3 of the (n+1)th stage are obtained, the quotient and remainder of the redundant binary representation are obtained as the calculation result. The quotient of the redundant binary representation is converted into a quotient converter 5, and the remainder is converted into a two's complement representation number by a remainder converter 6.

ここで冗長2推表現から2の補数表現への変換規則を次
に示す。
Here, the conversion rules from the redundant two-inferential representation to the two's complement representation are shown below.

〈冗長2進表現から2の補数表現への変換規則〉[Xコ
sn2=[0  .XIX2  ・=  xn]su2
[Xコ2c  ←  [XコSD2 とすると、冗長2椎表現から2の抽数表現への変換は2
つの符号なし2進数の減算により行える。
<Conversion rules from redundant binary representation to two's complement representation> [X cosn2=[0 . XIX2 ・= xn]su2
If [Xko2c ← [XkoSD2], the conversion from the redundant two vertebra representation to the abstract representation of 2 is 2
This can be done by subtracting two unsigned binary numbers.

冗長2進数の各桁を見て、1の桁だけを集めて他の桁を
Oとした2進数から、1の桁たけを選んで1とし他の桁
を0とした2進数を減ずることにょり、2の補数表現数
に変換できる。この変換は各桁に入力選択器を設けた2
の抽数加算器を用も)て実現できる。
By looking at each digit of a redundant binary number and collecting only the 1 digit and setting the other digits as O's, we can subtract the binary number by selecting the 1's digit and setting it as 1 and the other digits as 0. can be converted to a two's complement representation number. This conversion uses two input selectors for each digit.
It can also be realized by using an abstract adder.

以上で述へた処理の内容と商決定用回路に#5ける演算
と商決定のアルゴリズムを下のようにまとめる。
The contents of the processing described above, the calculation in #5 in the quotient determining circuit, and the algorithm for determining the quotient are summarized as follows.

く従来例の除算アルゴリズム〉 ステップ1 [R ”” lsn2←[X ]2 [DコSD2   ←  [:Y コ2ステップ2 [Qe]snz :二 1 [R”’lsn2:  =[:R”’lsn2[:l’
)]sn2ステップ3 [Qj]sn2::   O  jf  [rg”.r
,+1’r2’j’ コSD2  ”  OI   I
f   [re’ ノ 1.1−,fll  r2 C
 Il  コSD2   〉  0[R””’]s l
llp:=  2X  [:R’ ノ’E sn 2 
 −  [’ q+ コsn 2X [D]sc2en
d ステップ4 Q   :   :   [:q2.QIQ2  =゜
  qn]sn2[z]2 ← [Q]sn2 [Rコ2   ←  [R tn”’]SD2表2に示
すように、従来の除算器に対する入力値の範囲は制限さ
れる。従って商Zの値の範囲も表2. for  j:=l  to  n begin l   if   Ire (ノ )  . r , 
 L I l p 2  口”Jsn 2  (  0
II 12一 1/2  ≦  Z<2 となる。もしうえられたXとYが任意の整数であった場
合、XとYは絶対僅をとられ、正規化されねばならない
Conventional division algorithm> Step 1 [R ”” lsn2←[X ] 2 [D SD2 ← [: Y Co2 Step 2 [Qe]snz :2 1 [R”'lsn2: =[:R”'lsn2[:l'
)] sn2 step 3 [Qj] sn2:: O jf [rg”.r
, +1'r2'j' KoSD2 ” OI I
f [re' ノ 1.1-, fll r2 C
Il KoSD2 〉 0[R””']s l
llp:= 2X [:R'ノ'E sn 2
- [' q+ cosn 2X [D]sc2en
d Step 4 Q: : [:q2. QIQ2 =゜ qn]sn2[z]2 ← [Q]sn2 [Rco2 ← [R tn”'] SD2 As shown in Table 2, the range of input values for the conventional divider is limited. The range of Z values is also shown in Table 2. for j:=l to n begin l if Ire (ノ) .
L I l p 2 mouth”Jsn 2 ( 0
II 12-1/2≦Z<2. If the values X and Y given are arbitrary integers, then X and Y must be taken as absolute fractions and normalized.

冗長2進数同士の加算及び減算はそれぞれ表3,表4の
ように定義される。本従来の除算器の場合、演算数(加
数もしくは減数)の取り得る値が非負に制限されるので
次のような利点がある。
Addition and subtraction between redundant binary numbers are defined as shown in Tables 3 and 4, respectively. In the case of this conventional divider, the possible values of the arithmetic number (addend or subtraction) are limited to non-negative values, so there are the following advantages.

ul+  Vl+  Sh  jl+  Wl({11
  01  Hsj:和(差)ディジソト t1: 伝達ディジット w1: 中間和(差) 即ち、伝達ディジットは2の補数表現数の加減算におけ
るキャリまたはボローと同じような意味を持つ。
ul+ Vl+ Sh jl+ Wl({11
01 Hsj: Sum (difference) digit t1: Transfer digit w1: Intermediate sum (difference) That is, the transfer digit has the same meaning as a carry or borrow in addition and subtraction of two's complement numbers.

(1)計算規則が簡単になる。(1) Calculation rules become simpler.

(2)伝達ディジットが高々1桁しか伝播しない。(2) The transmitted digit propagates at most one digit.

ここで伝達ディジットtiは次のように定義される。Here, the transmitted digit ti is defined as follows.

冗長2進数Uと■の加算もしくは減算において、Uと■
の第i番目の桁をそれぞれuL  vlとしたときに、 旧±V 2t +W S w1+ t 一般的な冗長2進数同士の加減算では伝達ディジットが
2桁まで伝播するが、(2)で述べたように演算数(加
数もしくは減数)を非負に限定すると伝達ディジットは
高々工桁しか伝播しない。従って上記の加減算は桁上げ
伝播がなく、演算数の桁数に無関係に一定時間で行える
In addition or subtraction of redundant binary numbers U and ■, U and ■
When the i-th digit of is uL vl, respectively, old ±V 2t +W S w1+ t In general addition and subtraction between redundant binary numbers, the transmitted digit propagates up to two digits, but as mentioned in (2) If the number of operations (addend or subtrahend) is limited to non-negative, the transmitted digits will only propagate to the highest possible digits. Therefore, the above addition and subtraction can be performed in a constant time without carry propagation, regardless of the number of digits of the operation number.

以上述べたように、本従来の除算器では、正規化された
符号なし2進数同士のみしか除算できない。即ち被除数
X,除数Yが取り得る値の範囲は、表2のように制限さ
れる。
As described above, the conventional divider can only divide normalized unsigned binary numbers. That is, the range of values that the dividend X and the divisor Y can take are limited as shown in Table 2.

この値の範囲は浮動小数点表示数の仮数部の条件と合致
しており、実際このような制限の下での除表3. 注)各欄は(伝達ディジット,中同和)の組合せて記さ
れている。
This range of values matches the conditions for the mantissa part of floating-point numbers, and in fact the division table 3. Note) Each column is written as a combination of (transmission digit, Chinese Dowa).

表4. 注)各欄は(伝達ディシット で記されている。Table 4. Note) Each column is (transmission value) It is written in

中間差)の組合せ I5 算は、牛、〒に浮動小数点表示数の仮数部同士の除算用
に考案されたものである。
The combination I5 (intermediate difference) was devised for dividing the mantissas of floating-point numbers.

発明が解決しようとする課題 しかし上記のような構成では、例えば2の補数表示され
た整数の被除数X1  整数の除数Yが与えられたとき
に X÷Y二Z ,  余りR 但し、商Z,剰余Rは整数。商Zの小数点以下は切り捨
てられる。剰余Rの符号は問わない。
Problems to be Solved by the Invention However, in the above configuration, for example, when an integer dividend X1 expressed as a two's complement and an integer divisor Y are given, R is an integer. The quotient Z is rounded down to the decimal point. The sign of the remainder R does not matter.

なる整数除算に適用することはてきない。従来の除算器
を拡張して整数除算を行おうとする場合、除算前の被除
数X1  除数Yの絶対値化及び正規化、除算後の商Z
の符号,小数点位置の補正及び剰余Rの小数点位置の補
正が必要になる。結果として、除算器全体のハードウェ
ア量と計算時間が増大する。
It cannot be applied to integer division. When attempting to perform integer division by extending a conventional divider, the dividend X1 before division, the absolute value and normalization of the divisor Y, and the quotient Z after division
It is necessary to correct the sign of R, the decimal point position, and the decimal point position of the remainder R. As a result, the amount of hardware and calculation time for the entire divider increases.

本発明はかかる点に鑑み、セル配列方式による除算器で
正規化数同士の除算を含めて整数同士のI6 除算をも演算できる除算器を堤供することを目的とする
In view of this, it is an object of the present invention to provide a cell array type divider that can perform I6 division between integers as well as division between normalized numbers.

課題を解決するための手段 上記の課題を解決するために請求項1および3記載の発
明は、正または負の2の補数表現の被除数を冗長2進数
へ変換する被除数変換器と、正規化された2の補数表現
の正または負の除数を冗長2逗数へ変換する除数変換器
と、冗長2進表現された加数あるいは減数のMSBに対
して3値{−1.  0.  1}をとることを許し加
数あるいは減数のMSB以外の各桁の取り得る値を2値
{0.  1}のみに限定すると共に前記被除数変換器
から出力された冗長2進数と前記除数変換器から出力さ
れた冗長2逸数との間で加減算を行う初段の冗長2進加
減算器と、冗長2進表現された加数あるいは減数のMS
Bに刻して3値1−L  0.  1}をとることを許
し加数あるいは減数のMSB以外の各桁の取り得る値を
2{Nff(0.  11のみに限定すると共に前記除
数変換器から出力された冗長2進数と前段の冗長2進加
減算器からの出力を左へ1ビッ1ンフ1・した冗長2這
泳との問で加減算を行う冗長2進加減算器を前記初段の
冗長2進加減算器の後にn段積み重ねた冗長2進加減算
器配列と、前段の前記冗長2進加減算器の演算結果及び
除数の符号より次段の冗長2進加減算器において加算も
しくは減算のいずれの演算を行うべきかを決定すると共
にその段に対応する商の桁を決定する商決定用回路と、
各段における前記商決定用回路により決定された商の各
桁を合わせた冗長2進表現の商を2の1111数表現数
へ変換する商変換器と、最終段の前記冗長2進加減算器
の演算結果である冗長2進数を2の補数表現数へ変換す
る剰余変換器とを備え、前記商決定用回路において、除
数が正であるとき、甲が負なら−1、Oなら01  正
なら土を対応する商の桁の値とし、除数が負であるとき
、甲が負なら1、○なら0、正なら−1を対応ずる商の
桁の値とする判断を行うことを特徴とする除算器である
Means for Solving the Problems In order to solve the above problems, the inventions according to claims 1 and 3 provide a dividend converter that converts a dividend in positive or negative two's complement representation into a redundant binary number, and a normalized A divisor converter converts a positive or negative divisor in two's complement representation into a redundant binary number, and a ternary value {-1. 0. 1}, and the possible values of each digit other than the MSB of the addend or subtractor are expressed as binary {0. a first-stage redundant binary adder/subtractor that performs addition and subtraction between the redundant binary number outputted from the dividend converter and the redundant two-digit number outputted from the divisor converter; MS of expressed addend or subtrahend
3 values 1-L 0. 1}, the possible values of each digit other than the MSB of the addend or subtractor are limited to 2{Nff(0.11), and the redundant binary number output from the divisor converter and the redundant 2 The redundant binary adder/subtractor is stacked in n stages after the first stage redundant binary adder/subtracter, which performs addition and subtraction between the redundant binary adder and subtracter, which outputs the output from the base adder/subtractor to the left by 1 bit, 1 bit, and 1. Based on the adder/subtractor array, the operation result of the redundant binary adder/subtracter in the previous stage, and the sign of the divisor, it is determined whether addition or subtraction should be performed in the redundant binary adder/subtracter in the next stage, and the operation corresponding to that stage is determined. a quotient determination circuit that determines the digit of the quotient;
a quotient converter that converts the quotient of a redundant binary representation obtained by adding up each digit of the quotient determined by the quotient determining circuit in each stage into a number expressed as 1111 of 2; and a redundant binary adder/subtracter in the final stage. and a remainder converter that converts the redundant binary number that is the result of the operation into a two's complement representation number, and in the quotient determination circuit, when the divisor is positive, if A is negative, it is -1, if O is negative, it is 01, and if positive, it is earth. is the value of the corresponding quotient digit, and when the divisor is negative, it is determined that if A is negative, 1, if O is 0, and if positive, -1 is the value of the corresponding quotient digit. It is a vessel.

また請求項2および4記載の発明は、2の補数表現の正
規化された除数が負のときに除数の1のIilt数をと
り負でないときに除数の僅を素通りさせる1の補数器と
、2の抽数表現の正または負の被除数を冗長2進数へ変
換する被除数変換器と、前記1の補数器からの出力を冗
長2進数へ変換する除数変換器と、冗長2進表現された
加数あるいは減数の全桁の取り得る値を2値{0.1}
のみに限定すると共に前記被除数変換器から出力された
冗長2進数と前記除数変換器から出力され更に除数が負
のときに1を加えられた冗長2進数とのハ[]で加減算
を行う初段の冗長2進加減算器と、冗長2進表現された
加数あるいは減数の全桁の取り得る値を2値{0, 1
}のみに限定すると共に前段の冗長2進加減算器からの
出力を左へ1ビッl・シフトした冗長2進数と前記除数
変換器から出力され更に除数が負のときに1を加えられ
た冗長2進数との問で加減算を行う冗長2進加減算器を
前記初段の冗長2進加減算器の後にn段積み重ねた冗長
2進加減算器配列と、前記前段の冗長2進加減算器の演
算結果より次段の冗長2進加減算器において加算もしく
は減算のいずれの演算を行うべき19一 かを決定すると共にその段に対応する商の桁を決定する
商決定用回路と、各段における前記商決定用回路により
決定された商の各桁を合わせて冗長2進表現の商とし且
つ除数が負の場合にこの商の符号を反転し且つ冗長2進
表現の商を2の補数表現数へ変換する商変換器と、最終
段の前記冗長2進加減算″Aaの演算結果てある冗長2
進数を2の補数表現数へ変換する剰余変換器とを備え、
前記商決定用回路において、甲が負なら−1、○ならo
1正なら1を対応する商の桁の値とする判断を行うこと
を特徴とする除算器てある。
Further, the invention according to claims 2 and 4 provides a 1's complementer that takes the Iilt number of 1 of the divisor when the normalized divisor of the 2's complement representation is negative, and allows the decimal of the divisor to pass through when it is not negative; a dividend converter that converts a positive or negative dividend expressed as a 2's draw number into a redundant binary number; a divisor converter that converts the output from the 1's complementer into a redundant binary number; and an adder that is expressed as a redundant binary number. The possible values of all digits of a number or subtraction are expressed as binary {0.1}
The first stage performs addition and subtraction between the redundant binary number output from the dividend converter and the redundant binary number output from the divisor converter and to which 1 is added when the divisor is negative. A redundant binary adder/subtractor and the possible values of all digits of the addend or subtractor expressed in redundant binary are expressed as binary {0, 1
} and a redundant binary number obtained by shifting the output from the redundant binary adder/subtracter in the previous stage by 1 bit to the left, and a redundant binary number output from the divisor converter and further adding 1 when the divisor is negative. A redundant binary adder/subtractor array in which n stages of redundant binary adders/subtracters that perform addition/subtraction with base numbers are stacked after the redundant binary adder/subtracter in the first stage, and a next stage based on the operation results of the redundant binary adder/subtracter in the previous stage. A quotient determining circuit that determines whether addition or subtraction is to be performed in the redundant binary adder/subtractor and determines the digit of the quotient corresponding to that stage, and the quotient determining circuit in each stage. A quotient converter that combines each digit of the determined quotient to form a quotient in redundant binary representation, inverts the sign of this quotient when the divisor is negative, and converts the quotient in redundant binary representation to a number in two's complement representation. And, the operation result of the redundant binary addition/subtraction "Aa" in the final stage is redundant 2.
and a remainder converter for converting a base number into a two's complement representation number,
In the circuit for determining the quotient, if A is negative, -1, if ○, o
There is a divider characterized in that, if 1 is positive, 1 is determined as the value of the corresponding quotient digit.

作   用 」二記した手段により、請求項1記載の発明は、冗長2
進加減算器を、冗長2進表現された加数あるいは減数(
7)MSBに対して3値{−1.  0.  1}をと
ることを許し加数あるいは減数のMSB以外の各桁の取
り得る僅を2値{0.1}のみに限定するように改良し
たこどと、商決定用回路において、除数が正であるとき
、甲が負ならーL  Oなら01  正なら1を対応ず
る商の桁の値とし、除数20 が負であるとき、甲が負ならL  Oなら01  正な
ら−1を対応する商の桁の値とする判断を行うことによ
り、被除数に対して任意の2の補数表現された整数を許
し、除数に刻して負の数を許すことが可能である。
By the means described in "Action" 2, the invention claimed in claim 1 is redundant.
A base adder/subtractor can be used to generate redundant binary representations of addends or subtractors (
7) Three values for MSB {-1. 0. 1}, and the number of possible values of each digit other than the MSB of the addend or subtraction is limited to only two values {0.1}. However, in the circuit for determining the quotient, if the divisor is positive , if A is negative, then -LO, then 01, if positive, then 1 is the value of the corresponding quotient, and when the divisor 20 is negative, if A is negative, L is O, then 01, and if positive, -1 is the corresponding quotient. By making a judgment that the value is a value of digits, it is possible to allow any integer expressed as a two's complement number for the dividend, and to allow a negative number by dividing it into the divisor.

請求項3記載の発明は、更に正規化器と商バレルシフタ
と剰余バレルシフタとを設けることにより、請求項1記
載の発明に加えて除数に対しても任意の2の補数表現さ
れた整数を許すことが可能である。
The invention according to claim 3 further includes a normalizer, a quotient barrel shifter, and a remainder barrel shifter, so that in addition to the invention according to claim 1, an arbitrary two's complement integer can be used for the divisor. is possible.

請求項2記載の発明は、1の律数器と、冗長2推表現さ
れた加数あるいは減数の全桁の取り得る値を2値{0.
1}のみに限定すると共に前記被除数変換器から出力さ
れた冗長2進数と前記除数変換器から出力され更に除数
が負のときに1を加えられた冗長2進数との間で加減算
を行う冗長2進加減算器と、除数が負の場合に冗長2進
表現された商の符号を反転する商変換器とを設けること
により、被除数に対して任意の2の補数表現された整数
を許し、除数に刻して負の数を許すことが可能である。
The invention as set forth in claim 2 provides a numerator of 1 and the possible values of all digits of the addend or subtractive expressed in redundant 2 in binary {0.
1} and performs addition and subtraction between the redundant binary number outputted from the dividend converter and the redundant binary number outputted from the divisor converter and to which 1 is added when the divisor is negative. By providing a base adder/subtractor and a quotient converter that inverts the sign of the quotient expressed in redundant binary when the divisor is negative, any integer expressed in two's complement can be used as the dividend, and the divisor can be It is possible to allow negative numbers.

請求項4記載の発明は、更に正規化器と商バレルシフタ
と剰余バレルシフタとを設けることにより、請求項2記
載の発明に加えて除数に対しても任意の2の補数表現さ
れた整数を許すことが可能である。
The invention according to claim 4 further includes a normalizer, a quotient barrel shifter, and a remainder barrel shifter, so that in addition to the invention according to claim 2, an arbitrary two's complement integer can be used for the divisor. is possible.

実施例 以下本発明の4つの実施例の除算器について、図面を参
照しながら説明する。
EXAMPLES Below, dividers according to four embodiments of the present invention will be described with reference to the drawings.

第1の実施例は本発明において請求項l記載の除算器の
構成例である。第1図は同実施例におけるn=6のどき
の除算器のブロック構成図である。
The first embodiment is a configuration example of a divider according to claim 1 of the present invention. FIG. 1 is a block diagram of a divider with n=6 in the same embodiment.

同図において1は正規化された2の補数表現の正または
負の除数を冗長2進数へ変換する除数変換器、2は正ま
たは負の2の補数表現の被除数を冗長2進数へ変換する
被除数変換器、3は冗長2進数同士の加算または減算を
行う冗長2進加減算器、4は対応する段の冗長2進加減
算器3において加算もしくは減算のいずれの演算を行う
べきかを決定すると共にその段に対応する商の桁を決定
する[q」]s[l2二二 [R四・1)コ,,2 end if  [rg (』).r+”’r2”’ コSD2
  ”  01  1f [r8fll  .r,〔」
}r%I)コ812  〉0: 2X[R’l’]sn
2 −  [q+]sn2X[D]sa2注2)第t図
の各冗長2fflli加減算器のMSB(左端、同図中
斜線を{=1 1,た口で示す)の冗長2進加減算器セ
ルに適用する。他のセルは(同図中斜線のない口で示す
)従来の除算器と同し。
In the figure, 1 is a divisor converter that converts a positive or negative divisor in normalized two's complement representation into a redundant binary number, and 2 is a dividend that converts a dividend in positive or negative two's complement representation into a redundant binary number. Converter 3 is a redundant binary adder/subtractor that performs addition or subtraction between redundant binary numbers; 4 is a redundant binary adder/subtracter that determines whether addition or subtraction should be performed in the redundant binary adder/subtractor 3 of the corresponding stage; Determine the quotient digit corresponding to the column [q'']s[l222[R4・1)ko,,2 end if [rg (''). r+"'r2"' KoSD2
” 01 1f [r8fll .r, [”
}r%I)ko812 〉0: 2X[R'l']sn
2 - [q+] sn2 Apply. The other cells (indicated by openings without diagonal lines in the figure) are the same as the conventional divider.

ステップ4 Q : [Zコ2c [Rコ2c [Qll.Q [Q]SDR [Rfn”1 ]SD2 q nコSD2 表6. 表5. 注1)各欄は(伝達ディジット, せで記されている。Step 4 Q: [Zko2c [Rco2c [Qll. Q [Q]SDR [Rfn”1 ]SD2 q ncoSD2 Table 6. Table 5. Note 1) Each column is (transmission digit, It is written in

中間和) の組合 注1)各欄は(伝達ディジット,中間差)の組合せで記
されている。
Note 1) Each column is written as a combination of (transmitted digit, intermediate difference).

注2)第1図の各冗長2進加減算器のM’SB(左端、
同図中斜線を刊した口で示す)の冗長2進加減算器セル
に適用する。他のセルは(同図中斜線のない口で示す)
従来の除28 算器と同し。
Note 2) M'SB (left end,
This is applied to the redundant binary adder/subtractor cell (indicated by the hatched opening in the figure). Other cells (indicated by openings without diagonal lines in the figure)
Same as conventional divider 28 calculator.

表7. ステップ2の修疋 表8. ステソプ3の修正 第2の実施例は本発明において請求項2記載の除算器の
+I′4成例である。第2図は同実施例におけるn=6
のときの除算器のブロック構成図である。
Table 7. Step 2 correction table 8. A second modified embodiment of the step 3 is a +I'4 example of the divider according to the present invention. Figure 2 shows n=6 in the same example.
FIG. 2 is a block configuration diagram of a divider in the case of FIG.

同図において1は正規化された2の補数表現の正または
負の除数を冗長2進数へ変換する除数変換器、2は正ま
たは負の2の補数表現の被除数を冗長2進数へ変換する
被除数変換器、3は冗長2進数同士の加算または減算を
行う冗長2進加減算器、4は対応する段の冗長2進加減
算器にわいて加算もしくは減算のいずれの演算を行うべ
きかを決定すると共にその段に苅応ずる商の桁を決定す
る商決定用回路、5は商決定用回路4で得られた商の符
号の補正を行うと共に冗長2進表現の商を2の補数表現
数へ変換する商変換器、6は最終段の前記冗長2進加減
算器の演算結果である冗長2進数を2の補数表現数へ変
換する剰余変換器である。
In the figure, 1 is a divisor converter that converts a positive or negative divisor in normalized two's complement representation into a redundant binary number, and 2 is a dividend that converts a dividend in positive or negative two's complement representation into a redundant binary number. Converter, 3 is a redundant binary adder/subtractor that performs addition or subtraction between redundant binary numbers; 4 is a redundant binary adder/subtractor that determines whether addition or subtraction should be performed in the redundant binary adder/subtractor of the corresponding stage; A quotient determination circuit 5 determines the digit of the quotient corresponding to that stage, and 5 corrects the sign of the quotient obtained by the quotient determination circuit 4 and converts the quotient in redundant binary representation to a two's complement representation number. The quotient converter 6 is a remainder converter that converts the redundant binary number, which is the operation result of the redundant binary adder/subtractor at the final stage, into a two's complement representation number.

以」二のように構成された本実施例の除算器について、
以下にその原理と動作を説明する。
Regarding the divider of this embodiment configured as shown below,
The principle and operation will be explained below.

本実施例の除算器に対して2の補数表現の被除数Xと除
数Yが与えられており、除数Yはあらかじめ正規化され
ているとする。初めに、除数Yば1−のネ111数器に
よりもしYが負の場合Yの1の補数に変換される。被除
数Xと1の補数器の出力はそれぞれ被除数変換器2と除
数変換器1により冗長2進数R(8)とDへ変換される
。次にR〔0〉は初段の冗長2進加減算器に刻する被演
算数(披加数もしくは被減数)として人力され、Dは第
{図に示すように冗長2進加減算器に刻する演算数(加
数もしくは減数)として各段の冗長2進加減算器3に一
斉に供給される。各段の冗長2進加減算器3ては、その
段に対応する商決定用回路4の判断に従って加算または
減算のいずれかが行われる。
It is assumed that a dividend X and a divisor Y in two's complement representation are given to the divider of this embodiment, and the divisor Y is normalized in advance. First, if Y is negative, it is converted to the one's complement of Y by the divisor Y. The dividend X and the output of the 1's complementer are converted into redundant binary numbers R(8) and D by a dividend converter 2 and a divisor converter 1, respectively. Next, R[0> is entered manually as the operand (articendant or minuend) to be inscribed in the redundant binary adder/subtractor in the first stage, and D is the operand to be inscribed in the redundant binary adder/subtractor as shown in Fig. It is supplied all at once to the redundant binary adder/subtractor 3 of each stage as an addend or subtractor. The redundant binary adder/subtractor 3 at each stage performs either addition or subtraction according to the judgment of the quotient determination circuit 4 corresponding to that stage.

ここて、もし除数Yが負であった場合、既に除数Yは1
の補数に変換されているので、これを除数Yの2の補数
に変換するためDに刻してjを加えるという補正を行う
。この補正は各段の冗長2進加減算器3で加減算を行う
ときに、同時に行・う。
Here, if the divisor Y is negative, the divisor Y is already 1
Since it has been converted to the complement of , in order to convert it to the 2's complement of the divisor Y, a correction is performed by carving it into D and adding j. This correction is performed simultaneously when addition and subtraction are performed in the redundant binary adder/subtractor 3 of each stage.

表9,10に示すようにこの補正は、各段の冗長2進加
減算器3のLSBにおける計算規則を修正することによ
り実現されている。このようにLSBの計算規則を修正
しても、LSBより下位からの桁上げ(伝達ディジソト
)はないので、LSB31 から上位側へ桁」二げ伝播が発生することはない。
As shown in Tables 9 and 10, this correction is realized by modifying the calculation rule for the LSB of the redundant binary adder/subtractor 3 in each stage. Even if the LSB calculation rules are modified in this way, there is no carry (transmission) from lower than the LSB, so digit propagation from LSB31 to the upper side will not occur.

商決定用回路4は前段の冗長2進加減算器3の演算結果
の上位3桁を見てその段の演算及び商の桁の値を決定す
る。n段すべてに対応する商と第(n+ 1)段の冗長
2進加減算器3の演算結果が求められると、冗長2進表
現の商と剰余が計算結果として得られる。冗長2進表現
の商は商変換器5により、剰余は剰余変換器6によりそ
れぞれ2の補数表現数へ変換される。本実施例では商変
換器5において商の符号に関する補正も行う。
The quotient determination circuit 4 looks at the upper three digits of the operation result of the redundant binary adder/subtractor 3 in the previous stage and determines the operation at that stage and the value of the quotient digit. When the quotient corresponding to all n stages and the operation result of the redundant binary adder/subtractor 3 of the (n+1)th stage are obtained, the quotient and remainder of the redundant binary representation are obtained as the calculation result. The quotient of the redundant binary representation is converted into a quotient converter 5, and the remainder is converted into a two's complement representation number by a remainder converter 6. In this embodiment, the quotient converter 5 also corrects the sign of the quotient.

これは、先に除数の絶苅値をとったため、除数が負の場
合に商の符号が反転してしまうためである。よって、除
数が負の場合は商の符号を反転させればよい。これは商
変換器5において冗長2進表現の商を2の補数表現数へ
変換するときに行う減算で、被減数と減数を交換するこ
とにより実現できる。商変換器5における商変換のアル
ゴリズムを、表12に掲げる。
This is because the absolute value of the divisor is taken first, so if the divisor is negative, the sign of the quotient will be reversed. Therefore, if the divisor is negative, the sign of the quotient can be inverted. This is a subtraction performed when the quotient in redundant binary representation is converted into a two's complement representation in the quotient converter 5, and can be realized by exchanging the minuend and the subtrahend. Table 12 lists the algorithm for quotient conversion in the quotient converter 5.

以上で述べた処理の内容と商決定用回路における演算と
商決定のアルゴリスムを下のようにまと32 める。
The contents of the processing described above, the calculations in the quotient determining circuit, and the algorithm for determining the quotient are summarized as follows32.

く第2の実施例の除算アルゴリズム〉 ステソプ1 [Rfill コSD2   =   [X]2CH 
Y>O then [D]SD2    ’−    [:’Y コ2ce
lse [DコSD2   ←  [Y]2C ステップ2 1   1 f  [ r9 +21  .r,  (
l!+p2 (9)  コSD2   く  0[q@
コSD2   ”    O  If  [rl]”’
.r+ L″’l’2IQ’]sn2 ”  OI  
If  [p,ll.r,fll)r2([ll コS
D2  〉0[R【L)コSD2  ”  [R”’]
S[+2  −  [qlllsn2X [D+IコS
D2ステップ3 for  j::1  to  n 1  If  [r2f1+ .r+”r2”:]sn
2<  0[qj]so2 :=   O  If  
[r2”.r1(”r2” コSD2  ”  OI 
 If [r8(1.,%jl r2i11 コSD2
  〉0[11if1411 コsn2:=2X[R”
]sn2−[qjコso2X [:D+1コSD2en
d ステップ4 Q   :   ”    [q[1.Ql  q2 
 ゜−QnコSD2If  Y>O  then [Z コ2c ←   [Q コSD2else [Z コ2c’−[QコSD2 [R]2C =   [R”’コSD2ここで、YはY
の1の補数、即ち各桁のビットを反転させた数値を示す
。修正されたステップ2を表11に、第2の実施例の商
変換器の動作表を表12に掲げる。
Division algorithm of the second embodiment> Step 1 [Rfill SD2 = [X]2CH
Y>O then [D]SD2'- [:'Y ko2ce
lse [DkoSD2 ← [Y]2C Step 2 1 1 f [ r9 +21 . r, (
l! +p2 (9) koSD2 ku 0[q@
koSD2 ” O If [rl]”'
.. r+ L'''l'2IQ']sn2'' OI
If [p,ll. r, flll) r2([ll koS
D2〉0[R[L]koSD2 ” [R”']
S[+2 − [qlllsn2X [D+IkoS
D2 Step 3 for j::1 to n 1 If [r2f1+ . r+"r2":]sn
2< 0[qj]so2 := O If
[r2”.r1(”r2” KoSD2” OI
If [r8(1.,%jl r2i11 koSD2
〉0[11if1411 cosn2:=2X[R”
]sn2-[qjkoso2X [:D+1koSD2en
d Step 4 Q: ” [q[1.Ql q2
゜-QnkoSD2If Y>O then [Z ko2c ← [QkoSD2else [Z ko2c'-[QkoSD2 [R]2C = [R'''koSD2 Here, Y is Y
It shows the one's complement of , that is, the numerical value with the bits of each digit inverted. The modified step 2 is listed in Table 11, and the operation table of the quotient converter of the second embodiment is listed in Table 12.

begin 表9. 表10. 注1)各欄は(伝達ディジット,中間和)の組合せで記
されている。
begin Table 9. Table 10. Note 1) Each column is written as a combination of (transmitted digit, intermediate sum).

注2)第2図の各冗長2進加減算器のLSB(右端、同
図中剥線を付した口で示す)の冗長2進加減算器セルに
適用する。他のセルは(同図中斜線のない口で示す)従
来の除算器と同じ。
Note 2) Applies to the redundant binary adder/subtractor cell of each redundant binary adder/subtractor in Figure 2, LSB (right end, indicated by the opening with a broken line in the figure). The other cells (indicated by openings without diagonal lines in the figure) are the same as conventional dividers.

注3)+Oは除数が正の場合、+1は除数が負の場合を
示す。
Note 3) +O indicates that the divisor is positive, and +1 indicates that the divisor is negative.

35 注1)各欄は(伝達ディジット,中間差)の組合せで記
されている。
35 Note 1) Each column is written as a combination of (transmission digit, intermediate difference).

注2)第2図の各冗長2進加減算器のLSB (右端、
同図中斜線をイリした口で示す)の冗長2進加減算器セ
ルに適用する。他のセルは(同図中斜線のない口で示す
)従来の除算器と同じ。
Note 2) LSB of each redundant binary adder/subtractor in Figure 2 (right end,
This is applied to the redundant binary adder/subtractor cells (indicated by diagonally hatched openings in the figure). The other cells (indicated by openings without diagonal lines in the figure) are the same as conventional dividers.

注3)+Oは除数が正の場合、+1は除数が負の場合を
示す。
Note 3) +O indicates that the divisor is positive, and +1 indicates that the divisor is negative.

36 表11. 数として2の補数表現数を直接演算することが可能とな
る。更に除数についても負の数を演算することができる
ので、本実施例の除算を行う前処理としては、除数を本
実施例の除算器へ入力される前に正規化するだけで済む
という効果を有する。
36 Table 11. It becomes possible to directly calculate a two's complement representation number as a number. Furthermore, since negative numbers can be calculated for the divisor, the preprocessing for the division of this embodiment has the effect that it is only necessary to normalize the divisor before inputting it to the divider of this embodiment. have

また本実施例の除算器では被除数のビッ1・長は2nだ
から、整数除算の内、 表12. (2nビット)÷(nビット) =(nビッ1・)  余り(nビット)のような倍鞘度
の除算を行っていることになる。
In addition, in the divider of this embodiment, the bit 1/length of the dividend is 2n, so Table 12. (2n bits) ÷ (n bits) = (n bits 1.) This means that a multiplier division is performed, such as the remainder (n bits).

上記第1,2の実施例で演算結果の剰余の符号を問わな
いのは、除算器を含む演算処理装置全体の規格の都合に
よりそれが左右されることが多いからである。
The reason why the sign of the remainder of the operation result is not concerned in the first and second embodiments is that it often depends on the standard of the entire arithmetic processing device including the divider.

以−1二のように第1,2の実施例によれば、被除単精
度除算 (nビット)÷(nビット) =(nビット) 余り(nビット) を行う場合、単にnビッl・の被除数を2nビットに符
号拡張すればよい。
According to the first and second embodiments as shown in 12 below, when performing dividend single-precision division (n bits) ÷ (n bits) = (n bits) remainder (n bits), simply divide n bits. It is sufficient to sign-extend the dividend to 2n bits.

第3の実施例は本発明において請求項3記載の除算器の
構成例である。
The third embodiment is an example of the structure of the divider according to claim 3 of the present invention.

第3図は同実施例における除算器のブロック構成図であ
る。同図において、8は除数の正規化器、9は第1の実
施例の除算器、10は商バレルシフタ、11は剰余バレ
ルシフタである。正規化器8は例えば、除数のMSBの
右隣のビッi・から右向きに探索して最初にMSBと異
なるビッ1・の位置を見つけるプライオリティエンコー
ダと、それにより数えたビット数分だけ除数を左ヘシフ
トするバレルシフタより構成される。
FIG. 3 is a block diagram of the divider in the same embodiment. In the figure, 8 is a divisor normalizer, 9 is a divider of the first embodiment, 10 is a quotient barrel shifter, and 11 is a remainder barrel shifter. The normalizer 8 includes, for example, a priority encoder that searches rightward from bit i to the right of the MSB of the divisor to first find the position of bit 1 that is different from the MSB, and a priority encoder that moves the divisor to the left by the number of bits counted. Consists of a barrel shifter that shifts to

第3の実施例の除算器の原理は第1の実施例と同じであ
る。以下に第3の実施例の動作を説明する。
The principle of the divider of the third embodiment is the same as that of the first embodiment. The operation of the third embodiment will be explained below.

(1)除数Yを正規化する。(1) Normalize the divisor Y.

(2)第1の実施例による除算を実行し、仮の商Zと仮
の剰余Rを求める。
(2) Execute the division according to the first embodiment and obtain a provisional quotient Z and a provisional remainder R.

(3)得られた商2の小数点を正しい位置まで移動する
。除数Yを正規化したときのシフト数より商の小数点の
移動量、即ちシフト数を求39 める。
(3) Move the decimal point of the obtained quotient 2 to the correct position. The amount of movement of the quotient decimal point, ie, the shift number, is determined from the shift number when the divisor Y is normalized.

(4)得られた剰余Rの小数点を正しい位置まで移動す
る。このときのシフト数は(3)のそれと同じである。
(4) Move the decimal point of the obtained remainder R to the correct position. The number of shifts at this time is the same as that in (3).

上記のようにして第1の実施例の除算器による除算の前
処理として除数を疋規化し、後処理として商と剰余を補
正することにより、任意の2の補数表示数を除数として
許している。第6図に本実施例における除算ステップの
動作の流れを説明する流れ図を掲げる。
As described above, by normalizing the divisor as a preprocessing of the division by the divider of the first embodiment and correcting the quotient and remainder as a postprocessing, any two's complement number can be used as a divisor. . FIG. 6 is a flowchart illustrating the operation flow of the division step in this embodiment.

第4の実施例は本発明において請求項4記載の除算器の
構成例である。第4図は同実施例における除算器のブロ
ック構成図である。同図において、7はIの補数器、8
は正規化器、1oは商バレルシフタ、11は剰余バレル
シフタ、12は第2の実施例の除算器から1の補数器を
除いた除算器である。正規化器8は例えば、除数のMS
Bの右隣のビットから右向きに探索して最初にMSBと
異なるビットの位置を見つけるプライオリティエン40
− コーダと、それにより数えたビット数分だけ除数を左へ
シフトするバレルシフタより構成される。
The fourth embodiment is an example of the structure of the divider according to claim 4 of the present invention. FIG. 4 is a block diagram of the divider in the same embodiment. In the same figure, 7 is the complement of I, 8
is a normalizer, 1o is a quotient barrel shifter, 11 is a remainder barrel shifter, and 12 is a divider obtained by removing the 1's complement from the divider of the second embodiment. The normalizer 8, for example, uses the MS of the divisor
Priority encoder 40 that searches rightward from the bit to the right of B and first finds the position of the bit different from the MSB.
- Consists of a coder and a barrel shifter that shifts the divisor to the left by the number of bits counted by the coder.

第4の実施例の除算器の原理は第2の実施例と同じであ
る。以下に第4の実施例の動作を説明する。
The principle of the divider in the fourth embodiment is the same as in the second embodiment. The operation of the fourth embodiment will be explained below.

(1)除数Yがもし負の場合、Yの1のネ111数をと
る。
(1) If the divisor Y is negative, take the number 1 of Y.

(2)除数Yを正規化する。(2) Normalize the divisor Y.

(3)第2の実施例に従った除算を実行し(但しYの1
の補数をとることは除<)、仮の商Zと仮の剰余Rを求
める。
(3) Execute the division according to the second embodiment (however, 1 of Y
To take the complement of , divide <) and find a provisional quotient Z and a provisional remainder R.

(4)得られた商2の小数点を正しい位置まで移動する
。除数Yを正規化したときのシフト数より商の小数点の
移動量、即ちシフト数を求める。同時に除数Yが負の場
合、商Zの符号を反転させる。
(4) Move the decimal point of the obtained quotient 2 to the correct position. The amount of movement of the quotient decimal point, that is, the shift number, is determined from the shift number when the divisor Y is normalized. At the same time, if the divisor Y is negative, the sign of the quotient Z is inverted.

(5)得られた剰余Rの小数点を正しい位置まで移動す
る。このときのシフト数は(4)のそれと同じである。
(5) Move the decimal point of the obtained remainder R to the correct position. The number of shifts at this time is the same as that in (4).

上記のようにして第2の実施例の除算器による除算の前
後において除数を補正することにより、任意の2の補数
表示数を除数として許している。
By correcting the divisor before and after the division by the divider of the second embodiment as described above, any two's complement number can be used as the divisor.

第7図に本実施例における除算ステップの動作の流れを
説明する流れ図を掲げる。
FIG. 7 is a flowchart illustrating the operation flow of the division step in this embodiment.

以上説明したように、第3,4の実施例の除算器により
符号なし2進数及び2の補数表示数、正規化数及び非正
規化数、倍精度整数及び単精度整数のいずれの数表現に
上る除算も可能となる。第3,4の実施例の除算器が例
えば演算処理装置の一部として組み込まれた場合、整数
の除算器及び浮動小数点演算器の仮数部の除算器の両方
の働きをさせることができる。従って、ほとんどハード
ウェア量を増加させるこどなく、整数除算と浮動小数点
除算の両方を高速化することが可能である。
As explained above, the dividers of the third and fourth embodiments can be used to express numbers in unsigned binary numbers, two's complement numbers, normalized numbers, denormalized numbers, double-precision integers, and single-precision integers. Upward division is also possible. When the divider of the third and fourth embodiments is incorporated, for example, as part of an arithmetic processing unit, it can function as both an integer divider and a mantissa divider of a floating-point arithmetic unit. Therefore, it is possible to speed up both integer division and floating point division with almost no increase in the amount of hardware.

なおこの実現方法の場合、第1,2の実施例の除算器に
刻する除数入力を正規化器と既に正規化された仮数のい
ずれかから選択できるようにして仮数が疋現化器を通ら
ないよ・うにすることにより、表13. 注)○は、演算数としてその除算器へ入力し正しく演算
することができることを表す。
In addition, in the case of this implementation method, the divisor input to the divider of the first and second embodiments can be selected from either the normalizer or the already normalized mantissa, so that the mantissa does not pass through the transformer. Table 13. Note: ○ indicates that the number can be input to the divider as an arithmetic number and calculated correctly.

×は、演算数としてその除算器へ入力することができな
いことを表す。
× indicates that it cannot be input to the divider as an arithmetic number.

−43 浮動小数点除算の実行時間を更に高速化することもでき
る。
−43 It is also possible to further speed up the execution time of floating point division.

表13に4つの実施例により取り扱える演算数の範囲の
拡張に関する効果をまとめた。
Table 13 summarizes the effects of expanding the range of operable numbers handled by the four embodiments.

発明の効果 以」二説明したように、本発明は除算の各ステップにお
けるアルゴリズムを改良し、かつ一部の冗長2進加減算
器の計算規則を拡張することにより、直接2の補数表示
数同士の除算をすべてハードウェアにより高速に計算す
ることを可能にするという効果を有する。従来のセル配
列構造の除算器で直接2の補数表示数同士の除算を行え
るよ・うにハードウェアを付加した場合と比較して、本
発明は大幅なハードウェア量の削減と演算の高速化が可
能になる。
Effects of the Invention As explained in 2, the present invention improves the algorithm in each step of division and expands the calculation rules of some redundant binary adders/subtractors to directly convert numbers in two's complement representation. This has the effect of allowing all divisions to be calculated quickly by hardware. Compared to a conventional divider with a cell array structure in which hardware is added to directly perform division between two's complement numbers, the present invention significantly reduces the amount of hardware and speeds up calculations. It becomes possible.

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

第1図は本発明の第1の実施例における除算器のブロッ
ク図、第2図は本発明の第2の実施例における除算器の
ブロック図、第3図は本発明の第3の実施例における除
算器のブロック図、第4図44一 は本発明の第4の実施例における除算器のブロック図、
第5図は従来の除算器のブロック図、第6図は本発明の
第3の実施例における除算ステップの動作の流れを示す
流れ図、第7図は本発明の第4の実施例における除算ス
テップの動作の流れを示す流れ図である。
FIG. 1 is a block diagram of a divider in a first embodiment of the present invention, FIG. 2 is a block diagram of a divider in a second embodiment of the present invention, and FIG. 3 is a block diagram of a divider in a third embodiment of the present invention. FIG. 4 is a block diagram of a divider in the fourth embodiment of the present invention,
FIG. 5 is a block diagram of a conventional divider, FIG. 6 is a flowchart showing the operation flow of the division step in the third embodiment of the present invention, and FIG. 7 is the division step in the fourth embodiment of the present invention. 2 is a flowchart showing the flow of the operation.

Claims (4)

【特許請求の範囲】[Claims] (1)nを除数のビット長として、正または負の2の補
数表現の被除数を基数が2で各桁が{−1、0、1}の
いずれかの要素で表される冗長性を持った符号付きディ
ジット数(以下冗長2進数と呼ぶ)へ変換する被除数変
換器と、絶対値を1/2から1の間に納められた(以下
正規化されたと略す)2の補数表現の正または負の除数
を冗長2進数へ変換する除数変換器と、冗長2進表現さ
れた加数あるいは減数の最上位ビット(以下MSBと略
す)に対して3値{−1、0、1}をとることを許し加
数あるいは減数のMSB以外の各桁の取り得る値を2値
{0、1}のみに限定すると共に前記被除数変換器から
出力された冗長2進数と前記除数変換器から出力された
冗長2進数との間で加減算を行う初段の冗長2進加減算
器と、冗長2進表現された加数あるいは減数のMSBに
対して3値{−1、0、1}をとることを許し加数ある
いは減数のMSB以外の各桁の取り得る値を2値{0、
1}のみに限定すると共に前記除数変換器から出力され
た冗長2進数と前段の冗長2進加減算器からの出力を左
へ1ビットシフトした冗長2進数との間で加減算を行う
冗長2進加減算器を前記初段の冗長2進加減算器の後に
n段積み重ねた冗長2進加減算器配列と、被除数の値も
しくは前段の前記冗長2進加減算器の演算結果及び除数
の符号より対応する段の冗長2進加減算器において加算
もしくは減算のいずれの演算を行うべきかを決定すると
共にその段に対応する商の桁を決定する商決定用回路と
、各段における前記商決定用回路により決定された商の
各桁を合わせた冗長2進表現の商を2の補数表現数へ変
換する商変換器と、最終段の前記冗長2進加減算器の演
算結果である冗長2進数を2の補数表現数へ変換する剰
余変換器とを備え、前記商決定用回路において、除数が
正であるとき、初段の前記冗長2進加減算器では被除数
の上位3ビット、また初段より後の前記冗長2進加減算
器では前段の冗長2進加減算器の演算結果の上位3ビッ
ト(以下甲と略す)が負なら−1、0なら0、正なら1
を対応する商の桁の値とし、除数が負であるとき、甲が
負なら1、0なら0、正なら−1を対応する商の桁の値
とする判断を行うことを特徴とする除算器。
(1) Where n is the bit length of the divisor, the dividend in positive or negative two's complement representation has a base of 2 and each digit has redundancy represented by one of the elements {-1, 0, 1}. A dividend converter that converts the signed digit number (hereinafter referred to as redundant binary number) to a signed digit number (hereinafter referred to as redundant binary number), and a positive or A divisor converter that converts a negative divisor into a redundant binary number, and a ternary value {-1, 0, 1} for the most significant bit (hereinafter abbreviated as MSB) of an addend or subtractor expressed in redundant binary. The possible values of each digit other than the MSB of the addend or subtractor are limited to only binary {0, 1}, and the redundant binary number output from the dividend converter and the redundant binary number output from the divisor converter are The first-stage redundant binary adder/subtractor performs addition and subtraction with redundant binary numbers, and the adder allows the MSB of the addend or subtractor expressed in redundant binary to take ternary values {-1, 0, 1}. The possible values of each digit other than the MSB of a number or subtrahend are expressed as binary {0,
1} and performs addition and subtraction between the redundant binary number output from the divisor converter and the redundant binary number obtained by shifting the output from the redundant binary adder/subtracter in the preceding stage by one bit to the left. A redundant binary adder/subtractor array in which n stages are stacked after the redundant binary adder/subtractor in the first stage, and a redundant 2 in the corresponding stage based on the value of the dividend or the operation result of the redundant binary adder/subtracter in the previous stage and the sign of the divisor. a quotient determination circuit that determines whether addition or subtraction should be performed in the base adder/subtractor and determines the digit of the quotient corresponding to that stage; and a quotient determination circuit that determines the quotient digit corresponding to that stage; A quotient converter that converts the quotient of the redundant binary representation of each digit into a two's complement representation number, and a redundant binary number that is the operation result of the redundant binary adder/subtractor in the final stage is converted into a two's complement representation number. In the quotient determination circuit, when the divisor is positive, the first-stage redundant binary adder/subtractor converts the upper three bits of the dividend, and the redundant binary adder/subtractor after the first stage converts the upper three bits of the dividend to the first stage. If the upper 3 bits (hereinafter referred to as A) of the operation result of the redundant binary adder/subtractor are negative, -1, 0 if 0, and 1 if positive.
is the value of the corresponding quotient digit, and when the divisor is negative, it is determined that if A is negative, 1 is 0, if it is positive, -1 is the value of the corresponding quotient digit. vessel.
(2)2の補数表現の正規化された除数が負のときに除
数の1の補数をとり負でないときに除数の値を素通りさ
せる1の補数器と、2の補数表現の正または負の被除数
を冗長2進数へ変換する被除数変換器と、前記1の補数
器からの出力を冗長2進数へ変換する除数変換器と、冗
長2進表現された加数あるいは減数の全桁の取り得る値
を2値{0、1}のみに限定すると共に前記被除数変換
器から出力された冗長2進数と前記除数変換器から出力
され更に除数が負のときに1を加えられた冗長2進数と
の間で加減算を行う初段の冗長2進加減算器と、冗長2
進表現された加数あるいは減数の全桁の取り得る値を2
値{0、1}のみに限定すると共に前段の冗長2進加減
算器からの出力を左へ1ビットシフトした冗長2進数と
前記除数変換器から出力され更に除数が負のときに1を
加えられた冗長2進数との間で加減算を行う冗長2進加
減算器を前記初段の冗長2進加減算器の後にn段積み重
ねた冗長2進加減算器配列と、被除数の値もしくは前記
前段の冗長2進加減算器の演算結果より対応する段の冗
長2進加減算器において加算もしくは減算のいずれの演
算を行うべきかを決定すると共にその段に対応する商の
桁を決定する商決定用回路と、各段における前記商決定
用回路により決定された商の各桁を合わせて冗長2進表
現の商とし且つ除数が負の場合にこの商の符号を反転し
且つ冗長2進表現の商を2の補数表現数へ変換する商変
換器と、最終段の前記冗長2進加減算器の演算結果であ
る冗長2進数を2の補数表現数へ変換する剰余変換器と
を備え、前記商決定用回路において、甲が負なら−1、
0なら0、正なら1を対応する商の桁の値とする判断を
行うことを特徴とする除算器。
(2) A 1's complementer that takes the 1's complement of the divisor when the normalized divisor in the 2's complement representation is negative and passes the divisor value directly when it is not negative; a dividend converter that converts the dividend into a redundant binary number; a divisor converter that converts the output from the one's complementer into a redundant binary number; and possible values of all digits of the addend or subtractive expressed in redundant binary. between the redundant binary number output from the dividend converter and the redundant binary number output from the divisor converter and to which 1 is added when the divisor is negative. The redundant binary adder/subtractor in the first stage performs addition and subtraction in
The possible values of all digits of the addend or subtractive expressed in decimal are 2
It is limited to only values {0, 1}, and a redundant binary number is obtained by shifting the output from the redundant binary adder/subtracter in the previous stage by 1 bit to the left, and the redundant binary number output from the divisor converter and further adding 1 when the divisor is negative. a redundant binary adder/subtractor array in which n stages of redundant binary adders/subtracters are stacked after the redundant binary adder/subtractor in the first stage, and a redundant binary adder/subtracter array that performs addition/subtraction with the redundant binary numbers obtained by adding or subtracting the value of the dividend or the redundant binary adder/subtracter in the previous stage; a quotient determination circuit that determines whether addition or subtraction should be performed in the redundant binary adder/subtractor of the corresponding stage based on the operation result of the unit, and also determines the digit of the quotient corresponding to that stage; The digits of the quotient determined by the quotient determination circuit are combined to form a quotient in redundant binary representation, and when the divisor is negative, the sign of this quotient is inverted, and the quotient in redundant binary representation is converted into a two's complement representation number. and a remainder converter that converts the redundant binary number, which is the operation result of the redundant binary adder/subtracter at the final stage, into a two's complement representation number, in the quotient determining circuit, -1 if negative;
A divider characterized in that it determines that the value of the corresponding quotient digit is 0 if it is 0, and 1 if it is positive.
(3)正または負の2の補数表現の除数を左もしくは右
へシフトすることにより正規化しその値を除数変換器に
対する入力とすると共にそのときにシフトしたビット数
を数える正規化器と、前記正規化器で数えたシフト数の
分だけしかも前記正規化器でシフトした方向とは逆向き
に商変換器の出力をシフトする商バレルシフタと、前記
正規化器で数えたシフト数の分だけしかも前記正規化器
でシフトした方向とは逆向きに剰余変換器の出力をシフ
トする剰余バレルシフタとを備えた請求項1記載の除算
器。
(3) a normalizer that normalizes the divisor in positive or negative two's complement representation by shifting it to the left or right, inputs the resulting value to the divisor converter, and counts the number of bits shifted at that time; a quotient barrel shifter that shifts the output of the quotient converter by the number of shifts counted by the normalizer and in the opposite direction to the direction shifted by the normalizer; 2. The divider according to claim 1, further comprising a remainder barrel shifter that shifts the output of the remainder converter in a direction opposite to the direction in which the output is shifted by the normalizer.
(4)1の補数器の出力を左もしくは右へシフトするこ
とにより正規化しその値を除数変換器に対する入力とす
ると共にそのときにシフトしたビット数を数える正規化
器と、前記正規化器で数えたシフト数の分だけしかも前
記正規化器でシフトした方向とは逆向きに商変換器の出
力をシフトする商バレルシフタと、前記正規化器で数え
たシフト数の分だけしかも前記正規化器でシフトした方
向とは逆向きに剰余変換器の出力をシフトする剰余バレ
ルシフタとを備えた請求項2記載の除算器。
(4) a normalizer that normalizes the output of the 1's complementer by shifting it to the left or right, inputs the resulting value to the divisor converter, and counts the number of bits shifted at that time; a quotient barrel shifter that shifts the output of the quotient converter by the number of shifts counted and in the opposite direction to the direction shifted by the normalizer; and the normalizer by the number of shifts counted by the normalizer. 3. The divider according to claim 2, further comprising a remainder barrel shifter for shifting the output of the remainder converter in a direction opposite to the direction in which the output of the remainder converter is shifted.
JP1241260A 1989-09-18 1989-09-18 Divider Expired - Fee Related JPH0778724B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1241260A JPH0778724B2 (en) 1989-09-18 1989-09-18 Divider

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1241260A JPH0778724B2 (en) 1989-09-18 1989-09-18 Divider

Publications (2)

Publication Number Publication Date
JPH03102519A true JPH03102519A (en) 1991-04-26
JPH0778724B2 JPH0778724B2 (en) 1995-08-23

Family

ID=17071602

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1241260A Expired - Fee Related JPH0778724B2 (en) 1989-09-18 1989-09-18 Divider

Country Status (1)

Country Link
JP (1) JPH0778724B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546363A (en) * 1991-08-08 1993-02-26 Mitsubishi Electric Corp Divider
US5467299A (en) * 1993-03-30 1995-11-14 Mitsubishi Denki Kabushiki Kaisha Divider and microcomputer including the same
JP2006218251A (en) * 2005-02-08 2006-08-24 Toyo Seimitsu Kogyo Kk Photograph stand

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546363A (en) * 1991-08-08 1993-02-26 Mitsubishi Electric Corp Divider
US5467299A (en) * 1993-03-30 1995-11-14 Mitsubishi Denki Kabushiki Kaisha Divider and microcomputer including the same
JP2006218251A (en) * 2005-02-08 2006-08-24 Toyo Seimitsu Kogyo Kk Photograph stand

Also Published As

Publication number Publication date
JPH0778724B2 (en) 1995-08-23

Similar Documents

Publication Publication Date Title
JP4388543B2 (en) 3-input floating-point adder / subtracter
US5148386A (en) Adder-subtracter for signed absolute values
KR100465371B1 (en) apparatus and method for design of the floating point ALU performing addition and round operations in parallel
JPH04290122A (en) Numerical expression conversion device
JPH09212337A (en) Floating-point arithmetic processor
US5282156A (en) Leading one anticipator and floating point addition/subtraction apparatus employing same
JPH0687218B2 (en) Floating-point arithmetic processing device and divisor multiple generation device
US6598065B1 (en) Method for achieving correctly rounded quotients in algorithms based on fused multiply-accumulate without requiring the intermediate calculation of a correctly rounded reciprocal
JPH03102519A (en) Divider
KR920003493B1 (en) Operation circuit based on floating-point representation
JP2558669B2 (en) Floating point arithmetic unit
US6571264B1 (en) Floating-point arithmetic device
San et al. Hardware implementation of floating-point operating devices by using IEEE-754 binary arithmetic standard
JP4439060B2 (en) Floating point adder
JP2507183B2 (en) Floating point addition / subtraction unit
JPH086766A (en) Sine and cosine arithmetic device
JPS6022371B2 (en) Digital differential analyzer
JPS63158626A (en) Arithmetic processing unit
JPH0216632A (en) Fixed point number/floating point number converting circuit
JP2537876B2 (en) Rounding circuit
JP2622012B2 (en) Shift circuit
JPH0814790B2 (en) Processor
JPH01232430A (en) Arithmetic circuit
JP3100868B2 (en) Arithmetic unit for floating point numbers
JPH0552532B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees