JPS62274425A - Adder with shifter - Google Patents

Adder with shifter

Info

Publication number
JPS62274425A
JPS62274425A JP61118636A JP11863686A JPS62274425A JP S62274425 A JPS62274425 A JP S62274425A JP 61118636 A JP61118636 A JP 61118636A JP 11863686 A JP11863686 A JP 11863686A JP S62274425 A JPS62274425 A JP S62274425A
Authority
JP
Japan
Prior art keywords
input
adder
data
shifter
addition
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
JP61118636A
Other languages
Japanese (ja)
Inventor
Sadaji Emori
貞治 江守
Toshio Ichige
市毛 敏雄
Masatoshi Tachibana
立花 正敏
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 JP61118636A priority Critical patent/JPS62274425A/en
Publication of JPS62274425A publication Critical patent/JPS62274425A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To eliminate an exclusive rounding adder, and to contrive the reduction of the time required for a rounding addition, by executing the rounding addition after the right shift, by using an adder having a usual carry input. CONSTITUTION:When an input data is inputted to a shifter 2 as input signals I1, I2...In, and also, a shift control 3 is inputted, the shifter 2 outputs data of H0, H1...Hn in accordance with a shift amount. This signal becomes one input of an adder, and H0 is inputted to the carry input CIN of the adder. Ji, J2...Jn being the input data of the other are inputted at the same time as H0, H1...Hn being outputs of the shifter, therefore, the adder 1 executes addition by H1, H2...Hn and J1, J2...Jn. In such case, if a value of H0 is '1', the simultaneous addition is executed as a carry input from the carry input CIN, and K1, K2...Kn are outputted as outputs.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機などに使用される加算器に関し、と
くに入力間の丸め動作を含む桁合わせ動作と加算動作を
同時に行うシフタ付き加算器に関するものでるる。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to an adder used in electronic computers, etc., and particularly relates to an adder with a shifter that simultaneously performs a digit alignment operation including a rounding operation between inputs and an addition operation. It comes out.

〔従来の技術〕[Conventional technology]

第4図及び第5図に固定小数魚形演算器を利用した場合
の従来技術での実現例を示す。小数点位置の異なる2数
を加算する場合は、左又は右へのシフト操作を行ってか
ら、加算する必要がある。
FIG. 4 and FIG. 5 show an example of implementation using the conventional technology when using a fixed-point fish-shaped arithmetic unit. When adding two numbers with different decimal point positions, it is necessary to perform a shift operation to the left or right before adding them.

第4図の例では、入力データAを3ビツト左シフトして
入力データBの小数点位置に合わせてから加算を行って
いるが、正の値同士を加算しているに本九九りちす、ト
位の卆衣ビットづ1Mかぬ−加算結果はオーバーフロー
を起こし、正しい結果が得られない。このため右シフト
による小数点の位置合わせが必要となシ、第5図の例の
様に右シフトによる加算が必要となる。この例でに入力
データEf5ビット右シフトして、入力データAの小数
点位置に合わせてから加算を行っているので、加算結果
はオーバーフローを起こさない。しかし、第5図の例の
ように右シフト時に5ビツト分のALL“1”データが
桁落ちし、正確彦結果が得られない。このため、この桁
落ちの最上位ビットのデータを右シフト後の最下位ビッ
トに丸め加算することによシ、精度を保証することが必
要である。
In the example shown in Figure 4, input data A is shifted to the left by 3 bits to match the decimal point position of input data B, and then addition is performed. , the result of addition of 1M bits per bit causes an overflow, and a correct result cannot be obtained. Therefore, it is necessary to align the decimal point by shifting to the right, and addition by shifting to the right is required as in the example of FIG. In this example, input data Ef is shifted to the right by 5 bits to match the decimal point position of input data A before addition is performed, so the addition result does not cause overflow. However, as in the example shown in FIG. 5, when shifting to the right, 5 bits of ALL "1" data lose digits, making it impossible to obtain accurate results. Therefore, it is necessary to ensure accuracy by rounding and adding the data of the most significant bit of this digit loss to the least significant bit after being shifted to the right.

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

従来のこの種の加算器は、シフト機能と丸め加算機能と
加算機能を独立に実現する場合、ノ・−ドウエア量の増
加と若干の処理時間の増加を招くといり欠点がある。ま
た、丸め機能と加算機能を共通化するとハードウェア量
の増加は押さえられるが、処理時間の大幅な増加を招く
といりに欠点がある。
Conventional adders of this type have disadvantages in that, when independently implementing the shift function, rounding addition function, and addition function, an increase in the amount of node hardware and a slight increase in processing time are caused. Further, if the rounding function and addition function are shared, the increase in hardware amount can be suppressed, but there is a drawback in that it causes a significant increase in processing time.

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

