JPS607815B2 - Overflow detection and correction circuit - Google Patents

Overflow detection and correction circuit

Info

Publication number
JPS607815B2
JPS607815B2 JP52113097A JP11309777A JPS607815B2 JP S607815 B2 JPS607815 B2 JP S607815B2 JP 52113097 A JP52113097 A JP 52113097A JP 11309777 A JP11309777 A JP 11309777A JP S607815 B2 JPS607815 B2 JP S607815B2
Authority
JP
Japan
Prior art keywords
output
overflow
input
data
bit
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
Application number
JP52113097A
Other languages
Japanese (ja)
Other versions
JPS5446443A (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 JP52113097A priority Critical patent/JPS607815B2/en
Priority to US05/943,836 priority patent/US4215415A/en
Publication of JPS5446443A publication Critical patent/JPS5446443A/en
Publication of JPS607815B2 publication Critical patent/JPS607815B2/en
Expired legal-status Critical Current

Links

Description

【発明の詳細な説明】 本発明は桁あふれ検出及び訂正回路に関する。[Detailed description of the invention] The present invention relates to overflow detection and correction circuits.

2次巡回形ディジタルフィル外こおいて、加算器の出力
に生じる桁あふれはリミットサイクルと呼ばれる発振現
象を引き起こす可能性があり、問題となる。
Outside of the secondary cyclic digital filter, overflow occurring in the output of the adder may cause an oscillation phenomenon called a limit cycle, which poses a problem.

このため、桁あふれ検出を桁あふれ訂正を行ないリミッ
トサイクルを生じさせないようにすることが必要となる
。以下の説明では、入出力デー外ますべて2の桶数表示
とし、最小重みビット(以下LSBと略称)が時間的に
最初にくるような直列データ形式とする。
Therefore, it is necessary to perform overflow detection and overflow correction to prevent limit cycles from occurring. In the following explanation, all input and output data will be expressed as 2 bucket numbers, and the data will be in a serial data format in which the least weighted bit (hereinafter abbreviated as LSB) comes first in time.

第1図は従来から用いられている桁あふれ検出回路の一
例を示したものである。
FIG. 1 shows an example of a conventional overflow detection circuit.

端子1,2には加算すべき2つのデータX,Yが入力さ
れ、端子3には加算後のデータZ=X十Yが入力される
Two data X and Y to be added are input to terminals 1 and 2, and data Z=X+Y after addition is input to terminal 3.

さらに、端子4には符号(極性)ビット(以下MSBと
略称)の位置を示すタイミングパルスが入力される。加
算すべき2個の入力データ×,Yの符号(極性)が共に
負ぐ1”)でありかつ加算後のデータZの符号(極性)
が正(‘‘0”)である場合は、NAND素子10の出
力は“1”となって端子100に出力され、負の桁あふ
れを起こしたことを示す。逆に、加算すべき2つの入力
データ×,Yの符号が共に正(‘‘0”)であり、かつ
加算後のデータZの符号が負(“1”)である場合は、
NAND素子020の出力が“1”となって端子200
1こ出力され、正の桁あふれを起こしたことを示す。
Furthermore, a timing pulse indicating the position of a sign (polarity) bit (hereinafter abbreviated as MSB) is input to the terminal 4. The two input data to be added ×, the sign (polarity) of Y are both negative 1”) and the sign (polarity) of data Z after addition
is positive (''0''), the output of the NAND element 10 becomes "1" and is output to the terminal 100, indicating that a negative overflow has occurred. If the signs of input data x and Y are both positive (''0''), and the sign of data Z after addition is negative (``1''),
The output of NAND element 020 becomes “1” and terminal 200
1 is output, indicating that a positive overflow has occurred.

第2図は従来から用いられている桁あふれ訂正回路の一
例を示したものである。
FIG. 2 shows an example of a conventional overflow correction circuit.

端子1,2には正の桁あふれを検出した情報がタ入力さ
れ、端子3,4には負の桁あふれを検出した情報が入力
される。
Information indicating that a positive overflow has been detected is input to terminals 1 and 2, and information indicating that a negative overflow has been detected is input to terminals 3 and 4.

ここでは、桁あふれ検出回路が2組あると想定している
Here, it is assumed that there are two sets of overflow detection circuits.

