JPS63311433A - Binary redundant sd code converting/subtracting method and its circuit - Google Patents

Binary redundant sd code converting/subtracting method and its circuit

Info

Publication number
JPS63311433A
JPS63311433A JP62146653A JP14665387A JPS63311433A JP S63311433 A JPS63311433 A JP S63311433A JP 62146653 A JP62146653 A JP 62146653A JP 14665387 A JP14665387 A JP 14665387A JP S63311433 A JPS63311433 A JP S63311433A
Authority
JP
Japan
Prior art keywords
code
digit
redundant
binary
circuit
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.)
Pending
Application number
JP62146653A
Other languages
Japanese (ja)
Inventor
Tadashi Nakanishi
正 仲西
Hiroki Yamauchi
寛紀 山内
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP62146653A priority Critical patent/JPS63311433A/en
Publication of JPS63311433A publication Critical patent/JPS63311433A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To ensure the working of the titled method at a high speed by performing the binary redundant subtraction for the highest level digits 1 and 0 of the value shown in a complement code of 2 after adding the binary redundant SD codes +1 and -1 to the digit higher than the highest level digit by one step. CONSTITUTION:In case all digits of the value (= u) shown in normal complement series code of 2 are equal to 0, they are replaced with -1 and then with +1 if they are equal to 1 respectively. For the digit higher than the highest level digit by one step, +1 and -1 are added if the highest level digit of the unconverted complement series code of 2 is equal to 0 and 1 respectively. Thus it is possible to obtain the value (v) shown in a deformed binary redundant SD code having a larger digit number by an amount equal to a single digit. Such a deformed binary redundant SD code is used for execution of the binary redundant subtraction. Thus each digit is converted into a binary redundant SD code consisting of only +1 and -1 excluding 0.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、通常用いられる2の補数系コードを、高速加
減算器などに使用される2進冗長SD系コードへ変換し
、得られた2つの数の2進SD冗長コードの減算を行う
場合において、小規模な回路構成で、高速に行わせるの
に好適な変換回路に関するものである。
Detailed Description of the Invention [Field of Industrial Application] The present invention converts a commonly used two's complement code into a binary redundant SD code used in high-speed adders/subtracters, etc. The present invention relates to a conversion circuit suitable for performing subtraction of two numbers of binary SD redundant codes at high speed with a small circuit configuration.

〔従来の技術〕[Conventional technology]

(イ)加算 冗長SDココーを用いた加算器では、加算を行う際に桁
上げ伝播が生じない並列加算を行うことができ、加算値
(加数及び被加数)に依存しない一定時間で加算が行え
るという特徴がある。
(b) Addition Redundant An adder using SD Coco can perform parallel addition without carry propagation when performing addition, and can perform addition in a fixed time that does not depend on the addition value (addend and summand). It has the characteristic that it can be done.

即ち、2進冗長SDコードを用いた加算器では、以下の
2段階からなる操作によって桁上げ伝播を生じない加算
を行う。
That is, an adder using a binary redundant SD code performs addition without causing carry propagation by the following two-step operation.

■ 第一段階では、下位からの桁上げを当該桁で吸収で
きるように、中間結果である中間桁上げおよび中間和を
生成するが、これらの値を下位桁の状態に合わせて設定
する。
■ In the first stage, intermediate results such as an intermediate carry and an intermediate sum are generated so that the carry from the lower digit can be absorbed by the relevant digit, but these values are set according to the status of the lower digit.

■ 第二段階では、下位桁から生じた中間桁上げと当該
桁の中間相を加え、この結果最終的な加算結果を得る。
■ In the second stage, the intermediate carry resulting from the lower digit and the intermediate phase of the digit are added, resulting in the final addition result.

この時に下位から上位への桁上げ伝播は生じないため、
語長に依らない高速加算が実現できる。
At this time, carry propagation from lower to higher does not occur, so
High-speed addition independent of word length can be achieved.

以上の2段階の操作を、各当該桁ごとに並列に実行でき
るという特徴を有する。上記の中間和および中間桁上げ
の生成のために隣接下位からの桁上げを予測信号(=C
)を必要とする。
It has the feature that the above two-stage operation can be executed in parallel for each relevant digit. To generate the above intermediate sum and intermediate carry, a signal (=C
) is required.

この信号Cは隣接下位桁の値を見て、下位からの桁上げ
として+1が生じえない場合(c=1と指示する)、お
よび−1が生じ得ない場合(C=Oと指示する)を検出
する。そしてこの桁上げ予測信号を受けて中間桁上げお
よび中間和の生成を行う。
This signal C looks at the value of the adjacent lower digit, and if +1 cannot occur as a carry from the lower digit (indicates c=1), and if -1 cannot occur (indicates C=O) Detect. Then, in response to this carry prediction signal, an intermediate carry and an intermediate sum are generated.