本発明は従来の問題点を解決し、演算時間の短縮と丸め
加算器を不要としたシフタ付き加算器で、キャリ入力を
持つ加算器と加算器の前段にシフトによ)桁落ちする最
上位ビットの出力からなるキャリ出力を持つシックを備
えたことを主要件とするもので、第1の入力データ幅の
第1のデータ入力とキャリ入力を入力とする第1の入力
と、第2の入力データ幅の第2のデータ入力を入力とす
る第2の入力を持つ加算器と、前記第1のデータ入力に
接続するシフタとから構成され、前記第1の入力は、前
記シフタにより算術シフトされた第1の入力データと、
左シフトおよびシフト無しの場合は“0”データをキャ
リ入力とし、右シフトの場合は桁落ちする最上位ビット
データをキャリ入力とするキャリ入力とからなり、前記
加算器において、前記第1の入力と前記第2の入力の加
算を行うことによシ、前記第1の入力および第20人力
間での丸め動作を含む桁合わせ動作と加算動作を同時に
行うことを特徴とする。以下図面にもとづき実施例につ
いて説明する。
The present invention is an adder with a shifter that solves the conventional problems and reduces calculation time and eliminates the need for a rounding adder. The main requirement is to have a chic with a carry output consisting of a bit output, and the first input is the first data input of the first input data width and the carry input, and the second An adder having a second input that receives a second data input having an input data width, and a shifter connected to the first data input, the first input being subjected to arithmetic shifting by the shifter. the first input data,
In the case of a left shift and no shift, "0" data is used as a carry input, and in the case of a right shift, the most significant bit data with digit loss is used as a carry input. By performing the addition of the first input and the second input, a digit adjustment operation including a rounding operation between the first input and the 20th manual input and an addition operation are performed simultaneously. Examples will be described below based on the drawings.

〔実施例〕〔Example〕

第1図において、1はキャリ入力を有する加算器、2は
右シフト時に桁落ちの最上位ビットを出力するシック、
3はシフト制御、4は演算制御、111I2・・・・・
Inはシフタの入力信号、Jl、I2・・・・1%は加
算器1の他方の入力、 Hl、HQ・・・・・H%はシ
フタの出力および加算器1の一方の入力、HQはシフタ
2からの桁落ちのうちの最上位ビット出力かつ加算器1
へのキャリ入力、K1.に2・・・・・Knは加算器1
の出力である。なお、これらの入出力データのビット位
置関係は第2図に示す通)添字外側が上位で6シ、添字
1側が下位ビットである。
In FIG. 1, 1 is an adder with a carry input, 2 is a chic that outputs the most significant bit of digit loss when shifting to the right;
3 is shift control, 4 is calculation control, 111I2...
In is the input signal of the shifter, Jl, I2...1% is the other input of adder 1, Hl, HQ...H% is the output of the shifter and one input of adder 1, HQ is the input signal of adder 1. Most significant bit output from shifter 2 and adder 1
Carry input to K1. 2...Kn is adder 1
This is the output of Note that the bit positional relationship of these input/output data is as shown in FIG. 2.) The outer side of the subscript is the upper 6 bits, and the side of the subscript 1 is the lower bit.

本回路は以下の様に動作する。入力データが、入力信号
11.I2・・・・・Inとしてシフタ2に入力され、
かつ、シフト制御3が入力されるとシフタ2はシフk 
−1!!−Vr 閏l−イl−/n U1M’) 、−
0・−M−t71ギーJ6出力する。この信号は加算器
の一方の入力となシ、HOについては、加算器のキャリ
入力(CIN)に入力される。他方O入力データである
Jl、I2・・・・Jsはシフタ出力でらるHO,Hl
・・・・H%と同時刻に入力されるので、加算器1はH
l 、 HQ・・・・・HnとJl。
This circuit operates as follows. The input data is the input signal 11. I2...Input to shifter 2 as In,
And when shift control 3 is input, shifter 2 shifts to shift k.
-1! ! -Vr l-il-/n U1M') ,-
Outputs 0・-M-t71 ghee J6. This signal is input to one input of the adder; for HO, it is input to the carry input (CIN) of the adder. On the other hand, the O input data Jl, I2...Js are the shifter outputs HO, Hl
...Since it is input at the same time as H%, adder 1 is inputted at the same time as H%.
l, HQ...Hn and Jl.