また端子5には絶対値が最大の正の数が入力され、端子
6には絶対値が最大の負の数が入力される。
Further, the positive number with the maximum absolute value is input to the terminal 5, and the negative number with the maximum absolute value is input to the terminal 6.

以上のような構成により桁あふれを起こした場合には、
符号に応じた絶対値の最大数が端子8に得られる。また
、桁あふれを起こさない時には、端子7に入力されたデ
ータZがそのまま端子8に出力される。第3図は第1図
に示した桁あふれ検出回路と第2図に示した桁あふれ訂
正回路とを組合わせて機成した桁あふれ検出及び訂正回
路のブロック図である。
If overflow occurs due to the above configuration,
The maximum number of absolute values depending on the sign is available at terminal 8. Further, when no overflow occurs, the data Z input to the terminal 7 is output to the terminal 8 as is. FIG. 3 is a block diagram of an overflow detection and correction circuit constructed by combining the overflow detection circuit shown in FIG. 1 and the overflow correction circuit shown in FIG. 2.

参照数字1川ま第1図に示した桁あふれ検出回路、参照
数字20及び30はフリツプフロップ、参照数字40は
正および負の最大値発生回路、参照数字50は第2図に
示した桁あふれ検出回路、参照数字60は1語長分のシ
フトレジスタである。
Reference numeral 1 means the overflow detection circuit shown in Figure 1, reference numerals 20 and 30 refer to flip-flops, reference numeral 40 represents the positive and negative maximum value generation circuit, reference numeral 50 represents the overflow detection circuit shown in Figure 2. The circuit, reference numeral 60, is a one word length shift register.

第1図に示したように、端子1,2には加算すべき2つ
のデータが入力され、端子3には加算後のデータが入力
される。
As shown in FIG. 1, two data to be added are input to terminals 1 and 2, and data after addition is input to terminal 3.

また、正の桁あふれが起こった時、MSBの時点で端子
11が“1”となり、負の桁あふれが起こった時MSB
の時点で端子12が“1”となる。従って、桁あふれを
起こしたデータを訂正するためにはフリツプフロツプ2
0及び21を用いて桁あふれを起こしたか否かの情報を
一語長分保持しておく必要がある。さらに、加算後のデ
ータをシフトレジスタ6川こ与え、1語長(1データ)
分遅延させた出力61と正および負の最大数発生回路4
0の出力41及び42とフリップフロップ20の出力2
1及びフリップフロップ30の出力31とを桁あふれ訂
正回路50の入力とすれば、端子4には桁あふれを訂正
された出力データが得られる。以上述べたように、従来
の桁あふれ検出回路及び桁あふれ訂正回路には、SS1
(スモール・サイズド・インテグレイテツド・サーキッ
ト)が用いられるためにICの個数も多くハードウェア
規模の増大を招来する欠点がある。
Also, when a positive overflow occurs, terminal 11 becomes "1" at the MSB, and when a negative overflow occurs, the MSB
At the time point, the terminal 12 becomes "1". Therefore, in order to correct data that has caused overflow, flip-flop 2
It is necessary to hold information for one word length as to whether or not overflow has occurred using 0 and 21. Furthermore, the data after the addition is given to 6 shift registers, and the length is 1 word (1 data).
output 61 delayed by minutes and positive and negative maximum number generation circuit 4
0 outputs 41 and 42 and the output 2 of flip-flop 20
1 and the output 31 of the flip-flop 30 are input to the overflow correction circuit 50, output data with overflow corrected is obtained at the terminal 4. As mentioned above, the conventional overflow detection circuit and overflow correction circuit have SS1
(Small sized integrated circuit) is used, so there is a disadvantage that the number of ICs is large and the hardware scale increases.

本発明の目的は桁あふれ検出回路と桁あふれ訂正回路を
一体化しその構成を簡単にした桁あふれ検出及び訂正回
路を提供することにある。
An object of the present invention is to provide an overflow detection and correction circuit that integrates an overflow detection circuit and an overflow correction circuit and has a simplified configuration.

本発明の他の目的は回路規模の小さい桁あふれ検出及び
訂正回路を提供することにある。
Another object of the present invention is to provide an overflow detection and correction circuit with a small circuit scale.

