JP2504153B2 - Signed digit number sign judgment circuit - Google Patents

Signed digit number sign judgment circuit

Info

Publication number
JP2504153B2
JP2504153B2 JP1001841A JP184189A JP2504153B2 JP 2504153 B2 JP2504153 B2 JP 2504153B2 JP 1001841 A JP1001841 A JP 1001841A JP 184189 A JP184189 A JP 184189A JP 2504153 B2 JP2504153 B2 JP 2504153B2
Authority
JP
Japan
Prior art keywords
circuit
bit
control signal
switching control
switch means
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1001841A
Other languages
Japanese (ja)
Other versions
JPH02181820A (en
Inventor
順一 後藤
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 JP1001841A priority Critical patent/JP2504153B2/en
Publication of JPH02181820A publication Critical patent/JPH02181820A/en
Application granted granted Critical
Publication of JP2504153B2 publication Critical patent/JP2504153B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ディジタル演算器に用いる符号付きディジ
ット数正負判定回路に関する。
The present invention relates to a signed digit number positive / negative determination circuit used in a digital calculator.

〔従来の技術〕[Conventional technology]

符号付きディジット数は、各桁が2のべき乗の重みを
持ち、−1、0、+1のいづれかの値を取るような数表
現である。例えば、4桁の符号付きディジット数(0、
−1、0、+1)の値は0×23+(−1)×23+0×21
+(+1)×23=−3であり、同様に(0,+1,−1,−
1)の値は、0×23+(+1)×22+(−1)×21
(−1)×23=1である。これらの例からもわかるよう
に、符号付きディジット数の正負は、最も上位に位置す
る非零の桁が−1か+1かによって、負であるか正であ
るかが決定される。このように符号付きディジット数
は、2補数表示2進数のように特定のビット(最上位ビ
ット)により正負を判定することができない。
The number of digits with a sign is a number expression in which each digit has a weight of a power of 2 and takes any one of -1, 0, and +1. For example, a 4-digit signed digit number (0,
The value of -1, 0, +1) is 0x2 3 + (-1) x2 3 + 0x2 1
+ (+ 1) × 2 3 = −3, and similarly (0, + 1, −1, −
The value of 1) is 0 × 2 3 + (+ 1) × 2 2 + (− 1) × 2 1 +
(−1) × 2 3 = 1. As can be seen from these examples, whether the signed digit number is positive or negative is determined to be negative or positive depending on whether the most significant non-zero digit is -1 or +1. As described above, the signed digit number cannot be determined as positive or negative by a specific bit (most significant bit) like a two's complement binary number.

従って従来、符号付きディジット数の正負判定は、第
5図に示す例のように、+1になっている桁だけが1で
ある2進数と、−1になっている桁だけが1である2進
数との減算を行って、通常の2補数表示2進数に変換す
ることで正負を判定していた。2進数の減算は、公知の
通り2補数の加算によって実現できる。すなわち、符号
付きディジット数から2補数表示2進数への変換は、加
算回路を用いることにより実現できる。
Therefore, conventionally, the positive / negative determination of the number of signed digits is, as in the example shown in FIG. 5, a binary number in which only the digit that is +1 is 1 and a digit in which only the digit that is -1 is 1. Significance was determined by performing subtraction with a base number and converting into a normal two's complement display binary number. The binary subtraction can be realized by addition of 2's complement as is well known. That is, the conversion from a signed digit number to a two's complement binary number can be realized by using an adder circuit.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

この従来の方法では、符号付きディジット数から2補
数表示2進数への変換に加算回路を必要とするため、ハ
ードウェア量が大きくなってしまう。
In this conventional method, an addition circuit is required to convert a signed digit number into a two's complement display binary number, resulting in a large amount of hardware.

本発明の目的は、スイッチ手段と遅延手段からなる簡
単な単位回路の繰り返し構造により構成される符号付き
ディジット数正負判定回路を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a signed digit number positive / negative determination circuit configured by a simple unit circuit repeating structure composed of a switch means and a delay means.

〔課題を解決するための手段〕[Means for solving the problem]

本発明の構成は、n(nは正整数)ビットレジスタ
と、このnビットレジスタの各ビット出力を入力するよ
うに接続されたn個のスイッチ手段と、このスイッチ手
段の各出力を入力する論理和手段を有し、前記n個のス
イッチ手段の隣合うもの同士のスイッチング制御信号端
子からなるn−1組のスイッチング制御信号端子対の各
々を遅延手段にて接続し、かつ前記n−1組の各スイッ
チング制御信号端子の2個のスイッチング制御信号端子
の内、前記nビットレジスタのより上位のビット出力に
接続されたスイッチ手段のスイッチング制御信号端子の
方が、前記各々の遅延手段の入力に接続されることによ
り得られる第1の回路と、この第1の回路に等しい第2
の回路とを含んで構成されることを特徴とする。
According to the configuration of the present invention, an n (n is a positive integer) bit register, n switch means connected to input each bit output of the n bit register, and a logic for inputting each output of the switch means. Summing means, each of the n-1 sets of switching control signal terminal pairs consisting of switching control signal terminals of adjacent ones of the n switch means are connected by delay means, and the n-1 sets Of the two switching control signal terminals of each of the switching control signal terminals, the switching control signal terminal of the switch means connected to the higher-order bit output of the n-bit register is input to the respective delay means. A first circuit obtained by being connected, and a second circuit which is equal to the first circuit.
And a circuit of.

〔作用〕[Action]

第1の回路および第2の回路のnビットレジスタの同
位のビット対によって符号付きディジット数の1桁を表
現するものとする。例えば、符号付きディジット数の各
桁の−1、0、+1を各々、(1、0)、(0、0)、
(0、1)で表現する。ここで、括弧内第1、第2のビ
ットは、各々第1の回路、第2の回路のnビットレジス
タが保持するビットとする。
It is assumed that one digit of the number of signed digits is represented by the same bit pair of the n-bit registers of the first circuit and the second circuit. For example, -1, 0, +1 of each digit of the number of signed digits is (1, 0), (0, 0),
Expressed as (0, 1). Here, the first and second bits in parentheses are bits held by the n-bit registers of the first circuit and the second circuit, respectively.

この2個のnビットレジスタのビットを、遅延手段と
スイッチ手段により、最上位ビットから順次かつ同位ビ
ットに対して同時に読み出して行く。すると、より上位
に非零のビットを有するnビットレジスタが属する回路
の論理和手段の出力が、他の論理和手段の出力よりも先
に1になる。これを検出することで、そのビット対が
(1、0)、(0、1)のどちらであるか、つまり符号
付きディジット数としては、最上位の非零の桁が−1で
あるか+1であるかが判定可能となる。
The bits of these two n-bit registers are sequentially read from the most significant bit and simultaneously with respect to the same bit by the delay means and the switch means. Then, the output of the logical sum means of the circuit to which the n-bit register having the non-zero bit in the higher order belongs becomes 1 before the output of the other logical sum means. By detecting this, it is determined whether the bit pair is (1, 0) or (0, 1), that is, as the number of signed digits, the highest non-zero digit is -1 or +1. Can be determined.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明す
る。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.

第1図は、本発明の構成を示す一実施例のブロック図
である。遅延手段、スイッチ手段、論理和手段として具
体的な回路を用いた実施例を次に述べる。
FIG. 1 is a block diagram of an embodiment showing the configuration of the present invention. An embodiment using a concrete circuit as the delay means, the switch means, and the logical sum means will be described below.

第2図は、本発明の第1の実施例を示す回路図であ
る。本実施例では、n=8として、8ビットレジスタを
用いている。また特許請求の範囲の請求項に述べたスイ
ッチ手段としてANDゲート31〜38とANDゲート71〜78を、
遅延手段として直列に接続したインバータ対41〜47のイ
ンバータ対81〜87を、論理和手段として8入力のORゲー
ト21とORゲート61を用いている。
FIG. 2 is a circuit diagram showing the first embodiment of the present invention. In this embodiment, an 8-bit register is used with n = 8. Further, AND gates 31 to 38 and AND gates 71 to 78 are used as the switch means described in the claims of the claims.
Inverter pairs 81-87 of inverter pairs 41-47 connected in series are used as delay means, and 8-input OR gate 21 and OR gate 61 are used as OR means.

符号付きディジット数の−1、0、+1の各々をビッ
ト対として(1、0)、(0、0)、(0、1)で表現
する。ここで、括弧内第1のビットを、第2の第1の回
路1の8ビットレジスタ11の各ビットで表現し、括弧内
第2のビットを、同図の第2の回路2の8ビットレジス
タ51の各ビットで表現するものとする。例として、第1
の回路1の8ビットレジスタ11に、00101000が保持さ
れ、第2の回路2の8ビットレジスタ51に、00010101が
保持されている場合、すなわち、これら2個の8ビット
レジスタ対により保持される8桁の符号付きディジット
数が(0、0、−1、+1、−1、+1、0、+1)で
あり、10進数としての値が−19の場合を説明する。
Each of the signed digit numbers -1, 0, +1 is represented as a bit pair by (1, 0), (0, 0), (0, 1). Here, the first bit in the parentheses is represented by each bit of the 8-bit register 11 of the second first circuit 1, and the second bit in the parenthesis is the 8 bits of the second circuit 2 in FIG. It shall be expressed by each bit of the register 51. As an example, first
When 00101000 is held in the 8-bit register 11 of the circuit 1 and 00010101 is held in the 8-bit register 51 of the second circuit 2, that is, 8 bits are held by these two 8-bit register pairs. A case will be described in which the number of digits with signed digits is (0, 0, -1, +1, -1, +1, 0, +1) and the value as a decimal number is -19.

また、インバータ対41〜47およびインバータ対81〜87
の遅延時間をtpd1、ANDゲート31〜38およびANDゲート71
〜78の遅延時間をtpd2、ORゲート21およびORゲート61の
遅延時間をtpd3とし、時間t=0に、スイッチング制御
信号端子150にパルスを印加するものとする。
Also, inverter pair 41-47 and inverter pair 81-87
The delay time of t pd1 , AND gates 31-38 and AND gate 71
The delay time of ~ 78 is t pd2 , the delay time of the OR gate 21 and the OR gate 61 is t pd3, and a pulse is applied to the switching control signal terminal 150 at time t = 0.

第1の回路1においては、8ビットレジスタ11の最上
位ビットから3番目のビットに最上位の1がある。この
場合、スイッチング制御信号端子150に印加したパルス
が、上位2個のインバータ対47および46、左より3番目
のANDゲート36、ORゲート21を伝搬し、その出力が1と
なる。従って、その伝搬時間である2tpd1+tpd2+tpd3
の後、つまりt=t1=2tpd1+tpd2+tpd3でORゲート21
の出力が1となる。一方、第2の回路2においては、8
ビットレジスタ51の最上位ビットから4番目のビットに
最上位の1があるので、スイッチング制御信号端子150
に印加したパルスが、上位3個のインバータ対87、86お
よび85、左より4番目のANDゲート75、ORゲート61を伝
播し、その出力が1となる。従って、その伝搬時間であ
る3tpd1+tpd2+tpd3の後、つまりt=t2=3tpdn1+t
pd2+tpd3でORゲート21の出力が1となる。結果とし
て、第1の回路1のORゲート21の出力が第2の回路2の
ORゲート61の出力よりも、t2−t1=tpd1だけ早く1とな
る。以上より、より上位に最上位の1を有する8ビット
レジスタは、第1の回路1の8ビットレジスタ11であ
り、前記した符号付きディジット数の表現方法から、符
号付きディジット数としての最上位の非零は−1である
ことがわかる。つまり、この符号付きディジット数は負
であることが判定できる。
In the first circuit 1, the most significant 1 is located in the third bit from the most significant bit of the 8-bit register 11. In this case, the pulse applied to the switching control signal terminal 150 propagates through the upper two inverter pairs 47 and 46, the third AND gate 36 from the left, and the OR gate 21, and the output becomes 1. Therefore, its propagation time is 2t pd1 + t pd2 + t pd3
After, that is, t = t 1 = 2t pd1 + t pd2 + t pd3 , the OR gate 21
Output becomes 1. On the other hand, in the second circuit 2, 8
Since there is a most significant 1 from the most significant bit to the 4th bit of the bit register 51, the switching control signal terminal 150
Pulse propagates through the upper three inverter pairs 87, 86 and 85, the fourth AND gate 75 and OR gate 61 from the left, and the output becomes 1. Therefore, after the propagation time of 3t pd1 + t pd2 + t pd3 , that is, t = t 2 = 3t pdn1 + t
The output of the OR gate 21 becomes 1 when pd2 + tpd3 . As a result, the output of the OR gate 21 of the first circuit 1 becomes
It becomes 1 earlier than the output of the OR gate 61 by t 2 −t 1 = t pd 1. From the above, the 8-bit register having the most significant 1 at the higher order is the 8-bit register 11 of the first circuit 1, which is the most significant as the number of signed digits from the above-described representation method of the number of signed digits. It can be seen that non-zero is -1. That is, it can be determined that the number of signed digits is negative.

2個のORゲート21、61の出力のどちらが先に1になる
かを判定する回路、つまり2入力のどちらが先に1にな
るかを検出する回路の一例を次に説明する。
An example of a circuit for determining which of the two OR gates 21 and 61 outputs 1 first, that is, a circuit for detecting which of the two inputs becomes 1 will be described below.

第3図(a)は、2入力のどちらが先に1になるかを
検出する回路の回路図であり、第3図(b)は第3図
(a)に用いられている公知なRSフリップフロップの真
理値表である。
FIG. 3 (a) is a circuit diagram of a circuit for detecting which of the two inputs becomes 1 first, and FIG. 3 (b) is a known RS flip-flop used in FIG. 3 (a). It is a truth table of the type.

先ず、初期状態にするためにリセット端子209に1を
入力してRSフリップフロップ202、206のQ出力204、208
を0にリセットする。RSフリップフロップ202のS入力2
01とRSフリップフロップ206のS入力205で、前者に先に
1が入力されたとすると、そのQ出力204が1となる。R
Sフリップフロップ202のS入力201に遅れて、RSフリッ
プフロップ206のS入力205に1が入力されても、Q出力
204がORゲート207を通してRSフリップフロップ206のリ
セット端子に入力されるため、強制約にこれをリセット
する。結果として、RSフリップフロップ202のQ出力204
は1を保持し、RSフリップフロップ206のQ出力208は0
を保持することとなる。
First, 1 is input to the reset terminal 209 to enter the initial state and the Q outputs 204 and 208 of the RS flip-flops 202 and 206 are input.
Is reset to 0. S input 2 of RS flip-flop 202
Assuming that 01 is input to the former at 01 and the S input 205 of the RS flip-flop 206, the Q output 204 thereof becomes 1. R
Q output even if 1 is input to the S input 205 of the RS flip-flop 206 after the S input 201 of the S flip-flop 202
Since 204 is input to the reset terminal of the RS flip-flop 206 through the OR gate 207, it is forcibly reset. As a result, the Q output 204 of the RS flip-flop 202
Holds 1 and the Q output 208 of the RS flip-flop 206 is 0
Will be held.

第4図は、本発明の第2の実施例を示す回路図であ
る。本実施例では、n=8として、8ビットレジスタを
用いている。また、特許請求の範囲の請求項に述べたス
イッチ手段として、トランスファーゲート131〜138とト
ランスファーゲート171〜178を、遅延手段として直列に
接続したインバータ対141〜147とインバータ対181〜187
を、論理和手段とし、ワイヤードア121、161を用いてい
る。本実施例は、第2図に示した実施例と、スイッチ手
段と論理和手段の実施方法が異なるだけで、符号付きデ
ィジット数の正負判定の動作は第2図に示した実施例
と、同様である。
FIG. 4 is a circuit diagram showing a second embodiment of the present invention. In this embodiment, an 8-bit register is used with n = 8. Further, as the switch means described in the claims, the transfer gates 131 to 138 and the transfer gates 171 to 178 are connected in series as delay means to form an inverter pair 141 to 147 and an inverter pair 181-187.
Is used as the logical sum means, and the wire doors 121 and 161 are used. The present embodiment is different from the embodiment shown in FIG. 2 only in the method of implementing the switch means and the logical sum means, and the operation of determining the sign of the number of signed digits is the same as that of the embodiment shown in FIG. Is.

〔発明の効果〕〔The invention's effect〕

本発明は以上に説明したように、符号付きディジット
数を2補数表示2進数に変換することなく、その正負を
判定できる回路を提供する。しかも、スイッチ手段と遅
延手段とからなる簡単な単位回路を繰り返し接続するこ
とにより構成されるため、扱うべき符号付きディジット
数の桁数が変化しても、容易に回路の設計ができるとい
う効果を有する。
As described above, the present invention provides a circuit that can determine the sign of a signed digit number without converting it to a two's complement binary number. Moreover, since it is configured by repeatedly connecting a simple unit circuit composed of a switch means and a delay means, even if the number of digits of the number of signed digits to be handled changes, the circuit can be easily designed. Have.

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

第1図は本発明の一実施例の構成を示すブロック図、第
2図は本発明の第1の実施例を示す図、第3図は2入力
のどちらが先に1になるかを検出する回路例の回路図、
第4図は本発明の第2の実施例を示す回路図、第5図は
符号付きディジット数から2補数表示2進数への変換法
を説明する図である。 1……第1の回路、2……第2の回路、3……スイッチ
手段、4……第1の回路、10……nビットレジスタ、20
……論理和手段、50……スイッチング制御信号端子。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention, FIG. 2 is a diagram showing a first embodiment of the present invention, and FIG. 3 is a circuit for detecting which of two inputs is 1 first. Circuit diagram of example circuit,
FIG. 4 is a circuit diagram showing a second embodiment of the present invention, and FIG. 5 is a diagram for explaining a method of converting a signed digit number into a two's complement display binary number. 1 ... First circuit, 2 ... Second circuit, 3 ... Switch means, 4 ... First circuit, 10 ... n bit register, 20
... OR means, 50 ... Switching control signal terminal.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】n(nは正整数)ビットレジスタと、この
nビットレジスタの各ビット出力を入力するように接続
されたn個のスイッチ手段と、このスイッチ手段の各出
力を入力する論理和手段を有し、前記n個のスイッチ手
段の隣合うもの同士のスイッチング制御信号端子からな
るn−1組のスイッチング制御信号端子対の各々を遅延
手段にて接続し、かつ前記n−1組の各スイッチング制
御信号端子対の2個のスイッチング制御信号端子の内、
前記nビットレジスタのより上位のビット出力に接続さ
れたスイッチ手段のスイッチング制御信号端子の方が、
前記各々の遅延手段の入力に接続されることにより得ら
れる第1の回路と、この第1の回路に等しい第2の回路
とを含むことを特徴とする符号付きディジット数正負判
定回路。
1. An n-bit register (n is a positive integer), n switch means connected so as to input each bit output of the n-bit register, and a logical sum for inputting each output of the switch means. Means, each of n-1 sets of switching control signal terminal pairs consisting of switching control signal terminals of adjacent ones of the n switch means is connected by delay means, and the n-1 sets of switching control signal terminals are connected. Of the two switching control signal terminals of each switching control signal terminal pair,
The switching control signal terminal of the switch means connected to the higher-order bit output of the n-bit register is
A signed digit number plus / minus determination circuit comprising a first circuit obtained by being connected to an input of each of the delay means and a second circuit equal to the first circuit.
JP1001841A 1989-01-06 1989-01-06 Signed digit number sign judgment circuit Expired - Lifetime JP2504153B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1001841A JP2504153B2 (en) 1989-01-06 1989-01-06 Signed digit number sign judgment circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1001841A JP2504153B2 (en) 1989-01-06 1989-01-06 Signed digit number sign judgment circuit

Publications (2)

Publication Number Publication Date
JPH02181820A JPH02181820A (en) 1990-07-16
JP2504153B2 true JP2504153B2 (en) 1996-06-05

Family

ID=11512776

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1001841A Expired - Lifetime JP2504153B2 (en) 1989-01-06 1989-01-06 Signed digit number sign judgment circuit

Country Status (1)

Country Link
JP (1) JP2504153B2 (en)

Also Published As

Publication number Publication date
JPH02181820A (en) 1990-07-16

Similar Documents

Publication Publication Date Title
US4683548A (en) Binary MOS ripple-carry parallel adder/subtracter and adder/subtracter stage suitable therefor
EP0416869B1 (en) Digital adder/accumulator
US5299145A (en) Adder for reducing carry processing
JP2970231B2 (en) Parallel multiplication circuit
JP2504153B2 (en) Signed digit number sign judgment circuit
JPH0462617B2 (en)
US3564225A (en) Serial binary coded decimal converter
JP2513021B2 (en) Signed digit number sign judgment circuit
RU2389064C1 (en) Method and device for adding and subtracting binary decimal code
JPH03211614A (en) Digit number positive/negative deciding circuit with code
JPH11266158A (en) Circuit and method for signal transmission
JP4042215B2 (en) Arithmetic processing apparatus and method
JPS6369325A (en) Conversion circuit from binary-coded decimal code
KR100196520B1 (en) Apparatus for conversion of two's complement numbers
SU1196864A1 (en) Device for determining sign of number in residual class system
JP3074958B2 (en) Serial multiplier with addition function
JPH0744459B2 (en) PWM circuit
SU1571573A1 (en) Serial adder
JP2890412B2 (en) Code conversion circuit
JPH03188523A (en) Multiplying circuit
SU1247862A1 (en) Device for dividing numbers
JPH06301711A (en) High speed hadamard converter
SU1283979A1 (en) Binary-coded decimal code-to-binary code converter
SU739523A1 (en) Binary decimal-to-binary converter
JPH07120964B2 (en) Extension circuit