この桁上げ予測信号Cは、第2図に示す桁上げ予測信号
からの各桁の加算規則を示す図の規則に従って生成する
。即ち、加数ないし被加数の少なくとも何れか一方が−
1の場合には当該桁の加数と被加数の和をとることによ
り+1の桁上げが決して生じ得ないのでc=lとし、そ
の他の加数および被加数の組み合わせについては、−1
の桁上げが決して生じ得ないのでC=0とし、これを隣
接上位桁に送ることを示している。なお図中のφ(do
n’  t  care)は隣接下位からの桁上げ予測
信号が1.0のいずれでも良いことを示す。即ち、当該
桁の加数と被加数の和が0の場合(加数及び被加数の組
み合わせがOと0、+1と−1、−1と+1の場合)に
は、下位からの桁上げに依らず桁上げ伝播を生じないの
で、中間桁上げと中間和を共に0とする。詳細について
は特願昭61−46598号(特開昭  −号)並にT
This carry prediction signal C is generated according to the rules shown in FIG. 2, which shows the rules for adding each digit from the carry prediction signal. That is, at least either the addend or the summand is -
In the case of 1, a carry of +1 can never occur by adding the sum of the addend and summand of the digit, so c=l, and for other combinations of addend and summand, -1
Since a carry can never occur, C=0, indicating that this is sent to the adjacent upper digit. Note that φ(do
n' t care) indicates that the carry prediction signal from the adjacent lower order may be either 1.0. In other words, if the sum of the addend and summand of the relevant digit is 0 (when the combination of the addend and summand is O and 0, +1 and -1, -1 and +1), the digits from the lower order Since carry propagation does not occur regardless of the carry, both the intermediate carry and the intermediate sum are set to 0. For details, please refer to Japanese Patent Application No. 61-46598 (Japanese Patent Application No. Sho 61-46598) and T.
.

NAKANISHI  etal、”CMO3Radi
x−2Signed−DigitANo、4  Apr
il  参照。
NAKANISHI etal, “CMO3Radi
x-2Signed-DigitANo, 4 Apr
See il.

2進冗長SDコードによる演算器を2値論理回路で構成
する場合に、各桁を0及びlによる2値符号で表現する
必要があるが、O,+1゜および−1の3値で表現され
た2進冗長符号の各桁を、正であるか負であるかを示す
Sビット(sign)と、0であるか否かを示すVビッ
ト(value)の2ビツトで、第6図2進冗長sDコ
ードの2値による符号化方式を示す図にあるように表現
する。各ビットは0と1からなる2値符号であり、2進
冗長SDコードの0は(φ、1)、+1は(0,0)、
−1は(1,0)と表される。以下の符号化に当っては
正であるか負であるかを示すビットをSビット、0であ
るか否かを示すビットをVビットと呼ぶこととし、この
コードをSvココーと称する。
When an arithmetic unit based on a binary redundant SD code is configured with a binary logic circuit, each digit must be expressed as a binary code of 0 and l, but it is not possible to express it as a ternary code of O, +1°, and -1. Each digit of the binary redundant code is represented by two bits: the S bit (sign) indicating whether it is positive or negative, and the V bit (value) indicating whether it is 0 or not. The redundant sD code is expressed as shown in the diagram showing the binary encoding method. Each bit is a binary code consisting of 0 and 1, and 0 in the binary redundant SD code is (φ, 1), +1 is (0, 0),
-1 is represented as (1,0). In the following encoding, the bit indicating whether it is positive or negative is called the S bit, the bit indicating whether it is 0 or not is called the V bit, and this code is called Sv Coco.

さて、通常用いられる2の補数系コードでは、最上位桁
が0の場合は正または零であることを表し、lの場合に
は負であることを表している。
Now, in the commonly used two's complement system code, when the most significant digit is 0, it represents positive or zero, and when it is l, it represents negative.

したがって従来2の補数系コードを2進冗長コードへ変
換する場合には、最上位桁が0の場合はそのまま0に、
1の場合にはこれを−lに置き換え、他の全ての桁につ
いては0ないしlのいずれの場合もそのままそれぞれ0
ないし+1に置き換えている。
Therefore, when converting a conventional two's complement code to a binary redundant code, if the most significant digit is 0, it is converted to 0 as it is,
If it is 1, replace it with -l, and for all other digits, if it is 0 or l, it will remain as 0.
Or it is replaced with +1.

第9図(a)に2の補数系コードから従来の2進冗長S
Dコードへのコード変換の例を示している。
Figure 9(a) shows the conventional binary redundant S from two's complement code.
An example of code conversion to D code is shown.

第2図の加算規則を実現した回路を第4図(a)従来の
2進冗長SDコ一ド加算器1桁の回路図に示した図にお
いて2つの2の補数系コードの数値が従来の変換法によ
ってSvココーによる2進冗長コードに変換され被加数
1.加数2ととて人力され、論理段数の数段を経た後、
中間和3と隣接上、下位桁間の中間桁上げ4の反転とが
出力される。
The circuit that realizes the addition rule in Figure 2 is shown in Figure 4 (a), a circuit diagram of a conventional binary redundant SD code adder with one digit. It is converted into a binary redundant code by Sv Coco by the conversion method and the summand 1. The addend is 2, and after passing through several logical stages,
The intermediate sum 3 and the inverse of the intermediate carry 4 between the adjacent upper and lower digits are output.

(ロ)減算 2進冗長SDコードでは、正負反転した(即ち−1を乗
じた)値は、各桁の正負を反転した値に等しい。従って
、加算における加数の正負反転を行い減数とし、被加数
をそのまま被減数として用いることにより第2図の加算
規則から第3図に示す減算規則が得られる。
(b) In the subtractive binary redundant SD code, the value whose sign is inverted (that is, multiplied by -1) is equal to the value where the sign of each digit is inverted. Therefore, the subtraction rule shown in FIG. 3 can be obtained from the addition rule shown in FIG. 2 by reversing the sign of the addend in addition to obtain a subtracted number, and using the summand as it is as the minuend.

即ち桁上げ予測信号からの各桁の減算規則を示す図の第
3図を実現した回路を第4図(b)の減算器1桁の回路
で示した。(参考文献参照)第4図(a)の加算器の回
路に較べ第4図(′b)の減算回路は加数の正負反転を
行うインバータ5を設けた点が異なる。
That is, a circuit that realizes FIG. 3, which is a diagram showing the rules for subtracting each digit from a carry prediction signal, is shown as a circuit with a single digit subtracter in FIG. 4(b). (See References) Compared to the adder circuit of FIG. 4(a), the subtraction circuit of FIG. 4('b) differs in that it is provided with an inverter 5 for inverting the sign of the addend.

第5図は従来方式による2の補数コードの被減数と、2
の補数系コードの減数の間の2進冗長SD符号変換減算
回路の1例であり、第5図従来方式による2進冗長SD
符号変換減算回路図を示す。2つの2の補数系コードの
数値p。
Figure 5 shows the minuend of the conventional two's complement code and the two
Figure 5 is an example of a binary redundant SD code conversion subtraction circuit between the subtraction of a complement system code.
A code conversion subtraction circuit diagram is shown. Two two's complement code numbers p.

qを2進冗長SDコードに変換し、第6図の符号化方式
に従いSvココーで表現して減数および被減数として、
2つの2の補数コードで表現された数値p、qの減算S
D冗長減算(p−q)を行う回路を構成している。同図
において4は隣接桁間に関係する中間桁上げ、5は 第
4図(blの減算器である。
Convert q into a binary redundant SD code and express it as Sv Coco according to the encoding method shown in Figure 6 as the subtrahend and minuend,
Subtraction S of two numbers p and q expressed in two's complement code
It constitutes a circuit that performs D redundant subtraction (p-q). In the same figure, 4 is an intermediate carry related to adjacent digits, and 5 is a subtractor in FIG. 4 (bl).

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第4図の回路図は何れも論理段数が数段を要し、論理回
路とこれらの間の切換回路とで構成する必要があるので
、これを回路として実現するには少なからぬ素子数を必
要とする。この原因は第2図、第3図で2進冗長SDコ
ードの被加数、加数。
The circuit diagrams in Figure 4 all require several logic stages and must be composed of logic circuits and switching circuits between them, so a considerable number of elements are required to realize this as a circuit. shall be. The cause of this is the summand and addend of the binary redundant SD code in Figures 2 and 3.

被減数、tJ&数が+1.−1および0の3値があり、
第2図において被加数、加数の一方が特に0である場合
には、論理が複雑になることが明かであり、これが第4
図(a)の回路を複雑にしている理由である。したがっ
て、各桁がOのない+1.−1だけからなる2進冗長S
Dコードに変換する方法が望まれる。
The minuend, tJ & number is +1. There are three values, -1 and 0,
In Figure 2, it is clear that the logic becomes complicated when either the summand or the addend is 0, and this is the reason for the fourth
This is the reason why the circuit in Figure (a) is complicated. Therefore, each digit is +1 without an O. -Binary redundancy S consisting only of 1s
A method of converting to D code is desired.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、2の補数系コードを2進冗長SDコードに変
換する際に、+1および−1のディジットのみからなる
変形2進SD冗長表現に置き換え、得られた変形2進冗
長SDコードを用いて各桁が完全な並列演算となる高速
なSD冗長減算を小規模な回路で実現する。
When converting a two's complement code into a binary redundant SD code, the present invention replaces it with a modified binary SD redundant representation consisting only of +1 and -1 digits, and uses the obtained modified binary redundant SD code. This achieves high-speed SD redundant subtraction in which each digit is operated in complete parallel using a small-scale circuit.

即ち、通常の2の補数系コードの表現する値(=u)の
全ての桁について、当該術が0の場合にはこれを−1に
置き換え、1の場合にはそのまま+1に置き換える。そ
して最上位桁より1つ上の桁として、変換前の2の補数
系コードの最上位桁が0の場合には+1を付加し1の場
合には−1を付加することで1桁分だけ桁数の大きい変
形2進冗長SDコードの表現する値(V)を生成する。
That is, for all digits of the value (=u) expressed by the normal two's complement code, if the code is 0, it is replaced with -1, and if it is 1, it is replaced with +1. Then, as the digit one above the most significant digit, if the most significant digit of the two's complement code before conversion is 0, +1 is added, and if it is 1, -1 is added, so that only one digit is added. A value (V) expressed by a modified binary redundant SD code with a large number of digits is generated.

ついでこのようにして生成された変形2進冗長SDコー
ドを用いて2進冗長減算を実施する。第9図山)に2の
補数系コードから変形2進冗長SDコードへのコード変
換の1例を示す。
Then, binary redundancy subtraction is performed using the modified binary redundant SD code generated in this way. An example of code conversion from a 2's complement system code to a modified binary redundant SD code is shown in Fig. 9 (mountain).

〔作 用〕[For production]

本発明による方法で得られた変形2進冗長SD則を示す
図は、第1図本発明の変形2進冗長SDコードによる減
算規則を示す図の如くなり、中間桁上げと中間和の組合
わせが1通りしかない簡略化した減算規則を生成するこ
とになる。
The diagram showing the modified binary redundant SD rule obtained by the method according to the present invention is as shown in Figure 1, which shows the subtraction rule using the modified binary redundant SD code of the present invention, and is a combination of intermediate carry and intermediate sum. This will generate a simplified subtraction rule in which there is only one way.

本発明による方式で得られた2進冗長SDコードVと変
換前の2の補数系コードについては、v=2・u+1 が成り立つ。
Regarding the binary redundant SD code V obtained by the method according to the present invention and the two's complement code before conversion, v=2·u+1 holds true.

(例7=2・3+1.−9=2・ (−5)+1)2進
SD冗長演算では、桁上げ伝播の吸収のために生成され
た中間値(中間桁上げおよび中間和)を用いて、各桁の
中間和および隣接下位桁からの中間桁上げを加算するこ
とにより求める演算値を得る。
(Example 7 = 2・3+1.-9=2・(-5)+1) In binary SD redundant operation, intermediate values (intermediate carry and intermediate sum) generated to absorb carry propagation are used. , the calculated value is obtained by adding the intermediate sum of each digit and the intermediate carry from the adjacent lower digit.

ここで第1図から明らかなように、減数Sないし被減数
rの各桁が+1ないし−1のみで構成されている場合に
は中間和は常に0であるため、問題桁の求める減算値(
隣接下位からの中間桁上げと中間和との和)は隣接下位
からの中間桁上げそのものとなる。また最下位桁には隣
接下位からの中間桁上げが存在しないので、求める減算
値の最下位桁は常に0である。
As is clear from Fig. 1, if each digit of the subtrahend S or minuend r consists of only +1 or -1, the intermediate sum is always 0, so the subtraction value required by the problem digit (
The sum of the intermediate carry from the adjacent lower order and the intermediate sum) is the intermediate carry from the adjacent lower order itself. Furthermore, since there is no intermediate carry from the adjacent lower order in the least significant digit, the least significant digit of the subtraction value to be obtained is always 0.

一方、本発明による変形2進冗長SDコードの減算方式
では2つの2の補数系コードの数値p。
On the other hand, in the subtraction method of the modified binary redundant SD code according to the present invention, two values p of two's complement code are used.

qそれぞれを変形2進冗長SDコードに置き換え、得ら
れた2つの変形2進冗長SDコードの数値「、Sを被減
数および減数とし、冗長SD減算を行うと、 r−s= (2−p+1)   (2・q+1)=2・
 (p−q) となり、減算結果は変換前の2の補数系コードの表現す
る値での減算値の2倍に等しい。
Replace each of q with a modified binary redundant SD code, and perform redundant SD subtraction with S as the minuend and the subtrahend, and the resulting two modified binary redundant SD code values are as follows: r-s= (2-p+1) (2・q+1)=2・
(p-q), and the subtraction result is equal to twice the subtraction value in the value expressed by the two's complement code before conversion.

通常の2の補数系コードで表現した値と同様に、2進冗
長SDコードで表現した値においても、最下位桁が0の
場合には、その数値を2で割ることrと3の減算値が隣
接下位からの中間桁上げそのものとして得られるため、
p−qを求めるためこれを2で割ることは、隣接下位か
らの中間桁上げを単に隣接下位へ戻すだけ、すなわち自
己の中間桁上げを用いるだけでよいことが明らかである
Similar to the value expressed using the normal 2's complement system code, when the least significant digit is 0 in the value expressed using the binary redundant SD code, the subtraction value of r and 3 is calculated by dividing the value by 2. is obtained as the intermediate carry itself from the adjacent lower order, so
It is clear that by dividing this by 2 to obtain p-q, it is sufficient to simply return the intermediate carry from the adjacent lower order to the adjacent lower order, that is, use the own intermediate carry.

以上より、本発明による方式で2つの2の補数系コード
の数値p、qそれぞれを変形2進冗長SDコードに置き
換え、得られた2つの変形2進冗長SDコードの数値r
、sを被減数および減数とし中間値の1つである中間桁
上げを生成することにより、pおよびqの従来に対応す
る2進冗長SD演算による減算結果が得られることにな
る。
From the above, by using the method according to the present invention, each of the values p and q of the two two's complement code is replaced with a modified binary redundant SD code, and the resulting value r of the two modified binary redundant SD codes is
, s as the minuend and the subtrahend and generate an intermediate carry, which is one of the intermediate values, to obtain the subtraction result of p and q by the conventional binary redundant SD operation.

rと3の減算は各桁ごとにそれぞれ第1図の規則に従っ
て、被減数と減数の符号が異なる場合には中間桁上げと
して被減数そのままの値を生成し、被減数と減数の符号
が同じ場合には中間桁上げとして0を生成することで行
えばよい。
When subtracting r and 3, follow the rules in Figure 1 for each digit. If the signs of the minuend and the subtrahend are different, the minuend is used as an intermediate carry to generate the same value, and if the signs of the minuend and the subtrahend are the same, the value is generated as is. This can be done by generating 0 as an intermediate carry.

〔実施例〕〔Example〕

第7図に本発明の変形2進冗長SDコ一ド変換減算回路
の1指分の実施例の回路図を示す、また第10図に2の
補数系コードで表現した値からS■ココーによる変形2
進冗長SDコードで表現した値へのSVココーの変換前
後の対応図を示す。
FIG. 7 shows a circuit diagram of an embodiment of one index of the modified binary redundant SD code conversion/subtraction circuit of the present invention, and FIG. Transformation 2
A correspondence diagram before and after conversion of SV Coco to a value expressed in a hexadecimal redundant SD code is shown.

2の補数系コードを2進冗長コードへ変換する場合には
、通常用いられる2の補数系コードでは、最下位桁の0
は正または零であることを表し、1は負であることを表
しているので、2進冗長SDドをS%Vの2ビツトのS
■ココーで2値符号化する時は第1θ図に集約される。
When converting a two's complement code to a binary redundant code, the lowest digit 0 of the normally used two's complement code is
represents positive or zero, and 1 represents negative, so the binary redundant SD code is expressed as 2 bits of S%V.
■When performing binary encoding with Coco, it is summarized in Figure 1θ.

2の補数系コードで表現した値の各桁を変形2進冗長S
Dコードとし各桁については変換前の2の補数系コード
をS。
Each digit of the value expressed in two's complement code is transformed into binary redundant S.
For each digit, the two's complement code before conversion is S.

■の2ビツトで2値符号化する方式を用いると1、第1
図の本発明の演算についてはん減算結果として当該桁の
中間桁上げそのものを用いるだけでよいので、本発明回
路の中間桁上げのSビットには、2進冗長SDコードの
0のSビットはφであり、lか−1のときは第6図より
被減数を用いればよいことから被減数の符号そのまま用
いてもよい。
If you use the 2-bit binary encoding method (2), the first
Regarding the operation of the present invention shown in the figure, it is only necessary to use the intermediate carry itself of the relevant digit as the subtraction result, so the S bit of 0 of the binary redundant SD code is used as the S bit of the intermediate carry of the circuit of the present invention. When φ is 1 and l is -1, the sign of the minuend may be used as it is, since it is sufficient to use the minuend from FIG.

中間桁上げのVビットには被減数と減数の符号(Sビッ
トに対応)が同じ場合には1 (2進冗長SDコードの
0のVビット)を生成し、異なる場合には0(2進冗長
SDコードの+1ないし−1のVビット)を生成する。
If the signs of the minuend and subtrahend (corresponding to the S bit) are the same, a 1 (V bit of 0 in the binary redundant SD code) is generated for the V bit of the intermediate carry, and if they are different, a 0 (binary redundant code) is generated. (+1 to -1 V bit) of the SD code.

つまり被減数を2進冗長SDコードに変換後のSビット
と減数を2進冗長SDコードに変換後Sビットの排他論
理和の否定(exclusive−NOR)演算を行う
That is, an exclusive-NOR operation is performed on the S bits after converting the minuend into a binary redundant SD code and the S bits after converting the subtrahend into a binary redundant SD code.

第1O図に示すように符号桁は正ないし零または負のと
き即ち変換前の0,1は、変換後は+1゜−1となり、
Sビットの0,1に対応する。
As shown in Figure 1O, when the sign digit is positive, zero or negative, 0 or 1 before conversion becomes +1°-1 after conversion,
Corresponds to S bits 0 and 1.

第7図は本発明による変形冗長SD符号変換減算回路の
1桁分の回路図で11は2の補数コードの表現の被減数
p、減数qの最上位桁の入力、12は最上位桁をのぞく
各桁の入力、13は同図(b)の等価回路の入力である
。21は変形2進冗長SDコードの最上位桁の隣接上位
に付加する回路の出力、22は各桁の出力、23は同図
伽)の等価回路の出力である。
FIG. 7 is a circuit diagram for one digit of the modified redundant SD code conversion/subtraction circuit according to the present invention. 11 is the input of the most significant digit of the minuend p and subtrahend q in the representation of the two's complement code, and 12 is the input of the most significant digit, excluding the most significant digit. The input of each digit, 13, is the input of the equivalent circuit shown in FIG. 3(b). 21 is the output of a circuit added to the adjacent upper order of the most significant digit of the modified binary redundant SD code, 22 is the output of each digit, and 23 is the output of the equivalent circuit shown in FIG.

第7図(a)は最上位桁の隣接上位に付加する回路で、
最上位桁nの被減数Pn、:$i数Qnの排他論理和の
否定(exclusive−NOR)を出力21のV□
、とし、被減数Pn、をそのまま出力21の8□1とし
ている。
Figure 7(a) is a circuit added to the adjacent higher order of the most significant digit,
V
, and the minuend Pn is set as 8□1 of the output 21.

第7図〜)は入力12の被減数Pi、減数Qiの否定を
排他的論理和の否定回路の入力としたものである。
In FIGS. 7-), the negation of the minuend Pi and the subtrahend Qi of the input 12 is input to an exclusive OR negation circuit.