本発明の桁あふれ検出及び訂正回路は、読出し専用メモ
リとシフトレジスタと第1、第2および第3のフリップ
フロップ3個とを備え、前記3個のフリツプフロツプ出
力と前記シフトレジスタの出力と2種類のタイミングパ
ルスと3種類の直列データX,Y,Zとを前記議出し専
用メモリの9入力とし、前記議出し専用メモリの3出力
のうち2出力をそれぞれ前記第1および第2のフリップ
フロップの入力とし、前記直列データZを前記第3のフ
リツプフロップと前記シフトレジス夕との0入力とする
ように構成したことを特徴とする。
The overflow detection and correction circuit of the present invention includes a read-only memory, a shift register, and three first, second, and third flip-flops, and has two types of outputs: the outputs of the three flip-flops and the output of the shift register. The timing pulse and three types of serial data X, Y, and Z are used as 9 inputs of the above-mentioned input-only memory, and 2 outputs out of 3 outputs of the above-mentioned input-only memory are connected to the first and second flip-flops, respectively. It is characterized in that the serial data Z is configured to be used as a 0 input to the third flip-flop and the shift register.

まず、本発明について説明する前に1語長のビット数と
桁あふれとの関係について述べる。データ語長をMビッ
トとし、小数点以下(M−2)ビットとして考える。こ
の場合、表示可能なタデータ×の値は−2ミ×<2とな
る。今、加算すべき2個のデータをX,Yまた、それら
の和のデータをZとする。但し、Z=X十Yであり、X
,Y,Z共にMビットで表わすものとする。また、入力
データX,Yは一2ミX<2、一2SY<2の範囲にあ
るものとし、出力Zは−ISZく1の条件を満たすもの
とする。従って、Zは−4SZ<4となり、一ISZ<
1の条件を満たさないZは桁あふれを起こしたものと見
なされる。従って、桁あふれが生じる場合は次の2通り
に限定される。第1には、Zが−2ミZ<−1,1ミZ
<2の範囲にある場合である。
First, before explaining the present invention, the relationship between the number of bits of one word length and overflow will be described. Let the data word length be M bits, and consider it as (M-2) bits below the decimal point. In this case, the value of the data x that can be displayed is -2mi x<2. Now, assume that the two data to be added are X and Y, and the data of their sum is Z. However, Z=X0Y, and
, Y, and Z are all expressed in M bits. It is also assumed that the input data X and Y are in the range of -2x<2, -2SY<2, and the output Z satisfies the condition -ISZ<1. Therefore, Z becomes -4SZ<4, and -ISZ<
Z that does not satisfy condition 1 is considered to have caused an overflow. Therefore, cases where overflow occurs are limited to the following two cases. First, Z is -2miZ<-1,1miZ
<2.

この時には、上位2ビットの一致、不一致を判定して桁
あふれを検出できる。また、この時の桁あふれを起こさ
ない真の符号(樋性)は、ZのMSBに一致している。
第2には、Zが−4SZ<−2,2ミZ<4の範囲にあ
る場合である。この時には、入力データ×,Yが同符号
であり、かつZが異符号になっていることから桁あふれ
を検出できる。また、この時の桁あふれを起こさない真
の符号(極性)は入力データ×またはYのMSBに一致
している。以上述べたように桁あふれは第1の場合と第
2の場合とに限定されるから桁あふれ検出及び桁あふれ
訂正は上記2つの場合について行なえばよいことになる
。次に図面を参照して本発明を詳細に説明する。
At this time, overflow can be detected by determining whether the upper two bits match or do not match. In addition, the true code that does not cause overflow at this time (synchronization) coincides with the MSB of Z.
The second case is when Z is in the range of -4SZ<-2, 2miZ<4. At this time, overflow can be detected because input data x and Y have the same sign, and Z has a different sign. Further, the true sign (polarity) that does not cause overflow at this time matches the MSB of input data x or Y. As described above, overflow is limited to the first case and the second case, so overflow detection and overflow correction can be performed for the above two cases. Next, the present invention will be explained in detail with reference to the drawings.

第4図は本発明の一実施例を示すプ。ック図である。参
照数字3は512ワード×3ビットのROM、参照数字
1,4,5はフリップフロップおよび参照数字Zはシフ
トレジスタである。第4図のROMIに書き込まれた内
容を第1表、第2表及び第3表に示す。第1表 第2表 第1表、第2表及び第3表において、記号OFn‐,,
sn−,,Zn, Zn−,,×,yおよびdiは入力
ビットを示し、記号OFn,snおよびd。
FIG. 4 is a diagram showing one embodiment of the present invention. This is a diagram. Reference numeral 3 is a 512 word x 3 bit ROM, reference numerals 1, 4 and 5 are flip-flops, and reference numeral Z is a shift register. The contents written to the ROMI in FIG. 4 are shown in Tables 1, 2, and 3. Table 1 Table 2 In Tables 1, 2 and 3, the symbol OFn-,,
sn-,, Zn, Zn-,, ×, y and di indicate input bits, symbols OFn, sn and d.

