JPS62194541A - Arithmetic circuit - Google Patents

Arithmetic circuit

Info

Publication number
JPS62194541A
JPS62194541A JP3696286A JP3696286A JPS62194541A JP S62194541 A JPS62194541 A JP S62194541A JP 3696286 A JP3696286 A JP 3696286A JP 3696286 A JP3696286 A JP 3696286A JP S62194541 A JPS62194541 A JP S62194541A
Authority
JP
Japan
Prior art keywords
register
data
supplied
addition
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
JP3696286A
Other languages
Japanese (ja)
Inventor
Ryohei Kato
良平 加藤
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP3696286A priority Critical patent/JPS62194541A/en
Publication of JPS62194541A publication Critical patent/JPS62194541A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily perform such anomalous calculations as (A+B), (A+B+1), (A-B) and (A-B-1) by controlling at least the carry input of the lowest stage in an addition/subtraction circuit. CONSTITUTION:The addition data received from addition circuits 51-5n are supplied to a register 6 together with the control signal received from a control bus 4. Then the addition data are read out to a data bus 1. Then the data received from the bus 1 are supplied to a 1-bit register 7 together with the control signal received from the bus 4. Thus the data on 1 or 0 is written to the register 7. The data received from the register 7 is supplied to the carry input of the circuit 51 of the lowest stage. Therefore the operation (A+B) is carried out when the data written to the register 7 is equal to zero. Then the operation (A+B+1) is carried out when the data received from the register 7 is equal to 1. Thus the anomalous calculation can be carried out just by supplying 0 or 1 to the lowest carry input.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ディジタル信号プロセッサ等に使用される演
算回路に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an arithmetic circuit used in a digital signal processor or the like.

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

本発明は加減算を行う演算回路に関し、少なくとも最下
段のキャリー入力を制御することにより、A+BとA+
B+1.A−BとA−B−1のような変則計算が容易忙
行えるようにするものである。
The present invention relates to an arithmetic circuit that performs addition and subtraction, and by controlling at least the carry input at the bottom stage, A+B and A+
B+1. This allows irregular calculations such as A-B and A-B-1 to be easily performed.

〔従来の技術〕[Conventional technology]

例えば2入力の加算回路においては、A及びBの入力に
対してA+Bの出力を得ることができる。
For example, in a two-input adder circuit, an output of A+B can be obtained for inputs A and B.

その場合にA+Bの出力以外にもA+B+tの出力を得
ることができれば、ディジタル信号プロセッサ等におい
て種々の処理に有効に利用することができる。
In that case, if an output of A+B+t can be obtained in addition to the output of A+B, it can be effectively used for various processing in a digital signal processor or the like.

ところがこのようなA+B+1の演算を行うには、従来
はB+1のような数値をあらかじめ用意するか、加算出
力にさらに1を加算する構成を設ける必要があシ、ソフ
ト的あるいはハード的に容易に実行することができなか
った。
However, in order to perform such an operation of A+B+1, conventionally it was necessary to prepare a numerical value such as B+1 in advance, or to provide a configuration that further adds 1 to the addition output, but this cannot be easily performed using software or hardware. I couldn't.

ところで例えば加算回路において、演算結果が回路の桁
数を越える場合には、桁上げを示すいわゆるキャリー信
号が出力されるようになっている。
By the way, in an adder circuit, for example, if the calculation result exceeds the number of digits of the circuit, a so-called carry signal indicating a carry is output.

そして多桁の演算を行う場合には、このキャリー信号を
上位桁の演算回路に供給して桁上げ演算が行われる。従
って多桁の演算を行う場合には、複数の演算回路が設け
られ、各演算回路のキヤIJ +出力が順次上位桁の演
算回路のキャリー入力に接続されると共に1最下位桁の
演算回路ではそれよ如下位からの桁上げは有)得ないの
でキャリー入力は接地されている。
When performing multi-digit arithmetic, this carry signal is supplied to the higher-order digit arithmetic circuit to perform the carry operation. Therefore, when performing multi-digit arithmetic, multiple arithmetic circuits are provided, and the carry IJ+ output of each arithmetic circuit is sequentially connected to the carry input of the arithmetic circuit of the most significant digit. Since a carry from the lower order is not possible, the carry input is grounded.