第7図(C)は伽)の回路の等値論理変換を行った回路
である。
FIG. 7(C) is a circuit obtained by performing equivalent logic conversion of the circuit shown in FIG.

第8図は本発明の1桁分の回路を演算回路として用いた
本発明の減算回路の多桁の例である。4は隣接桁間の中
間桁上げ信号、33は第7図(a)の回路で最上位桁の
隣接上位に付加する回路、34.35は第7図(C)の
最上位をのぞく各桁に付加する回路を等値論理変換した
回路である。また、Pは被減数、Qは減数で何れも2の
補数系コードで表現した値である。
FIG. 8 is a multi-digit example of the subtraction circuit of the present invention using the circuit for one digit of the present invention as an arithmetic circuit. 4 is an intermediate carry signal between adjacent digits, 33 is the circuit in FIG. 7(a) that is added to the adjacent uppermost digit of the most significant digit, and 34.35 is each digit except the most significant digit in FIG. 7(C). This circuit is an equivalent logic conversion of the circuit added to the circuit. Further, P is the minuend and Q is the subtrahend, both of which are values expressed in two's complement code.

例えばp=qのときは2進冗長SDコードで表現した値
である。r=sとなり、第1図より中間桁上げは0とな
り、第6図よりS=φ、■=1となる。第7図(a) 
(b) (C)の本発明の回路は何れもこの関係を満足
している。
For example, when p=q, the value is expressed by a binary redundant SD code. r=s, the intermediate carry is 0 from FIG. 1, and S=φ, ■=1 from FIG. Figure 7(a)
(b) All of the circuits of the present invention shown in (C) satisfy this relationship.