は出力ビットを示す。また、記号0/1は“0”でも“
1”でもよいことを示す。第1表はMSDの位置を示す
タイミングパルスが“1”の時のROM3の内容を示し
たものである。
indicates an output bit. Also, the symbol 0/1 is “0” or “
Table 1 shows the contents of the ROM 3 when the timing pulse indicating the position of the MSD is "1".

出力ビットOFnは、“1”の時には桁あふれを生じた
ことを示し、“0”の時には桁あふれを生じていないこ
とを示す。例えばZn=“0”,Zn−,=“1”,x
=“0”およびy=“0”の時は和ZのMSBはZn=
“0”であり、MSBより1ビット前のビットはZn‐
,=“1”であるから上述の第1の場合の桁あふれと見
なされて出力ビットOFn=“1”となっている。また
、Zn=“0”,Zm=“0”,×=“1”およびY=
“1”の時は和ZのMSBはZn=“0”であり、この
時の入力×,YのMSBはX=“1”, Y=“1”と
なっているから上述の第2の場合の桁あふれと見なされ
て出力ビットOFn=“1”となっている。出力ビット
snは、出力ビットOFnが“1”の時のみ意味をもち
、桁あふれを生じない時の真の加算結果の符号と同一の
ものを出力する。例えば、上の例では、Zn=“0”,
Zn‐,=“1”,X=“0”及びY=“0”の時、桁
あふれを生じない時の真の加算結果は正であるからsn
=“0”となる。また、Zn=“0”,Zn‐,=“0
”,X=“1”及びY:“1”の時、桁あふれを生じな
い時の真の加算結果は負であるからsn=“1’’とな
る。出力ビットd。は出力ビットOFnが“0”の時は
入力ビットdiと同一であり、出力ビットOFnが“1
”の時には入力ビットSn−,と反対の内容になつてい
る。第2表は、MSBの位置を示すタイミングパルス及
びMSBより2ビット前の位層を示すタイミングパルス
が共に“0”の時のROM3の内容を示したものである
When the output bit OFn is "1", it indicates that an overflow has occurred, and when it is "0", it indicates that an overflow has not occurred. For example, Zn="0", Zn-,="1", x
When ="0" and y="0", the MSB of sum Z is Zn=
“0”, and the bit 1 bit before the MSB is Zn-
, = "1", it is regarded as an overflow in the first case described above, and the output bit OFn = "1". Also, Zn=“0”, Zm=“0”, ×=“1” and Y=
When it is “1”, the MSB of the sum Z is Zn="0", and the MSB of the input x, Y at this time is X="1", Y="1", so the above second In this case, it is considered that there is an overflow, and the output bit OFn is set to "1". Output bit sn has meaning only when output bit OFn is "1", and outputs the same sign as the true addition result when overflow does not occur. For example, in the above example, Zn="0",
When Zn-, = “1”, X = “0” and Y = “0”, the true addition result without overflow is positive, so sn
= “0”. Also, Zn="0", Zn-,="0"
”, X=“1” and Y: “1”, the true addition result without overflow is negative, so sn=“1”. Output bit d. is the same as the input bit di when the output bit OFn is “0”, and when the output bit OFn is “1”
”, the content is opposite to that of the input bit Sn-.Table 2 shows the contents when both the timing pulse indicating the MSB position and the timing pulse indicating the layer 2 bits before the MSB are “0”. This shows the contents of ROM3.

入力ビットOFn−,と出力ビットOFnとは全く同一
の内容であり、入力ビットsn‐,と出力ビットsnも
全く同一の内容である。さらに、出力ビットd。は、出
力ビットOFnが“0”の時には入力ビットdiと同一
内容であり、出力ビットOFnが“1”の時には入力ビ
ットsn−,と反対の内容になっている。第3表は、M
SBより2ビット前の位置を示すタイミングパルスが‘
‘1’’の時のROM3の内容を示したものである。
Input bit OFn- and output bit OFn have exactly the same content, and input bit sn- and output bit sn also have exactly the same content. Furthermore, the output bit d. has the same content as the input bit di when the output bit OFn is "0", and has the opposite content as the input bit sn- when the output bit OFn is "1". Table 3 shows M
The timing pulse indicating the position 2 bits before SB is '
This shows the contents of the ROM3 when the value is '1'.

