JPH05233217A - Three-input rounding addition circuit - Google Patents

Three-input rounding addition circuit

Info

Publication number
JPH05233217A
JPH05233217A JP4034656A JP3465692A JPH05233217A JP H05233217 A JPH05233217 A JP H05233217A JP 4034656 A JP4034656 A JP 4034656A JP 3465692 A JP3465692 A JP 3465692A JP H05233217 A JPH05233217 A JP H05233217A
Authority
JP
Japan
Prior art keywords
input
rounding
adder
circuit
full adder
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
JP4034656A
Other languages
Japanese (ja)
Inventor
Shinji Kojima
晋司 小島
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 JP4034656A priority Critical patent/JPH05233217A/en
Publication of JPH05233217A publication Critical patent/JPH05233217A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/509Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination for multiple operands, e.g. digital integrators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49942Significance control
    • G06F7/49947Rounding
    • G06F7/49963Rounding to nearest

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)

Abstract

PURPOSE:To reduce circuit scale by simultaneously executing the addition of three inputs and the rounding of signals corresponding to lower two digits or less by directly generating a value to be carried to the least significant digit of an output from lower digits. CONSTITUTION:A rounding signal generating circuit 1 outputs plural '1's corresponding to carry to the 3rd digit obtained at the time of adding three inputs and that for half-adjusting processing. Two outputs from the circuit 1 are connected to two inputs of a full adder 2 and both the outputs are simultaneously added to the 3rd sum output outputted from a full adder 3 to obtain a rounded three-input added result.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は3入力丸め加算回路に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a 3-input rounding and adding circuit.

【0002】[0002]

【従来の技術】従来の整数化機能つき3入力加算器の構
成を図2に示す。図2において、(X10-1-2)、
(Y10-1-2)及び(Z10-1-2)が入力であ
る3つの数で、X1、X0、Y1、Y0、Z1およびZ0が整
数部であり、X-1、X-2、Y-1、Y-2、Z-1およびZ-2
が小数部である。6は桁上げ生成器、7〜9、11、1
2は全加算器、10、13〜16は半加算器である。こ
の3入力加算器では、図2中、全加算器7で小数部第1
位のみの加算を行う。桁上げ生成器6で小数部第2位の
みの加算を行い桁上がりを出力する。全加算器7の和出
力と桁上げ生成器6の桁上がりの出力とを半加算器10
で加算し、和出力から小数部第1位の値を得る。半加算
器10の桁上げ出力と、全加算器7の桁上げ出力と、整
数部最下位を入力に持つ全加算器8の和出力とを全加算
器11で加算して整数部最下位を得る。
2. Description of the Related Art FIG. 2 shows the configuration of a conventional 3-input adder with an integerizing function. In FIG. 2, (X 1 X 0 X -1 X -2 ),
Three numbers of which (Y 1 Y 0 Y -1 Y -2 ) and (Z 1 Z 0 Z -1 Z -2 ) are input, X 1 , X 0 , Y 1 , Y 0 , Z 1 and Z 0 is an integer part, and X -1 , X -2 , Y -1 , Y -2 , Z -1 and Z -2
Is the fractional part. 6 is a carry generator, 7-9, 11, 1
2 is a full adder and 10 and 13 to 16 are half adders. In this three-input adder, the full adder 7 in FIG.
Only the place is added. The carry generator 6 adds only the second decimal place and outputs a carry. The half adder 10 compares the sum output of the full adder 7 and the carry output of the carry generator 6.
Then, the value of the first decimal place is obtained from the sum output. The carry output of the half adder 10, the carry output of the full adder 7, and the sum output of the full adder 8 having the lowest integer part as input are added by the full adder 11 to obtain the lowest integer part. obtain.

【0003】ここまでで3入力の加算が済むが、さらに
半加算器14で小数部第1位の値と全加算器11の和出
力を加算して四捨五入された整数部S0を得る。半加算
器14からの桁上げを処理するために整数部の全ビット
に半加算器が必要である。これらは図2中では半加算器
15および16である。
Up to this point, addition of three inputs is completed, but the half adder 14 further adds the value of the first decimal place and the sum output of the full adder 11 to obtain a rounded integer part S 0 . A half adder is required for all bits in the integer part to handle the carry from half adder 14. These are half adders 15 and 16 in FIG.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記従
来の3入力加算器では、整数化のために半加算器14、
15および16が必要であった。これにより、上記3入
力加算器を用いた装置では回路規模を低減するのが困難
であった。
However, in the above-mentioned conventional 3-input adder, the half adder 14,
15 and 16 were required. Therefore, it is difficult to reduce the circuit scale in the device using the 3-input adder.