第6図に示す変形2進冗長SDコードの2値符号化方式
を用い、本発明による方法で2つの補数系コードの数値
p、qを変形2進冗長SDコードに置き換え、得られた
2つの変形2進冗長SDコードの数値r、sを被減数お
よび減数とし、SD冗長減算を行う回路を構成しており
、従来方式の第4図(b)の回路に対応する。
Using the binary encoding method of the modified binary redundant SD code shown in FIG. The numerical values r and s of the modified binary redundant SD code are used as the minuend and the subtrahend, and a circuit for performing SD redundant subtraction is constructed, which corresponds to the conventional circuit shown in FIG. 4(b).

第5図と第8図の両回路を比較すれば、本発明による第
8図の回路構成のほうが、回路規模を大幅に削減でき、
同じ速度で動作させた場合には素子数減少により消費電
力を大幅に削減できることが明らかである。加えて論理
段数も大幅に削減されているためより高速な動作が可能
であることも明らかである。
Comparing both the circuits of FIG. 5 and FIG. 8, the circuit configuration of FIG. 8 according to the present invention can significantly reduce the circuit scale,
It is clear that when operated at the same speed, power consumption can be significantly reduced by reducing the number of elements. In addition, it is clear that higher-speed operation is possible because the number of logic stages has been significantly reduced.