本願発明者はこの点に着目したものである。The inventor of the present application has focused on this point.

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

従来の回路ではA+B+1のような変則計算を容易に行
うことができないなどの問題点があった。
Conventional circuits have had problems such as not being able to easily perform irregular calculations such as A+B+1.

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

本発明は、1以上の加算または減算回路51)め・・・
で構成される演算回路において、上記加算または減算回
路の少なくとも最下段6υのキャリー入力に任意に1−
!たは0のデータを供給(レジスタ(7))できるよう
にした演算回路である。
The present invention provides one or more addition or subtraction circuits 51)...
In the arithmetic circuit composed of the above-mentioned addition or subtraction circuit, 1- is arbitrarily applied to the carry input of at least the bottom stage 6υ.
! This is an arithmetic circuit that can supply (register (7)) data of 0 or 0 (register (7)).

〔作用〕[Effect]

これによれば、最下位段のキャリー入力を制御すること
Kより、A+8+1 、 A−B−1の変則計算を極め
て容易に実行することができる。
According to this, by controlling the carry input of the lowest stage, the irregular calculations of A+8+1 and A-B-1 can be executed extremely easily.

〔実施例〕〔Example〕

図において、データノ々ス(1)からのr−夕がレジス
タ+21 (31K供給されると共K、コントロール・
々ス(4)からそれぞれ所定の制御信号がレジスタf2
1 f31に供給されて、加算すべきデータA、Bがそ
れぞれレジスタ(2) f31に書込まれる。この書込
まれたデータA、Bがそれぞれ対応する所定の桁ごとに
加算回路t!5D(52・・・(5n)に供給される。
In the figure, the data from the data node (1) is supplied to the register +21 (31K, and the control
Predetermined control signals from each bus (4) are sent to register f2.
1 f31, and data A and B to be added are respectively written to register (2) f31. Addition circuit t! for each predetermined digit corresponding to the written data A and B! 5D (52...(5n)).

この加算回路(51) (52・・・(5n)において
、それぞれ下位桁のキャリー出力が次の上位桁のキャリ
ー入力に供給され、これKよって多桁の加算回路が構成
される。そしてこの加算回路51)53・・・(5n)
からの加算されたデータがレジスタ(6)K供給される
と共に、コントロールパス(4)からの所定の制御信号
がレジスタ(6)に供給されて、加算されたデータがデ
ータ/9ス(1)に読出される。
In these adder circuits (51) (52...(5n), the carry output of the lower digit is supplied to the carry input of the next higher digit, and this K constitutes a multi-digit adder circuit. Circuit 51) 53...(5n)
The added data is supplied to the register (6) K, and a predetermined control signal from the control path (4) is supplied to the register (6), and the added data is supplied to the data/9 path (1). is read out.

さらにデータバス(1)からのデータが1ビツトのレジ
スタ(7)に供給されると共に、コントロールパス(4
)からの所定の制御信号がレジスタ(7)に供給されて
、*1.nまたは0″のデータがレジスタ(7)に書込
まれる。このレジスタ(7)からのデータが最下位の加
算回路61)のキャリー入力に供給される。
Furthermore, data from the data bus (1) is supplied to a 1-bit register (7), and the control path (4
) is supplied to the register (7), *1. Data n or 0'' is written to register (7). Data from this register (7) is supplied to the carry input of the lowest adder circuit 61).

従ってこの回路において、レジスタ(力に書込まれたデ
ータが′fO″のときは従来同様KA+Bの演算が行わ
れると共に、レジスタ(7)のデータが1′になると、
A+8−+−4の演算が行われる。
Therefore, in this circuit, when the data written in the register (force) is 'fO', the calculation of KA+B is performed as in the conventional case, and when the data in the register (7) becomes 1',
An operation of A+8-+-4 is performed.

こうしてA+BとA+B+1の変則計算が行われるわけ
であるが、上述の回路によれば最下位のキャリー入力に
”0”または”1”を供給するのみなので、極めて容易
に変則計算を実行することができる。
In this way, the irregular calculations of A+B and A+B+1 are performed, but according to the circuit described above, only "0" or "1" is supplied to the lowest carry input, so it is extremely easy to perform the irregular calculations. can.

なお上述の例では1ビツトのレジスタ(刀を設けるよう
にしたが、これは任意のデータレジスタの内の1ビツト
を流用するようKしてもよい。
In the above example, a 1-bit register was provided, but one bit of any data register may be used instead.

また上述の例は加算回路について述べたが、減算回路の
場合にはA−BとA−8−1の変則計算を実行すること
ができる。
Further, although the above example describes an addition circuit, in the case of a subtraction circuit, irregular calculations of AB and A-8-1 can be executed.

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

この発明によれば、最下位段のキャリー入力を制御する
ことにより、A+B+1 、 A−B−1の変則計算を
極めて容易に実行することができるようKなった。
According to this invention, by controlling the carry input of the lowest stage, the irregular calculations of A+B+1 and AB-1 can be executed extremely easily.

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

図は本発明の一例の構成図である。 (1)はデータノ々ス、f2) (3) (6) (7
)はレジスタ、(4)はコントロールパス、51)52
・・・(5n)は加算回路である。
The figure is a configuration diagram of an example of the present invention. (1) is datanos, f2) (3) (6) (7
) is a register, (4) is a control path, 51) 52
...(5n) is an adder circuit.