入力ビットOFMと出力ビットOFnとは全く同一の内
容であるが、入力ビットsn‐,と出力ビットsnとは
逆の内容になっている。また、出力ビットd。は出力ビ
ットOFnが“0”の時には、入力ビットdiと同一内
容であり、出力ビットOFnが“1”の時には入力ビッ
トsn−,と同一の内容になっている。第1表、第2表
および第3表の入力ビットx,y及びZnはそれぞれ第
4図の入力端子300,400および600に現われる
Input bit OFM and output bit OFn have exactly the same contents, but input bit sn- and output bit sn have opposite contents. Also, output bit d. When the output bit OFn is "0", it has the same content as the input bit di, and when the output bit OFn is "1", it has the same content as the input bit sn-. Input bits x, y, and Zn of Tables 1, 2, and 3 appear at input terminals 300, 400, and 600, respectively, of FIG. 4.

また、入力ビットOFm,sn‐,,Zn−,およびd
iはそれぞれROM3の入力40,50,10および2
0に対応している。さらに、第1表、第2表および第3
表の出力ビットOFn,snおよびd。はそれぞれ第4
図の出力30,31および32に対応している。第4図
において、端子100及び200‘こは、それぞれ、M
SBの位置を示すタイミングパルスとMSBより2ビッ
ト前の位置を示すタイミングパルスとが入力される。今
、3個の直列データX,YおよびZのMSBがそれぞれ
端子300,400および50川こ入力された時には、
第1表に従い、ROM3より読み出された出力ビットO
Fn,snおよびd。
Also, the input bits OFm, sn-, , Zn-, and d
i are inputs 40, 50, 10 and 2 of ROM3, respectively
It corresponds to 0. Furthermore, Tables 1, 2 and 3
Table output bits OFn, sn and d. are the fourth
This corresponds to outputs 30, 31 and 32 in the figure. In FIG. 4, terminals 100 and 200' are respectively M
A timing pulse indicating the position of the SB and a timing pulse indicating the position 2 bits before the MSB are input. Now, when the MSB of three serial data X, Y and Z are input to terminals 300, 400 and 50 respectively,
Output bit O read from ROM3 according to Table 1
Fn, sn and d.

が出力30,31および32として生じる。出力ビット
OFnおよびsnに対応するROM3の出力30および
31は、それぞれフリツプフロツプ4および5により1
ビット遅延された後帰還されてROM3の入力40(O
F町)および40(sn−,)となる。MSBより2ビ
ット前の位置を示すタイミングパルスが“1”になるま
でROM3は第2表に従い、出力ビットOFm snお
よびd。
occur as outputs 30, 31 and 32. Outputs 30 and 31 of ROM3 corresponding to output bits OFn and sn are set to 1 by flip-flops 4 and 5, respectively.
After being bit delayed, it is fed back to the input 40 (O
F town) and 40 (sn-,). The ROM 3 outputs bits OFm sn and d according to Table 2 until the timing pulse indicating the position 2 bits before the MSB becomes "1".

を読み出す。次に、MSBより2ビット前の位置を示す
タイミングパルスが“1”の時には、ROM3は第3表
に従い、出力ビットOFm sn及びd。を読み出す。
最後に、MSBより1ビット前の時点ではROM3は第
2表に従い、出力ビットOFn,sn及びd。
Read out. Next, when the timing pulse indicating the position 2 bits before the MSB is "1", the ROM 3 outputs bits OFm sn and d according to Table 3. Read out.
Finally, at one bit before the MSB, ROM3 outputs bits OFn, sn, and d according to Table 2.

を読み出す。ROM3の謙出し操作は以上述べた動作を
繰り返す。
Read out. The operation for removing the ROM3 repeats the above-described operation.

第3図のシフトレジスタ2は(M−1)ビットとする。
次に本発明の動作を具体例に説明する。
The shift register 2 in FIG. 3 has (M-1) bits.
Next, the operation of the present invention will be explained using a specific example.