【0005】本発明はかかる点に鑑み、簡易な構成で回
路規模の低減が容易な3入力丸め機能つき加算回路を提
供することを目的とする。
SUMMARY OF THE INVENTION In view of the above points, an object of the present invention is to provide an adder circuit with a three-input rounding function which has a simple structure and can easily reduce the circuit scale.

【0006】[0006]

【課題を解決するための手段】3入力丸め加算回路にお
いて、丸めを行う桁以下の位のビットを第1のビット
群、丸めを行う桁より上位のビットを第2のビット群と
した場合、入力として前記第1のビット群を持ち、2本
の出力を持つ丸め信号生成回路を備え、前記丸め信号生
成回路の入力と出力の関係は、入力から定まる、桁上げ
信号の値と四捨五入による桁上げ信号の値との和を用い
てテーブル化されており、前記丸め信号生成回路の出力
と前記第2のビット群の最下位ビットの和出力を加算し
て丸め処理を行う。
In the 3-input rounding adder circuit, when the bits below the digit to be rounded are the first bit group and the bits higher than the digit to be rounded are the second bit group, A rounding signal generation circuit having the first bit group as an input and having two outputs is provided, and the relationship between the input and the output of the rounding signal generation circuit is determined by the input, the value of the carry signal and the digit by rounding. A table is formed using the sum of the values of the raising signal, and the rounding process is performed by adding the output of the rounding signal generation circuit and the sum output of the least significant bits of the second bit group.

【0007】[0007]

【作用】入力される信号の組合せにより加算時の桁上げ
信号および四捨五入時の桁上げ信号は算出可能である。
この2つの信号を1つ上位の桁に加算しなくてはならな
い。丸め信号生成回路に入力される信号を小数であると
見なしたとき、その総和の最大値は、2ビットならば
2.25であり、1ビットならば1.5である。このた
め、桁上げ信号と四捨五入時の桁上げ信号との和は0、
1または2のいずれかであり、2本の出力を用いて各々
(0、0)、(0、1)または(1、1)と出力する。
この2ビット出力と、丸めを行わない最下位ビットの和
出力1ビットとを3ビット入力である全加算器に入力す
ることが可能である。
The carry signal at the time of addition and the carry signal at the time of rounding can be calculated by the combination of the input signals.
These two signals must be added to the next higher digit. When the signal input to the rounding signal generation circuit is regarded as a decimal number, the maximum value of the total sum is 2.25 for 2 bits and 1.5 for 1 bit. Therefore, the sum of the carry signal and the carry signal at rounding is 0,
It is either 1 or 2, and two outputs are used to output (0, 0), (0, 1) or (1, 1), respectively.
It is possible to input this 2-bit output and the 1-bit sum output of the least significant bit that is not rounded to a 3-bit input full adder.

【0008】[0008]

【実施例】図1は本発明の第1の実施例である、3入力
加算回路の構成を示すブロック図である。図1中(X1
0ー1-2)、(Y10-1-2)及び(Z10-1
-2)が入力である3つの数で、X1、X0、Y1、Y0
1およびZ0が整数部であり、X-1、X-2、Y-1
-2、Z-1およびZ-2が小数部である。図1中、1は丸
め信号生成回路、2、3は全加算回路、4、5は信号経
路、C1、C0、S1、S0は丸め加算出力で、丸め信号生
成回路1は(表1)の真理値表で構成される。
1 is a block diagram showing the configuration of a 3-input adder circuit according to a first embodiment of the present invention. In Fig. 1 (X 1
X 0 X -1 X -2 ), (Y 1 Y 0 Y -1 Y -2 ) and (Z 1 Z 0 Z -1
Z -2 ) is an input three numbers, X 1 , X 0 , Y 1 , Y 0 ,
Z 1 and Z 0 are integer parts, and X -1 , X -2 , Y -1 ,
Y -2 , Z -1 and Z -2 are the fractional part. In FIG. 1, 1 is a rounding signal generation circuit, 2 and 3 are full addition circuits, 4 and 5 are signal paths, C 1 , C 0 , S 1 and S 0 are rounding addition outputs, and the rounding signal generation circuit 1 is ( It consists of the truth table in Table 1).