Claims (1)

【特許請求の範囲】 1以上の加算または減算回路で構成される演算回路にお
いて、 上記加算または減算回路の少なくとも最下段のキャリー
入力に任意に1または0のデータを供給できるようにし
た演算回路。
[Scope of Claim] An arithmetic circuit comprising one or more addition or subtraction circuits, wherein data of 1 or 0 can be arbitrarily supplied to at least a carry input at the lowest stage of the addition or subtraction circuit.
JP3696286A 1986-02-21 1986-02-21 Arithmetic circuit Pending JPS62194541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3696286A JPS62194541A (en) 1986-02-21 1986-02-21 Arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3696286A JPS62194541A (en) 1986-02-21 1986-02-21 Arithmetic circuit

Publications (1)

Publication Number Publication Date
JPS62194541A true JPS62194541A (en) 1987-08-27

Family

ID=12484360

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3696286A Pending JPS62194541A (en) 1986-02-21 1986-02-21 Arithmetic circuit

Country Status (1)

Country Link
JP (1) JPS62194541A (en)

Similar Documents

Publication Publication Date Title
US4761760A (en) Digital adder-subtracter with tentative result correction circuit
JPH07210368A (en) Efficient handling method by hardware of positive and negative overflows generated as result of arithmetic operation
US4071905A (en) Full adder/subtractor circuit employing exclusive OR logic
JPS63278136A (en) Arithmetic circuit
US5125011A (en) Apparatus for masking data bits
JPS62191926A (en) Arithmetic unit
JPS6125245A (en) Rounding process circuit
JPH034936B2 (en)
JP3433588B2 (en) Mask data generation circuit and bit field operation circuit
JPS62194541A (en) Arithmetic circuit
US5333120A (en) Binary two's complement arithmetic circuit
JPH01187630A (en) Size comparison circuit
JPS63111535A (en) Data processor
JPS622328B2 (en)
JPS6152493B2 (en)
JPS62160529A (en) Data processor
JPS62249228A (en) Shift device
SU746509A1 (en) Binary-decimal adder
JPH02178833A (en) Adder for adding data different in bit length
JPH06309147A (en) Arithmetic and logic unit
JPH0443473A (en) Neuron circuit
JPS62249227A (en) Shift device
JPS62284470A (en) Multiplier circuit with accumulator
JPH0476785A (en) Image arithmetic circuit
JPH04246722A (en) Adder/subtracter