以上のことから本発明による方式は、従来の方式に比較
して回路構成規模、動作速度、消費電力等の点から優れ
ているといえる。
From the above, it can be said that the method according to the present invention is superior to the conventional method in terms of circuit configuration scale, operating speed, power consumption, etc.

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

本発明は、通常使用される2の補数系コードから変形2
進冗長SD系コードに変換する場合に、より小規模な回
路構成で、かつ低電力消費で、かつ高速な動作を可能と
する変形2進冗長SD系コード変換および減算を行う方
法及びその実施をする回路を提供することにある。
The present invention is a modification of the commonly used two's complement system code.
A method and implementation of modified binary redundant SD code conversion and subtraction that enables a smaller circuit configuration, lower power consumption, and faster operation when converting to a binary redundant SD code. The objective is to provide a circuit that

例えば、本発明の方法によって構成した回路と、2進S
D冗長コードの正負の符号判定を行う回路を組合わせる
ことにより2つの数値の冗長2進演算を用いた大小比較
回路がより高速動作が可能で小規模、あるいは低電力消
費な回路を構成できる。
For example, a circuit constructed by the method of the present invention and a binary S
By combining circuits that determine whether the D redundant code is positive or negative, a magnitude comparison circuit using redundant binary operation of two numerical values can operate at higher speed, be smaller in size, or consume less power.

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