【0009】[0009]

【表1】 [Table 1]

【0010】(表1)中の(O1、O0)は2ビット3入
力の加算及び四捨五入の結果、整数部最下位に加えるべ
き値が0、1及び2の時、各々(0、0)、(0、1)
および(1、1)となるように生成される。図1中、信
号経路4がO1、信号経路5がO0であり、全加算器2の
2つの入力に各々接続する。残る1つの入力は整数部最
下位を入力に持つ全加算器3の和出力が接続される。
(O 1 , O 0 ) in Table 1 is a result of addition and rounding of 2 bits and 3 inputs, and when the value to be added to the least significant part of the integer part is 0, 1 and 2, respectively (0, 0) ), (0, 1)
And (1, 1). In FIG. 1, the signal path 4 is O 1 and the signal path 5 is O 0 , which are respectively connected to the two inputs of the full adder 2. The remaining one input is connected to the sum output of the full adder 3 having the lowest integer part as an input.

【0011】このように(表1)に従えば、小数部を加
算した結果を整数化する場合に正しい結果を容易に得ら
れる。このとき、(表1)の入力と出力の関係は組合せ
回路で実現できる。また、整数部の演算は、最下位ビッ
トを除けば通常の加算器と同様のやり方で実行される。
As described above (Table 1), a correct result can be easily obtained when the result of adding the fractional parts is converted into an integer. At this time, the relationship between the input and the output in (Table 1) can be realized by a combinational circuit. The operation of the integer part is performed in the same manner as a normal adder except for the least significant bit.

【0012】本発明の第2の実施例として、入力データ
が(X10-1)、(Y10-1)及び(Z10-1
である場合を示す。この場合(O1、O0)を真理値表
(表2)で生成し、丸め信号生成回路とすれば図1の構
成で、X-2、Y-2およびZ-2を各々0としたときと等価
であり、3入力丸め加算回路が構成できる。
As a second embodiment of the present invention, the input data is (X 1 X 0 X -1 ), (Y 1 Y 0 Y -1 ) and (Z 1 Z 0 Z -1 ).
Is shown. In this case, (O 1 , O 0 ) is generated by the truth table (Table 2), and if a rounding signal generation circuit is used, X -2 , Y -2 and Z -2 are set to 0 in the configuration of FIG. It is equivalent to the above case, and a 3-input rounding addition circuit can be constructed.

【0013】[0013]

【表2】 [Table 2]

【0014】このとき(表2)の入力と出力の関係は組
合せ回路で実現できる。以上のように本実施例によれ
ば、図2で示す従来例で、四捨五入のために小数部第1
位からの桁上がりを加算していた加算器14、15およ
び16が削減され、回路規模が低減する。さらに小数部
第2位からの桁上がりを計算する加算器10が不要とな
り、速度の面でも有利となる。実際、図2の構成でトラ
ンジスタの数は216個が必要であったが、図1に示す
実施例の構成では、172個に削減され、回路規模低減
が可能となり、IC,LSI用の加算及び丸め回路とし
てその実用的効果は大きい。
At this time, the relationship between the input and output shown in Table 2 can be realized by a combinational circuit. As described above, according to the present embodiment, in the conventional example shown in FIG.
The adders 14, 15 and 16 which have added the carry from the place are eliminated, and the circuit scale is reduced. Further, the adder 10 for calculating the carry from the second decimal place is unnecessary, which is also advantageous in terms of speed. In fact, the number of transistors required in the configuration of FIG. 2 is 216, but in the configuration of the embodiment shown in FIG. 1, the number of transistors is reduced to 172, and the circuit scale can be reduced. Its practical effect is great as a rounding circuit.

【0015】なお、本実施例では小数部の加算結果を四
捨五入する例で説明したが、本発明は小数部の整数化に
限らず、下2桁以内の丸めに使用できる。
In the present embodiment, the example of rounding the addition result of the decimal part has been described, but the present invention is not limited to converting the decimal part to an integer, but can be used for rounding within the last two digits.

【0016】[0016]

【発明の効果】以上のように本発明によれば、3入力の
加算と下位2桁以内の信号の丸めを、出力最下位となる
桁に桁上げされる値を下位の桁から直接生成することに
より同時に行っているので、回路規模の低減が可能とな
り、IC,LSI用の加算及び丸め回路としてその実用
的効果は大きい。
As described above, according to the present invention, the addition of 3 inputs and the rounding of the signal within the lower 2 digits are directly generated from the lower digit to the carry to the lowest output digit. By doing so, the circuit scale can be reduced and the practical effect as an addition and rounding circuit for IC and LSI is great.

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

【図1】本発明の一実施例における3入力丸め加算器の
構成を示すブロック図
FIG. 1 is a block diagram showing the configuration of a 3-input rounding adder according to an embodiment of the present invention.

【図2】従来の3入力加算器の構成を示すブロック図FIG. 2 is a block diagram showing a configuration of a conventional 3-input adder.

【符号の説明】[Explanation of symbols]

1 丸め信号生成回路 2 全加算器 3 全加算器 4 信号経路 5 信号経路 1 Rounding signal generation circuit 2 Full adder 3 Full adder 4 Signal path 5 Signal path

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 入力として3つの数を有し、前記3つの
数の最下位の桁のビットを入力として2ビットの出力を
得る丸め信号生成回路と、前記3つの数の最下位から2
桁目のビットを入力とする第1の全加算器と、前記2ビ
ットの出力と前記第1の全加算器の和出力とを入力とす
る第2の全加算器とを有する3入力丸め加算回路。
1. A rounding signal generation circuit which has three numbers as inputs and obtains a 2-bit output by receiving the bits of the least significant digits of the three numbers, and the rounding signal generating circuit from the least significant two of the three numbers.
Three-input rounding addition having a first full adder that receives the bit of the first digit as an input and a second full adder that receives the output of the two bits and the sum output of the first full adder circuit.
【請求項2】 入力として3つの数を有し、前記3つの
数の最下位の桁と最下位から2桁目までのビットを入力
として2ビットの出力を得る丸め信号生成回路と、前記
3つの数の最下位から3桁目のビットを入力とする第1
の全加算器と、前記2ビットの出力と前記第1の全加算
器の和出力を入力とする第2の全加算器とを有する3入
力丸め加算回路。
2. A rounding signal generation circuit which has three numbers as inputs and which receives the least significant digit and the bits from the least significant digit of the three numbers as inputs and produces a 2-bit output, The first 3 bits from the least significant of the two numbers as input
3-input round adder circuit having a full adder of 2), and a second full adder having the 2-bit output and the sum output of the first full adder as inputs.
JP4034656A 1992-02-21 1992-02-21 Three-input rounding addition circuit Pending JPH05233217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4034656A JPH05233217A (en) 1992-02-21 1992-02-21 Three-input rounding addition circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4034656A JPH05233217A (en) 1992-02-21 1992-02-21 Three-input rounding addition circuit