データ語長(M)を5ビットとし、次のような加算を考
える。但し、$Bは最小重みビットを表わす。
Let the data word length (M) be 5 bits and consider the following addition. However, $B represents the least weight bit.

上式において、カツコ内は左記の2進符号を10進数で
表わしたものである。
In the above formula, what is inside the brackets is the binary code shown on the left expressed in decimal notation.

上記の演算において、加算結果Zを6ビットで表わせば
、011,010(十3.25)となり、真の加算結果
を得ることができるが、入力X,Yと同様Zも5ビット
で表示するために11,010(一0.750)と見な
されてしまう。即ち、桁あふれが生じる。本発明を用い
て上式を演算すれば、次のようになる。
In the above operation, if the addition result Z is expressed in 6 bits, it becomes 011,010 (13.25), which is the true addition result, but like the inputs X and Y, Z is also expressed in 5 bits. Therefore, it is considered as 11,010 (-0.750). That is, overflow occurs. If the above equation is calculated using the present invention, the following will be obtained.

BBからMSBまでの5ビットに対応したビットをクロ
ツク0,1,2,3および4と名づける。時間的にはク
ロツク0,1,2,3,4の順に変化し、それらの繰り
返し‘こなる。クロック0〜クロツク3の間では第4図
のROM3の出力ビットOFn,snおよびd。は前の
データの出力を読み出している。クロック4の時点にお
いて、桁あふれを起こしたか否か検出される。
The bits corresponding to the 5 bits from BB to MSB are named clocks 0, 1, 2, 3 and 4. In terms of time, the clocks change in the order of 0, 1, 2, 3, and 4, and they are repeated. Between clocks 0 and 3, the output bits OFn, sn and d of ROM 3 in FIG. is reading the previous data output. At clock 4, it is detected whether overflow has occurred.

この時、Zn=“1”,Zn−,=“1”,x=“0”
,y=“0”及びd‘=“0”がそれぞれ第4図のRO
M3の入力端子C,D,A,8およびEに入力され、第
1表に従いOFn=“1”,sn=“0”及びd。=“
1”がそれぞれROM3の出力30,31および32に
与えられる。但し、第4図のシフトレジスタ2は4ビッ
トであるから、クロック4の時点では、diはZのLS
B、即ち、di=“0”となる。次に、クロツク0の時
点ではOFn−,=“1”,sn‐,=“0”及びdi
=“1”が入力され、第2表に従いOFn=“1’’,
sn−,=“0”及びd。=“1”が出力される。クロ
ック1の時点では同様にOFn−,=“1”,s中=“
0”及びdi=“0”が入力され、第2表に従い、OF
n=“1”,sn=“0”及びd。=“1”が出力され
る。クロツク2の時点ではMSBよりも2ビット前であ
るからOFn−,=“1”,sn−,=“0”及びdF
“1”が入力され、第3表に従いOFn=“1”,sn
=“1”及びd。=“0”が出力される。クロツク3の
時点ではOFn−,=“1’’,sn−,申“1’’及
びdi=“1”が入力され、第2表に従い、OFn=“
1”,sn=“1”及びd。=“0”が出力される。従
って、クロック4からクロック3までの間diは“1”
,“1”,“1”,“0”,“0”の順で第4図のRO
M3の出力32に与えられることになる。
At this time, Zn="1", Zn-,="1", x="0"
, y=“0” and d'=“0” are RO in FIG.
It is input to the input terminals C, D, A, 8 and E of M3, and according to Table 1, OFn="1", sn="0" and d. =“
1'' are given to outputs 30, 31 and 32 of ROM 3, respectively.However, since shift register 2 in FIG. 4 has 4 bits, at clock 4, di is LS of Z.
B, that is, di="0". Next, at clock 0, OFn-, = "1", sn-, = "0" and di
="1" is input, and according to Table 2 OFn="1'',
sn-,=“0” and d. ="1" is output. Similarly, at clock 1, OFn-,="1", during s="
0” and di="0" are input, and according to Table 2, OF
n=“1”, sn=“0” and d. ="1" is output. At the time of clock 2, it is 2 bits before the MSB, so OFn-, = "1", sn-, = "0" and dF
“1” is input, OFn="1", sn according to Table 3
= “1” and d. ="0" is output. At clock 3, OFn-,=“1'', sn-, signal “1” and di=“1” are input, and according to Table 2, OFn=“
1", sn="1" and d.="0" are output. Therefore, di is "1" from clock 4 to clock 3.
, “1”, “1”, “0”, “0” in the order of RO in Figure 4.
It will be applied to the output 32 of M3.