第1図は本発明の変形2進冗長SDコードによる減算規
則を示す図、第2図は2進冗長SDコ一図は従来2進冗
長SDコードによる加算器及び減算器、第5図は従来方
式による2進冗長SD符号変換減算回路図、第6図は2
進冗長SDコードの2値2ビツトによる符号化方式を示
す図、第7図は本発明による変形2進冗長SD符号変換
減算回路の1桁分の回路図、第8図は本発明による変形
冗長SD符号変換減算回路の多桁の回路図、第9図はコ
ード変換図、第10図はSVココーの変換対応図である
。 ■・・・被加数 2・・・加数 3・・・中間和 4・・・隣接桁間の中間桁上げ信号 5・・・2進SD冗長での減算器 11.12.13・・・2の補数コードの入力21.2
2.23・・・変形2進冗長SDコードの出力 31.32・・・インバータ 33・・・排他的論和の否定exc lus 1ve−
NOR回路 34・・・最上位桁の隣接上位に付加する回路35・・
・中間桁の等価論理変換を行った回路S・・・Sピッ)
(sign)変形2進冗長SDコード V ・Vビット(value)変形2進冗長SDコード P・・・被減数 2の補数コード Q・・・減数 2の補数コード N減数及び減数の各桁のいず゛れにも0を含まない場合
の2道冗長SDコードによる減算規則き示す口笛  1
  図 C−に隣接下位から+lfQ、桁上げ゛が起ワ帰ない場