I2・・・・・1%とで加算を行う。その際、HOO値
が“1″であればキャリ入力CCIN)からの桁上げ入
力として同時加算を行い、出力として、K1.に2・・
・・・Kst出力する。
I2...Addition is made with 1%. At that time, if the HOO value is "1", simultaneous addition is performed as a carry input from the carry input (CCIN), and the output is K1. 2...
...Kst is output.

また、シフタ2における桁落ちの最上位ビットは第2図
に示す様に、1ビツトよシさらに下位に0ビツトの入力
があると見なして池のビットのシフトと同様にアンド・
オアゲートとで構成し、桁上げ出力を作れば良い。また
、一般に市販されているIC化シフタを使用する場合は
、入力側のデータビット位置と出力側のデータビット位
置が対になっておシ、このiまでは右シフト時の桁落ち
ビットの最上位ビットを出力できないので、入出力の最
下位ビットを空きビットとし、入力にはデータ0を入れ
ておぎ、入出力データ全体を上位個に1ビツトずらせて
使用することによシ、桁落ちビットの最上位ピラトラ得
ることができ、これを加算器のキャリー人力に加えるこ
とによシ、丸め加算が同様に実現できる。この場合のI
C化シフタの使い方の例を、本来の使い方の例とともに
第3図α、bに示す。第3図6は本来の使い方、第3図
すは本発明による使い方である。
In addition, as shown in Figure 2, the most significant bit of the digit loss in shifter 2 is assumed to have a 1 bit input, and a 0 bit further down the order, and is input by AND in the same way as the bit shift of the pond.
Just configure it with an OR gate and create a carry output. In addition, when using a commercially available IC shifter, the data bit position on the input side and the data bit position on the output side are paired, and up to this i, the most Since the upper bits cannot be output, the least significant bit of the input/output is an empty bit, data 0 is input to the input, and the entire input/output data is shifted by 1 bit to the upper bit. By adding this to the adder's carry power, rounded addition can be similarly realized. I in this case
An example of how to use the C shifter is shown in FIG. 3 α, b along with an example of its original usage. 3.6 shows the original usage, and FIG. 3.6 shows the usage according to the present invention.

この実施例としては固定小数魚形演算器の場合での説明
を行ったが、浮動小数点の場合も同様に適用可能である
Although this embodiment has been explained in the case of a fixed-point fish-shaped arithmetic unit, it is similarly applicable to the case of a floating-point number.

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

以上述べた様に本発明は、右シフト後の丸め加算を通常
のキャリ入力のある加算器を使用するので、専用の丸め
加算器は不要で6シ、キャリ用の配線を追加するだけで
実現でき、丸め加算のための時間が削減出来る。
As described above, the present invention uses an adder with a normal carry input for rounding addition after right shifting, so there is no need for a dedicated rounding adder, and this can be achieved by simply adding wiring for carry. This reduces the time required for rounding and addition.

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

第2図は入出力データのビット配列、 第3図a、bはIC化シフタの使用法、第4図はデータ
を左シフトして加算する例、第5図はデータを右シフト
して加算する例である。 1・・・キャリ入力を持つ加算器、 2・・°キャリ出力を持つシ7り、 3・・・シフト制御、 4・・・演算制御 特許出願人 日本電信電話株式会社 代理人弁理士玉蟲久五部(外2名) 第1図は本発明の77タ付き加算器の実施例、K1. 
K2.− Kn  出力データ本発明のシフタイすぎカ
ロ算巷の構成実施例第1図 ビ・ソト位置   (上位)n ・・・・・・・・・・
・・・・・・321 (下位)入力データエ  :  
  口に==−==−=]=13.n、10出力テ“−
タJ  :    巨五====]===璽T扇丙σ工
ロ入出力データのビット配列ellはする図画 2 図 第3図
Figure 2 is the bit arrangement of input/output data, Figure 3 a and b are how to use the IC shifter, Figure 4 is an example of shifting data to the left and adding it, Figure 5 is shifting the data to the right and adding it. This is an example. 1...Adder with carry input, 2...Switcher with °carry output, 3...Shift control, 4...Arithmetic control patent applicant Nippon Telegraph and Telephone Corporation's representative patent attorney Hisashi Tamamushi Part 5 (2 people) Fig. 1 shows an embodiment of the adder with 77 data according to the present invention, K1.
K2. - Kn Output data Embodiment of the configuration of the shift tie calculation system of the present invention Figure 1 Bi-soto position (upper) n ・・・・・・・・・・・・
...321 (lower) input data:
In the mouth==-==-=]=13. n, 10 output Te"-
Ta J: Giant five ====] === 璽T fan 丙σ 工郎 input/output data bit array ELL is a diagram 2 Figure 3