従って、入力データZの値は00,111(十0.87
5)となり、桁あふれを訂正されて第4図の端子600
に出力される。但し、出力されたデータは入力データZ
に比べて4ビット((M−1)ビット)遅延されて出力
される。また、第1表、第2表及び第3表より明らかな
ように、桁あふれを起こさない時には、dFd。
Therefore, the value of input data Z is 00,111 (100.87
5), the overflow is corrected and the terminal 600 in Figure 4 is
is output to. However, the output data is the input data Z
It is output with a delay of 4 bits ((M-1) bits) compared to . Also, as is clear from Tables 1, 2, and 3, when overflow does not occur, dFd.

となるから第3図の端子600に加算結果Zがそのまま
4ビット遅れて出力される。第5図は第4図の回路動作
を説明するためのタイミングチャートである。
Therefore, the addition result Z is directly output to the terminal 600 in FIG. 3 with a delay of 4 bits. FIG. 5 is a timing chart for explaining the circuit operation of FIG. 4.

参照英字aはMSBの位置を示すタイミングパルス、参
照英字bはMSBより2ビット前の位置を示すタイミン
グパルスである。参照英字c,d及びeはそれぞれ上記
の例のデータX,Y及びZを示している。参照英字fは
データZを1ビット遅延させたものであり、第4図のフ
リップフロップ1の出力10を示している。参照英字g
はデータZを4ビット遅延させたものであり、第4図の
シフトレジスタ2の出力20を示している。参照英字h
,iおよびiはそれぞれ第4図のROM3の出力30,
31及び32を示している。参照英字kはクロックを示
している。以上述べたように、本発明によればROMと
フリップフロップとシフトレジスタとを用いて簡単な回
路ハードウェア規模の小さい桁あふれ検出及び訂正回路
が提供できる。
The reference letter a is a timing pulse that indicates the position of the MSB, and the reference letter b is a timing pulse that indicates the position 2 bits before the MSB. Reference letters c, d and e indicate data X, Y and Z in the above example, respectively. Reference letter f is data Z delayed by one bit, and indicates the output 10 of flip-flop 1 in FIG. Reference alphabet g
is the data Z delayed by 4 bits, and shows the output 20 of the shift register 2 in FIG. Reference alphabet h
, i and i are the output 30 of ROM3 in FIG. 4, respectively.
31 and 32 are shown. Reference letter k indicates a clock. As described above, according to the present invention, it is possible to provide an overflow detection and correction circuit with a simple and small circuit hardware scale using a ROM, a flip-flop, and a shift register.

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

第1図は従来の桁あふれ検出回路の一例を示す図、第2
図は従釆の桁あふれ訂正回路の一例を示す図、第3図は
第1図と第2図とを組合わせた従来の桁あふれ検出及び
訂正回路のブロック図、第4図は本発明の一実施例を示
すブロック図および第5図a〜kは第4図の回路動作を
説明する図である。 第4図において、1,4,5……フリップフロツプ、2
・・・・・・シフトレジスタ、3・・・・・・ROM。 髪3図弟〆図 第2図 猪4図 猪J図
Figure 1 shows an example of a conventional overflow detection circuit; Figure 2 shows an example of a conventional overflow detection circuit;
The figure shows an example of a secondary overflow correction circuit, FIG. 3 is a block diagram of a conventional overflow detection and correction circuit that combines FIGS. 1 and 2, and FIG. A block diagram showing one embodiment and FIGS. 5a to 5k are diagrams for explaining the circuit operation of FIG. 4. In Fig. 4, 1, 4, 5... flip-flop, 2
...Shift register, 3...ROM. Hair 3 figures Younger brother 〆 figure 2 Boar 4 figures Pig J figure

Claims (1)