合c−o : M授下位かう−1の桁上ぽか起り得ない
場合2道冗長SOコードによる桁上げ予測信号からの各
桁の加算規則を示す図 第 2 図 C−1=隣隣接位から中1の桁よ(fが゛起つ得永い場
合c−o : ps捜下イ立から−1の桁上1デが起り
y!な(−場合2道冗長SDコードによる桁上げ予測信
号からの各桁の減算規則を示す図 第3図 (a) 2道冗asDコ一ドjllll141桁el!
2図の釦算彫りで構床しに例)口1 (b) 2道冗isoコ一ド原算器1桁を茗3図の減算
規屓りで構成した例従yR2Xt7i1′長SDフード
にまる加算!及び減算器の回路口′M 4  図 2の補数系コード       従来の2道冗長SDコ
ード2の補数系コード       変形2道冗長SD
コード(b) コード渡場図 第9図 S■ココーの変換対応図 第10図
Fig. 1 is a diagram showing the subtraction rule using the modified binary redundant SD code of the present invention, Fig. 2 is a diagram showing the subtraction rule using the modified binary redundant SD code, Fig. 2 is a diagram showing the adder and subtractor using the conventional binary redundant SD code, and Fig. 5 is the conventional subtraction rule using the modified binary redundant SD code. Figure 6 is a binary redundant SD code conversion/subtraction circuit diagram based on the system.
FIG. 7 is a circuit diagram for one digit of a modified binary redundant SD code conversion/subtraction circuit according to the present invention, and FIG. 8 is a diagram showing a binary redundant SD code encoding method using binary 2 bits. A multi-digit circuit diagram of the SD code conversion subtraction circuit, FIG. 9 is a code conversion diagram, and FIG. 10 is a conversion correspondence diagram of SV Coco. ■... Addend 2... Addend 3... Intermediate sum 4... Intermediate carry signal between adjacent digits 5... Subtractor with binary SD redundancy 11.12.13...・Input of two's complement code 21.2
2.23... Output of modified binary redundant SD code 31.32... Inverter 33... Negation of exclusive OR exc lus 1ve-
NOR circuit 34...Circuit 35 added to the adjacent higher order of the most significant digit...
・Circuit S that performed equivalent logic conversion of intermediate digits...S pip)
(sign) Modified binary redundant SD code V ・V bit (value) Modified binary redundant SD code P... Minuend Two's complement code Q... Subtractive two's complement code N Whistle showing subtraction rules using two-way redundant SD code when none of the numbers contain 0 1
+lfQ from the adjacent lower order in Figure C-, if a carry does not occur c-o: If a carry of -1 cannot occur in the lower order of M, each digit from the carry prediction signal by the two-way redundant SO code Figure 2 shows the addition rule for Figure C-1 = Middle 1st digit from the adjacent adjacent position (if f is long enough to occur, c-o: -1 digit digit occurs from ps search down) Figure 3 (a) shows the rules for subtracting each digit from the carry prediction signal using the 2-way redundant SD code in the case of y! (-) 2-way redundant asD code jllll141 digit el!
Example of constructing a structure with the button calculation carving shown in Figure 2) Mouth 1 (b) Example of 2-way redundant iso code original calculator 1 digit constructed with the subtraction standard shown in Figure 3 Follow yR2Xt7i1' long SD hood Total addition! and subtractor circuit port 'M 4 Complement system code in Figure 2 Conventional 2-way redundant SD code 2's complement system code Modified 2-way redundant SD
Code (b) Code Watari Diagram Figure 9 S ■ Coco Conversion Correspondence Diagram Figure 10

Claims (2)