Claims (1)

【特許請求の範囲】 第1の入力データ幅の第1のデータ入力とキャリ入力を
入力とする第1の入力と、 第2の入力データ幅の第2のデータ入力を入力とする第
2の入力を持つ加算器と、 前記第1のデータ入力に接続するシフタと から構成され、 前記第1の入力は、 前記シフタにより算術シフトされた第1の入力データと
、 左シフトおよびシフト無しの場合は“0”データをキャ
リ入力とし、右シフトの場合は桁落ちする最上位ビット
データをキャリ入力とするキャリ入力とからなり、 前記加算器において、前記第1の入力と前記第2の入力
の加算を行うことにより、前記第1の入力および第2の
入力間での丸め動作を含む桁合わせ動作と加算動作を同
時に行う ことを特徴とするシフタ付き加算器。
[Claims] A first input having a first data input and a carry input having a first input data width; and a second input having a second data input having a second input data width. an adder having an input, and a shifter connected to the first data input, the first input being: the first input data arithmetic shifted by the shifter; left shift and no shift; consists of a carry input in which "0" data is used as a carry input, and in the case of a right shift, the most significant bit data with digit loss is used as a carry input, and in the adder, the first input and the second input are An adder with a shifter, characterized in that by performing addition, a digit alignment operation including a rounding operation between the first input and the second input and an addition operation are performed simultaneously.
JP61118636A 1986-05-23 1986-05-23 Adder with shifter Pending JPS62274425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61118636A JPS62274425A (en) 1986-05-23 1986-05-23 Adder with shifter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61118636A JPS62274425A (en) 1986-05-23 1986-05-23 Adder with shifter

Publications (1)

Publication Number Publication Date
JPS62274425A true JPS62274425A (en) 1987-11-28

Family

ID=14741439

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61118636A Pending JPS62274425A (en) 1986-05-23 1986-05-23 Adder with shifter

Country Status (1)

Country Link
JP (1) JPS62274425A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02194428A (en) * 1989-01-24 1990-08-01 Oki Electric Ind Co Ltd Arithmetic circuit
JPH04117519A (en) * 1990-09-07 1992-04-17 Mitsubishi Electric Corp Rounding circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02194428A (en) * 1989-01-24 1990-08-01 Oki Electric Ind Co Ltd Arithmetic circuit
JPH04117519A (en) * 1990-09-07 1992-04-17 Mitsubishi Electric Corp Rounding circuit

Similar Documents

Publication Publication Date Title
US4761760A (en) Digital adder-subtracter with tentative result correction circuit
US4866656A (en) High-speed binary and decimal arithmetic logic unit
US4999803A (en) Floating point arithmetic system and method
JPH0431413B2 (en)
US4383304A (en) Programmable bit shift circuit
US4172288A (en) Binary or BCD adder with precorrected result
US3986015A (en) Arithmetic unit for use in a digital data processor and having an improved system for parity check bit generation and error detection
JP3345894B2 (en) Floating point multiplier
EP0234495B1 (en) Arithmetic circuit capable of executing floating point operations and fixed point operations
US6285300B1 (en) Apparatus and method for reducing power and noise through reduced switching recording in logic devices
KR20060057574A (en) Arithmetic unit for addition or subtraction with preliminary saturation detection
EP0295788B1 (en) Apparatus and method for an extended arithmetic logic unit for expediting selected operations
EP0068109B1 (en) Arithmetic and logic unit processor chips
US5506800A (en) Self-checking complementary adder unit
JPS62274425A (en) Adder with shifter
JPH07107664B2 (en) Multiplication circuit
JPH0346024A (en) Floating point computing element
US6202078B1 (en) Arithmetic circuit using a booth algorithm
US3982112A (en) Recursive numerical processor
JPH0467212B2 (en)
JPH0619700B2 (en) Arithmetic unit
JPS60245046A (en) Logical shift arithmetic circuit
SU572785A1 (en) Adder for adding two m-digit numbers
SU690479A1 (en) Dingle-digit decimal adder
JPS62120535A (en) Parallel multiplier