【特許請求の範囲】[Claims] 1 加算すべき2個の直列データX及びYと加算後の直
列データZ_nと前記直列データZ_nを1ビツト遅延
させた直列データZ_n_−_1と第1のフリツプフロ
ツプの出力OF_n_−_1と第2のフリツプフロツプ
の出力s_n_−_1と前記直列データX,YおよびZ
_nの極性表示ビツトの位置を示す第1のタイミングパ
ルスと前記極性表示ビツトより2ビツト前の位置を示す
第2のタイミングパルスと前記直列データZ_nを1デ
ータ分遅延させた直列データとを入力とし前記直列デー
タZ_nの桁あふれを示す出力OF_nと前記直列デー
タZ_nが桁あふれを起こした時に前記データZ_nを
訂正するための出力s_nと前記直列データZ_nの桁
あふれを訂正さした内容を表わす出力d_oとを生じる
読出し専用メモリと、前記メモリの出力OF_nを入力
する前記第1のフリツプフロツプと、前記メモリの出力
s_nを入力とする前記第2のフリツプフロツプとから
構成されたことを特徴とする桁あふれ検出及び訂正回路
1 Two serial data X and Y to be added, serial data Z_n after addition, serial data Z_n_-_1 obtained by delaying the serial data Z_n by 1 bit, output OF_n_-_1 of the first flip-flop, and output OF_n_-_1 of the second flip-flop. output s_n_-_1 and the serial data X, Y and Z
A first timing pulse indicating the position of the polarity display bit of _n, a second timing pulse indicating the position 2 bits before the polarity display bit, and serial data obtained by delaying the series data Z_n by one data are input. An output OF_n indicating an overflow of the serial data Z_n, an output s_n for correcting the data Z_n when an overflow occurs in the serial data Z_n, and an output d_o representing the content of correcting the overflow of the serial data Z_n. an overflow detection circuit comprising: a read-only memory that generates a digit; the first flip-flop to which the output OF_n of the memory is input; and the second flip-flop to which the output s_n of the memory is input. and correction circuit.
JP52113097A 1977-09-19 1977-09-19 Overflow detection and correction circuit Expired JPS607815B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP52113097A JPS607815B2 (en) 1977-09-19 1977-09-19 Overflow detection and correction circuit
US05/943,836 US4215415A (en) 1977-09-19 1978-09-19 Recursive digital filter comprising a circuit responsive to first sum and feedback sign bits and second sum sign and integer bits for detecting overflow in the second sum

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP52113097A JPS607815B2 (en) 1977-09-19 1977-09-19 Overflow detection and correction circuit

Publications (2)

Publication Number Publication Date
JPS5446443A JPS5446443A (en) 1979-04-12
JPS607815B2 true JPS607815B2 (en) 1985-02-27

Family

ID=14603394

Family Applications (1)

Application Number Title Priority Date Filing Date
JP52113097A Expired JPS607815B2 (en) 1977-09-19 1977-09-19 Overflow detection and correction circuit

Country Status (1)

Country Link
JP (1) JPS607815B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201527U (en) * 1987-06-18 1988-12-26

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63201527U (en) * 1987-06-18 1988-12-26

Also Published As

Publication number Publication date
JPS5446443A (en) 1979-04-12

Similar Documents

Publication Publication Date Title
JPS6059470A (en) Basic cell suitable for multiplication- accumulation processor and said processor
JPS607815B2 (en) Overflow detection and correction circuit
JP2766133B2 (en) Parallel-serial data conversion circuit
JPS607816B2 (en) Overflow detection and correction circuit
JPS5941336B2 (en) buffer memory device
US3633002A (en) Integrator for use in digital differential analyzer systems
Holdsworth Microprocessor engineering
JP2513021B2 (en) Signed digit number sign judgment circuit
SU656218A1 (en) Counter with error correction
JPS6015967B2 (en) 3-input series full adder capable of detecting overflow
JP2591164B2 (en) Parity operation circuit
JP2914813B2 (en) Error correction decoding device
SU1390608A1 (en) Divider
SU1767497A1 (en) Divider
JPS6029408B2 (en) divider
JPH07120964B2 (en) Extension circuit
SU451078A1 (en) DEVICE FOR COMPOSITION-CALCULATION OF BINARY NUMBERS
KR19990051445A (en) Counter for detecting address of data
SU1619255A1 (en) Division device
SU842798A1 (en) Adding and subtracting device
SU1357946A1 (en) Device for division
SU1417010A1 (en) Number dividing device
JPS6355628A (en) Residue calculating circuit
JPS5824819B2 (en) Hiyoji Seigiyohoushiki
JPH0621820A (en) Sign magnitude outputting device