Publications (1)

Publication Number Publication Date
JPH05233217A true JPH05233217A (en) 1993-09-10

Family

ID=12420489

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4034656A Pending JPH05233217A (en) 1992-02-21 1992-02-21 Three-input rounding addition circuit

Country Status (1)

Country Link
JP (1) JPH05233217A (en)

Similar Documents

Publication Publication Date Title
US6301600B1 (en) Method and apparatus for dynamic partitionable saturating adder/subtractor
JPH0375901B2 (en)
JPS588009B2 (en) digital multiplier
JPH06161713A (en) Many-value adder
JPH0619685A (en) Parallel multiplying circuit
US4727507A (en) Multiplication circuit using a multiplier and a carry propagating adder
JPH0149973B2 (en)
US5875125A (en) X+2X adder with multi-bit generate/propagate circuit
JPH06161712A (en) Multi-value subtracter
JPH05233217A (en) Three-input rounding addition circuit
JPH0981541A (en) Accumulator
JP2991788B2 (en) Decoder
JP2629737B2 (en) accumulator
JPH0778748B2 (en) Galois field arithmetic unit
JP3261742B2 (en) Redundant binary / binary conversion circuit including rounding processing
JP2681968B2 (en) Arithmetic processing unit
JP2575969B2 (en) Floating point multiplier / divider
JP2550597B2 (en) Squarer
JP3166781B2 (en) Adder circuit
JP2599984B2 (en) Input data peak value detection circuit
JP2890412B2 (en) Code conversion circuit
JPH06168101A (en) Method and device for addition
JPS62184534A (en) Arithmetic circuit
JPH052469A (en) Arithmetic circuit for variable-length word-length
JP3567510B2 (en) Interrupt priority judgment circuit