【特許請求の範囲】[Claims] (1)2の補数系コードを、各桁が0、+1、−1の3
値で表現される2進冗長SDコードに変換し演算を行う
方法において、2の補数コードで表現した値の各桁の1
.0をそれぞれ2進冗長SDコードの+1、−1には変
換し、2の補数コードで表現した値の最上位桁の1.0
についてはそれぞれ2進冗長SDコードの+1、−1を
最上位桁の一つ上の桁に付加して変形2進冗長SDコー
ドにする方法と、該変形2進冗長SDコードを用いて2
進冗長減算を行う回路とによって成ることを特徴とする
2進冗長SD符号変換減算方法。
(1) 2's complement code, each digit is 0, +1, -1.
In a method of converting to a binary redundant SD code expressed as a value and performing calculations, 1 of each digit of the value expressed as a two's complement code is used.
.. 0 is converted to +1 and -1 in binary redundant SD code, respectively, and 1.0 is the most significant digit of the value expressed in two's complement code.
For the above, there is a method of adding +1 and -1 of the binary redundant SD code to the digit one above the most significant digit to create a modified binary redundant SD code, and a method of adding +1 and -1 of the binary redundant SD code to a modified binary redundant SD code, and
A binary redundant SD code conversion and subtraction method, comprising: a circuit that performs a binary redundant subtraction.
(2)2の補数系コードを、各桁が0、+1、−1の3
値で表現される2進冗長SDコードに変換し演算を行う
回路において、2の補数コードで表現した値の各桁の1
.0をそれぞれ2進冗長SDコードの+1、−1に変換
し、2の補数コードで表現した値の最上位桁の1、0に
ついてはそれぞれ2進冗長SDコードの+1、−1を最
上位桁の一つ上の桁に付加して変形2進冗長SDコード
にする回路と、該変形2進冗長SDコードを用いて2進
冗長減算を行う回路とによって成ることを特徴とする2
進冗長SD符号変換減算回路。
(2) 2's complement code, each digit is 0, +1, -1.
In a circuit that converts into a binary redundant SD code expressed as a value and performs an operation, the 1 of each digit of the value expressed as a two's complement code is
.. Converts 0 to +1 and -1 of the binary redundant SD code, respectively, and converts +1 and -1 of the binary redundant SD code to the most significant digit of 1 and 0 of the value expressed in two's complement code, respectively. 2, characterized in that it is comprised of a circuit that adds to the digit one above the digit to create a modified binary redundant SD code, and a circuit that performs binary redundant subtraction using the modified binary redundant SD code.
Hexadecimal redundancy SD code conversion subtraction circuit.
JP62146653A 1987-06-12 1987-06-12 Binary redundant sd code converting/subtracting method and its circuit Pending JPS63311433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62146653A JPS63311433A (en) 1987-06-12 1987-06-12 Binary redundant sd code converting/subtracting method and its circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62146653A JPS63311433A (en) 1987-06-12 1987-06-12 Binary redundant sd code converting/subtracting method and its circuit

Publications (1)

Publication Number Publication Date
JPS63311433A true JPS63311433A (en) 1988-12-20

Family

ID=15412590

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62146653A Pending JPS63311433A (en) 1987-06-12 1987-06-12 Binary redundant sd code converting/subtracting method and its circuit

Country Status (1)

Country Link
JP (1) JPS63311433A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06161713A (en) * 1992-11-26 1994-06-10 Sharp Corp Many-value adder
JPH06161712A (en) * 1992-11-18 1994-06-10 Sharp Corp Multi-value subtracter
WO2010082629A1 (en) * 2009-01-15 2010-07-22 株式会社 東芝 Naf conversion device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06161712A (en) * 1992-11-18 1994-06-10 Sharp Corp Multi-value subtracter
JPH06161713A (en) * 1992-11-26 1994-06-10 Sharp Corp Many-value adder
WO2010082629A1 (en) * 2009-01-15 2010-07-22 株式会社 東芝 Naf conversion device
JP2010165173A (en) * 2009-01-15 2010-07-29 Toshiba Corp Naf conversion device
US8918441B2 (en) 2009-01-15 2014-12-23 Kabushiki Kaisha Toshiba NAF conversion apparatus

Similar Documents

Publication Publication Date Title
US4866656A (en) High-speed binary and decimal arithmetic logic unit
US4878192A (en) Arithmetic processor and divider using redundant signed digit arithmetic
US4110831A (en) Method and means for tracking digit significance in arithmetic operations executed on decimal computers
JPS595349A (en) Adder
JPS63311433A (en) Binary redundant sd code converting/subtracting method and its circuit
JPH0552530B2 (en)
JPH04419B2 (en)
Vun et al. Thermometer code based modular arithmetic
Stouraitis et al. Hybrid signed digit logarithmic number system processor
US3462589A (en) Parallel digital arithmetic unit utilizing a signed-digit format
Wong et al. Optical modified signed-digit addition based on binary logical operations
JPH0149973B2 (en)
Aoki et al. Redundant complex arithmetic and its application to complex multiplier design
JPS63216132A (en) Counter circuit
Choo et al. A novel conversion scheme from a redundant binary number to two's complement binary number for parallel architectures
US20050044125A1 (en) 4-2 Compressor
JPH03228434A (en) Code converting circuit
CN106990936B (en) Plus-minus method universal circuit with symbol control end
Ramya et al. VLSI implementation of fast addition using Quaternary signed digit number system
JPH07152537A (en) Decimal adder and adder/subtractor
JPH02207323A (en) Redundant binary adding circuit
Kannadasan Reversible Gate Logic Adder with Parity Preserving Design
JPS6349835A (en) Arithmetic processor
Parhi Fast VLSI binary addition
Veeramachaneni et al. A novel carry-look ahead approach to a unified bcd and binary adder/subtractor