JPH0736149B2 - Shift flag generation circuit - Google Patents

Shift flag generation circuit

Info

Publication number
JPH0736149B2
JPH0736149B2 JP59021699A JP2169984A JPH0736149B2 JP H0736149 B2 JPH0736149 B2 JP H0736149B2 JP 59021699 A JP59021699 A JP 59021699A JP 2169984 A JP2169984 A JP 2169984A JP H0736149 B2 JPH0736149 B2 JP H0736149B2
Authority
JP
Japan
Prior art keywords
digit
input data
shift
exclusive
result
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 - Lifetime
Application number
JP59021699A
Other languages
Japanese (ja)
Other versions
JPS60167030A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP59021699A priority Critical patent/JPH0736149B2/en
Publication of JPS60167030A publication Critical patent/JPS60167030A/en
Publication of JPH0736149B2 publication Critical patent/JPH0736149B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は演算器のフラグ生成方式及びその実現回路に係
り、特に、シフト命令を高速に実行するバレルシフタに
好適なフラグ生成回路に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a flag generation system for an arithmetic unit and its implementation circuit, and more particularly to a flag generation circuit suitable for a barrel shifter that executes a shift instruction at high speed.

〔発明の背景〕[Background of the Invention]

算術シフト処理におけるオーバーフローフラグは、あた
かも1桁づつシフトして処理した時、各ステツプにおい
て符号の値が1回でも変化したら“1"となるフラグであ
る。
The overflow flag in the arithmetic shift process is a flag that becomes "1" when the value of the code changes even once in each step when the process is performed by shifting by one digit.

従来のシフタでは、1桁シフトをカウント数だけ繰返し
て処理していたため、このオーバーフローフラグは各処
理において逐次的に検出していれば良かつた。
In the conventional shifter, the one-digit shift is repeatedly performed by the number of counts. Therefore, it suffices that the overflow flag be sequentially detected in each process.

しかし、シフト処理を高速に行うためにバレルシフタを
導入するにあたり、このオーバーフローフラグを検出す
ることが難しくなつた。
However, it became difficult to detect this overflow flag when the barrel shifter was introduced to perform the shift processing at high speed.

〔発明の目的〕 本発明の目的は、1サイクルで任意の桁シフトを行うバ
レルシフタにおいて、逐次シフトを行つた場合と同じ演
算フラグを生成して、従来の命令仕様と互換性を保つフ
ラグ生成方式及びその生成回路を提供するところにあ
る。
[Object of the Invention] An object of the present invention is to generate a flag in a barrel shifter that shifts an arbitrary digit in one cycle, and generate the same operation flag as in the case of performing a sequential shift to maintain compatibility with conventional instruction specifications. And a generator circuit therefor.

〔発明の概要〕[Outline of Invention]

算術左シフトを行つたときのオーバーフローフラグV
は、 で規定されている。ここで、Diは符号付き2進入力デー
タの1桁でDmはMSB(Most Significant Bit)であり、
符号ビツトとなり“1"のとき負の数を表わす。データ長
をnビツトとするとm=n−1である。また、rはシフ
トカウントである。
Overflow flag V when arithmetic left shift is performed
Is Stipulated in. Here, Di is one digit of signed binary input data, Dm is MSB (Most Significant Bit),
It becomes a sign bit, and when it is "1", it represents a negative number. When the data length is n bits, m = n-1. Further, r is a shift count.

式(1)を変形すると、 V=DmDm-1+…+DmDm-r …………(2) となる。ここでは排他的論理和演算を示す。When the formula (1) is transformed, V = DmDm -1 + ... + DmDm - r ............ (2) Here, the exclusive OR operation is shown.

すなわち、データ長nビットの入力をr桁算術左シフト
した際のオーバーフローの有無は、最上位桁からあふれ
た信号およびr桁算術左シフト後の最終的な符号ビット
がr桁算術左シフト前の符号ビットと同一か否かを判定
することにより可能となる。
That is, the presence or absence of overflow when the input of data length n bits is shifted to the left by r digits is determined by the signal overflowing from the most significant digit and the final sign bit after the r digits is shifted to the left before the r digits are shifted to the left. This is possible by determining whether it is the same as the sign bit.

従って、r桁算術左シフトによってデータ長n(m+
1)ビットの入力データのうち、最上位桁からあふれる
信号はそれぞれ左シフト前の右からm番目の信号Dm、m
−1番目の信号Dm-1、…n−r(m−r+1)番目の信
号Dm-r+1となり、r桁算術左シフトの最終的な符号ビッ
トは左シフト前のn−r−1(m−r)番目の信号Dm-r
となり、さらにDmDm=0であるので、r桁算術左シフ
トを行った時のオーバーフローフラグVは、信号Dm、Dm
-1、…Dm-r+1、Dm-rと信号Dmとの排他的論理和のそれぞ
れの包括的論理和となるので、式(1)もしくは式
(2)のように示されることができるものである。
Therefore, the data length n (m +
1) Of the input data of bits, the signals overflowing from the most significant digit are the m-th signals Dm and m from the right before left shift, respectively.
-1-th signal Dm -1, ... n-r ( m-r + 1) th signal Dm - r +1, and the final sign bit of r digits arithmetic left shift of the previous left shift n-r-1 ( m-r) th signal Dm - r
Further, since DmDm = 0, the overflow flag V at the time of performing the r-digit arithmetic left shift is the signals Dm and Dm.
-1 , ... Dm - r + 1 , Dm - r and an exclusive OR of the signal Dm, respectively, so that they can be expressed as in equation (1) or equation (2). It is a thing.

DmDm=0であるから、更に変形すると、 となる。Since DmDm = 0, further deformation, Becomes

式(3)は、n桁入力データDm…Doを(n−r−1)桁
だけ算術右シフト(つまり、入力データの符号Dm保存し
ながら右シフト)した結果 の各桁Dm,〜,Dm-rと入力データの符号Dmとの排他的論理
和をそれぞれ求め、その結果DmDm,〜,DmDm-rの全て
の桁の包含的論理和をとつた結果を表わしている。つま
り、上記排他的論理和の結果DmDm,〜,DmDm-rが全て
“0"であるか否かを検出すれば、算術左シフト時のオー
バーフローフラグVが得られることがわかる。
Equation (3) is the result of n-digit input data Dm ... Do arithmetically right-shifted by (n-r-1) digits (that is, right-shifted while storing the sign Dm of the input data). Of each digit Dm, ~, Dm - r and the sign Dm of the input data are obtained respectively, and the result is the result of taking the inclusive OR of all the digits of DmDm, ~, DmDm - r. ing. That is, it can be seen that the overflow flag V at the time of the arithmetic shift left can be obtained by detecting whether or not all of the results DmDm, to DmDm - r of the exclusive OR are "0".

一方、シフタとしては一般にシフトカウントrが0から
データのビツト長nまで(r=0〜n)のとき正しいシ
フト結果が得られるものが多い。しかし、上記の方法で
は、r桁算術左シフトした時のオーバーフローフラグV
を求めるために、(n−r−1)桁の算術右シフトを行
う必要がある。つまり、r=0〜nであるので(n−r
−1)=−1〜n−1となり、(−1)桁の算術右シフ
トを行わなければならない。この操作は1桁算術左シフ
トで実現できるのが、(−1)桁の場合に限り特殊操作
を行うことになりシフタの制御を複雑にするという欠点
がある。
On the other hand, as a shifter, in general, a correct shift result is obtained when the shift count r is from 0 to the bit length n of data (r = 0 to n). However, in the above method, the overflow flag V when r digits are arithmetically left-shifted
In order to obtain, it is necessary to perform an arithmetic right shift of (n−r−1) digits. That is, since r = 0 to n, (n−r
−1) = − 1 to n−1, and (−1) digit arithmetic right shift must be performed. This operation can be realized by a 1-digit arithmetic left shift, but there is a disadvantage in that a special operation is performed only in the case of (-1) digit and control of the shifter is complicated.

そこで式(3)を、 と変形すると、 を用いて、 V=V′+DmDm-r ………………………(6) と表わすことができる。Therefore, equation (3) is changed to When transformed into Can be expressed as V = V '+ DmDm - r …………………… (6).

ここで、式(5)は式(3)と同様に、V′が入力デー
タDm…D0を(n−r)桁だけ算術右シフトした結果の各
桁と入力データの符号Dmとの排他的論理和をそれぞれ求
め、その結果の全ての桁の包含的論理和をとつた結果で
あることを表わしている。
Here, the formula (5) is the same as the formula (3), where V'is an exclusive exclusion between each digit of the result obtained by arithmetically right shifting the input data Dm ... D 0 by (n−r) digits and the code Dm of the input data. It represents that the result is the result of taking the inclusive OR of all the digits of the result of each logical OR.

また、Dm-rは入力データをr桁だけ算術左シフトした出
力の符号として求めることができるので、r桁算術左シ
フトしたときのオーバーフローフラグVを、このときの
出力の符号Dm-rと入力データの符号Dm及び、入力データ
を(n−r)桁右シフトすることにより得られる値V′
を用いて式(6)により生成することができる。
Further, since Dm - r can be obtained as the sign of the output obtained by arithmetically shifting the input data by r digits to the left, the overflow flag V when r digits are arithmetically left shifted is input as the sign Dm - r of the output at this time. Data sign Dm and value V'obtained by shifting input data to the right by (n-r) digits
Can be generated by the equation (6).

このとき、(n−r)はr=0〜nのとき同様に0から
nまでの値となり、一般のシフタにてサポートすること
ができる。
At this time, (n−r) becomes a value from 0 to n similarly when r = 0 to n, and can be supported by a general shifter.

本願で開示される発明のうち、代表的なものの概要は下
記の通りである。
Among the inventions disclosed in the present application, typical ones are summarized as follows.

すなわち、最上位(MSB)桁で符号を表示するn桁の入
力データ(Dm…D0)を入力とし、上記n桁の入力データ
(Dm…D0)のr桁算術左シフト結果と上記n桁の入力デ
ータ(Dm…D0)の最上位桁ビット信号(Dm)を保存した
n−r桁算術右シフト結果とを並列に出力するシフタ
(100、101)と、 該シフタ(100、101)による上記n桁の入力データ(Dm
…D0)の上記r桁算術左シフト結果出力の最上位桁ビッ
ト信号(Dm-r)と上記n桁の入力データ(Dm…D0)の最
上位桁ビット信号(Dm)との排他的論理和(DmDm-r)
を出力する第1の排他的論理和回路(300:1)と、 上記シフタ(100、101)による上記n桁の入力データ
(Dm…D0)の上記最上位桁ビット信号(Dm)を保存した
上記n−r桁算術右シフト結果(Dm…DmDmDm-1……Dm-r
+1)と上記n桁の入力データ(Dm…D0)の上記最上位桁
ビット信号(Dm)との排他的論理和を各ビット毎に求
め、その結果(DmDm、…DmDm、DmDm、DmDm-1
…DmDm-r+1)を出力する第2の排他的論理和回路(20
1:1)と、 該第2の排他的論理和回路(201:1)の各ビットの排他
的論理和出力の論理和(DmDm+…DmDm+DmDm+Dm
Dm-1……DmDm-r+1)を出力する第1の論理ゲート
(201:2、3)と、 該第1の論理ゲート(201:2、3)の出力(51)と上記
第1の排他的論理和回路(300:1)の出力との論理和を
出力する第2の論理ゲート(300:4)とを具備してな
り、 該第2の論理ゲート(300:4)の論理和出力よりオーバ
ーフローフラグを得ることを特徴とする。
That is, the n-digit input data (Dm ... D 0 ) for displaying a sign at the most significant (MSB) digit is input, and the n-digit input data (Dm ... D 0 ) is calculated by shifting the r-digit arithmetic left and the above n. A shifter (100, 101) for outputting in parallel the n-r digit arithmetic right shift result storing the most significant digit bit signal (Dm) of the digit input data (Dm ... D 0 ), and the shifter (100, 101) ) Above n digit input data (Dm
... D 0) of the r-digit arithmetic left shift result output of the most significant digit bit signal (Dm - r) and exclusive of the most significant digit bit signal (Dm) of the n-digit input data (Dm ... D 0) Logical sum (DmDm - r)
The first exclusive OR circuit (300: 1) for outputting the above, and the above-mentioned most significant digit bit signal (Dm) of the above n digit input data (Dm ... D 0 ) by the above shifter (100, 101) are stored. The above n-r digit arithmetic right shift result (Dm ... DmDmDm- 1 ... Dm - r
+1 ) and the n-digit input data (Dm ... D 0 ) and the most significant digit bit signal (Dm) are obtained for each bit, and the result (DmDm, ... DmDm, DmDm, DmDm) is obtained. -1 ...
… DmDm - r +1 ) second exclusive OR circuit (20
1: 1) and the logical sum (DmDm + ... DmDm + DmDm + Dm) of the exclusive logical sum outputs of the respective bits of the second exclusive logical sum circuit (201: 1)
Dm -1 ...... DmDm - r +1) first logic gate for outputting (201: and 2,3), the first logic gate (201: 2, 3) of the output (51) and the first And a second logic gate (300: 4) that outputs a logical sum with the output of the exclusive OR circuit (300: 1), and the logic of the second logic gate (300: 4). The overflow flag is obtained from the sum output.

本発明のかかる代表的な構成によれば、シフタ(100、1
01)の出力(30、31)からn桁の入力データ(Dm…D0
のr桁算術左シフト結果出力とn−r桁算術右シフト結
果(Dm……DmDmDm-1……Dm-r+1)とが並列に同時に生成
されることができるので、1回のシフト動作によりこれ
らのシフト結果を用いてオーバーフローフラグを1サイ
クルで得ることができると言う顕著な作用・効果を奏す
る。
According to such a typical configuration of the present invention, the shifter (100, 1
01) output (30, 31) to n digit input data (Dm ... D 0 )
The r-digit arithmetic left shift result output and the n-r digit arithmetic right shift result (Dm ... DmDmDm- 1 ... Dm - r + 1 ) can be simultaneously generated in parallel, so that one shift operation is performed. As a result, the remarkable effect and advantage that the overflow flag can be obtained in one cycle by using these shift results is achieved.

本発明のその他の特徴は、以下の実施例から明らかとな
ろう。
Other features of the present invention will be apparent from the following examples.

〔発明の実施例〕Example of Invention

以下、本発明の一実施例を図を用いて説明する。第1図
は、算術左シフトを行うときのバレルシフタの構成図で
ある。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a configuration diagram of a barrel shifter when performing arithmetic left shift.

バレルシフタ100は入力データ10に対してr桁算術左シ
フト指示20によりシフト結果30及びシフト時のこぼれ40
を出力する。ゼロ検出器200はシフト結果30を入力して
ゼロフラグ50を出力する。以上のようにして、シフト結
果30、シフトこぼれ40、及びゼロフラグ50を生成してい
る。
The barrel shifter 100 shifts the input data 10 by the r-digit arithmetic left shift instruction 20 and shifts the result 30 and spills 40 when shifting.
Is output. The zero detector 200 inputs the shift result 30 and outputs a zero flag 50. As described above, the shift result 30, the shift spill 40, and the zero flag 50 are generated.

次に、オーバーフローフラグの生成について説明する。
バレルシフタ101は入力データ10に対して(n−r)桁
算術右シフト指示21によりシフト結果31及びシフト前の
入力データの符号61を出力する。ゼロ検出器201はシフ
ト結果31を入力データとして入力し、符号61を制御信号
としてゼロフラグ51を出力する。
Next, generation of the overflow flag will be described.
The barrel shifter 101 outputs the shift result 31 and the code 61 of the input data before the shift in response to the (n−r) digit arithmetic right shift instruction 21 with respect to the input data 10. The zero detector 201 inputs the shift result 31 as input data, and outputs the zero flag 51 using the code 61 as a control signal.

ここで、上記ゼロ検出器200は、第2図のように構成さ
れており、制御信号210が0及び1のときそれぞれ入力
データ220のall“0"及びall“1"を検出して線50に出力
する。つまり、入力データ220のうち制御信号210と異な
るものが1ビツトでも存在すると、出力線50が1にな
り、それを検出できる。第1図のゼロ検出器200では制
御入力210を“0"に固定することにより、シフト結果30
のすべての桁が“0"であることを示すゼロフラグ50を生
成している。またオーバーフローフラグ生成のためのゼ
ロ検出器201では制御信号210としてシフト入力データ10
の符号61を入力することにより、シフト結果31の各桁と
符号61が全て等しいか否かを検出することができる。
Here, the zero detector 200 is constructed as shown in FIG. 2, and when the control signal 210 is 0 and 1, all “0” and all “1” of the input data 220 are detected to detect the line 50. Output to. That is, if even one bit of the input data 220 different from the control signal 210 exists, the output line 50 becomes 1, and it can be detected. In the zero detector 200 of FIG. 1, the control result 210 is fixed to “0”, and the shift result 30
A zero flag 50 is generated, which indicates that all the digits of "0" are "0". In addition, the zero detector 201 for generating the overflow flag uses the shift input data 10 as the control signal 210.
By inputting the code 61 of, it is possible to detect whether or not all the digits of the shift result 31 and the code 61 are all equal.

つまり、n桁の入力データ10をDmDm-1…Do(m=n−
1)と表わすと(n−r)桁算術右シフトした結果31は となる。したがつて、オーバーフローフラグ生成のため
のゼロ検出器201の出力V′31は、 と表わされる。
That is, the input data 10 of n digits is converted into DmDm -1 ... Do (m = n-
When expressed as 1), the result 31 of (n−r) digit arithmetic shift right is Becomes Therefore, the output V'31 of the zero detector 201 for generating the overflow flag is Is represented.

算術左シフト時のオーバーフローフラグVは、式(6)
より、 V=V′+DmDm-r ………………(6) と同じで求められる。ここで、Dmは入力データの符号61
であり、Dm-rは左シフト結果30のMSBつまり符号32であ
る。式(6)の論理を実現する部分が第1図のオーバー
フローフラグ生成器300であり、オーバーフローフラグ7
0を出力する。また、その論理図を第3図に示す。
The overflow flag V at the time of arithmetic shift left is calculated by the equation (6).
Therefore, V = V '+ DmDm - r ……………… (6) Here, Dm is the code 61 of the input data.
And Dm - r is the MSB of the left shift result 30, or code 32. The overflow flag generator 300 shown in FIG. 1 is used to realize the logic of the equation (6).
Outputs 0. The logical diagram thereof is shown in FIG.

以上第1図のバレルシフタ構成図において、算術右シフ
トを行うバレルシフタ101及びゼロ検出器201は、それぞ
れバレルシフタ100とゼロ検出器200と同じ構成をしてお
り、シフト処理を2サイクルに分けて行えば、バレルシ
フタ100及びゼロ検出器200で代用することができハード
ウエアとしては不用となる。したがつて、オーバーフロ
ーフラグを生成するためには、その生成器300だけを持
つだけ良く、ハードウエア量の追加が少なくてすむとい
う効果がある。
In the barrel shifter configuration diagram of FIG. 1 described above, the barrel shifter 101 and the zero detector 201 that perform arithmetic right shift have the same configurations as the barrel shifter 100 and the zero detector 200, respectively. , The barrel shifter 100 and the zero detector 200 can be used as substitutes, which is unnecessary as hardware. Therefore, in order to generate the overflow flag, it is sufficient to have only the generator 300, and there is an effect that the addition of hardware amount is small.

第4図に、上記の実施例と比較される参考例におけるバ
レルシフタの動作を、(a)1サイクル目と(2)2サ
イクル目に分けて示す。先ず、(a)1サイクル目に入
力データ10を(n−r)桁算術右シフトした結果と入力
データの符号61との排他的論理和をそれぞれ求め、その
各桁が全てゼロであるか否かを検出し(信号線51)、こ
の結果を次のサイクルまで保持するフリツプフロツプ40
0へラツチする。(b)2サイクル目には、本来のr桁
算術左シフトを行い、シフト結果30、こぼれ40、ゼロフ
ラグ50を出力する。このとき、入力データの符号61とシ
フト結果の符号32と1サイクル目に求めフリツプフロツ
プ400に保持しておいた値51を用いてオーバーフローフ
ラグ70を生成することができる。
FIG. 4 shows the operation of the barrel shifter in the reference example to be compared with the above embodiment, separately for (a) the first cycle and (2) the second cycle. First, (a) in the first cycle, the exclusive OR of the result of (n−r) digit arithmetic right shift of the input data 10 and the code 61 of the input data is obtained, and whether each digit is zero or not The flip-flop 40 that detects whether or not (signal line 51) and holds this result until the next cycle.
Latch to 0. (B) In the second cycle, the original r-digit arithmetic left shift is performed, and the shift result 30, the spill 40, and the zero flag 50 are output. At this time, the overflow flag 70 can be generated by using the code 61 of the input data, the code 32 of the shift result, and the value 51 obtained in the first cycle and stored in the flip-flop 400.

したがつて、第4図の本参考例によれば、ハードウエア
量の少ないオーバーフローフラグ生成器300とフリツプ
フロツプ400を追加し、データのall“0"もしくはall
“1"を検出することのできるゼロ検出器200を用い、バ
レルシフタ自身を使つて(n−r)桁算術右シフトをあ
らかじめ行うことにより、r桁算術左シフト時のオーバ
ーフローフラグ70を容易に生成することができ、シフタ
のハードウエア量が少ないと言う利点があるが、オーバ
ーフローフラグの出力に2サイクルを必要とすると言う
欠点がある。
Therefore, according to the reference example of FIG. 4, an overflow flag generator 300 and a flip-flop 400 with a small amount of hardware are added, and all “0” or all of the data is added.
By using the zero detector 200 that can detect “1” and using the barrel shifter itself to perform (n−r) digit arithmetic right shift in advance, the overflow flag 70 at the time of r digit arithmetic left shift can be easily generated. However, there is an advantage that the shifter has a small amount of hardware, but there is a disadvantage that it requires two cycles to output the overflow flag.

〔発明の効果〕〔The invention's effect〕

本発明によれば、1サイクルで任意の桁シフトを行うバ
レルシフタにおいて、逐次シフトを行つた場合と同じ演
算フラグを生成できるので、従来の命令仕様と互換性を
保ちながら処理を高速に実行できる効果がある。
According to the present invention, in a barrel shifter that shifts an arbitrary digit in one cycle, the same operation flag as in the case of performing sequential shift can be generated, so that the processing can be executed at high speed while maintaining compatibility with the conventional instruction specifications. There is.

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

第1図は本発明の実施例によるバレルシフタの構成ブロ
ツク図、第2図はゼロ検出器の論理図、第3図はオーバ
ーフローフラグ生成器の論理図、第4図は本発明の実施
例と比較される参考例による算術左シフトのオーバーフ
ローフラグを生成するときのバレルシフタの動作説明図
である。 100,101……バレルシフタ、200,201……ゼロ検出器、30
0……オーバーフローフラグ生成器、1……排他的論理
和ゲート、2……反転器、3……NANDゲート、4……OR
ゲート、400……フリツプフロツプ。
1 is a block diagram of a barrel shifter according to an embodiment of the present invention, FIG. 2 is a logic diagram of a zero detector, FIG. 3 is a logic diagram of an overflow flag generator, and FIG. 4 is a comparison with an embodiment of the present invention. FIG. 10 is an operation explanatory diagram of the barrel shifter when an overflow flag for arithmetic left shift is generated according to the reference example. 100,101 …… Barrel shifter, 200,201 …… Zero detector, 30
0 ... Overflow flag generator, 1 ... Exclusive OR gate, 2 ... Inverter, 3 ... NAND gate, 4 ... OR
Gate, 400 ... Flip flip.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 岡田 哲彦 東京都国分寺市東恋ヶ窪1丁目280番地 株式会社日立製作所中央研究所内 (56)参考文献 特開 昭49−91146(JP,A) 特開 昭57−50049(JP,A) 特開 昭58−142438(JP,A) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Tetsuhiko Okada 1-280 Higashi Koigakubo, Kokubunji City, Tokyo Inside Central Research Laboratory, Hitachi, Ltd. (56) Reference JP 49-91146 (JP, A) JP 57 -50049 (JP, A) JP-A-58-142438 (JP, A)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】最上位桁で符号を表示するn桁の入力デー
タを入力とし、上記n桁の入力データのr桁算術左シフ
ト結果と上記n桁の入力データの最上位桁ビット信号を
保存したn−r桁算術右シフト結果とを並列に出力する
シフタと、 該シフタによる上記n桁の入力データの上記r桁算術左
シフト結果出力の最上位桁ビット信号と上記n桁の入力
データの最上位桁ビット信号との排他的論理和を出力す
る第1の排他的論理和回路と、 上記シフタによる上記n桁の入力データの上記最上位桁
ビット信号を保存した上記n−r桁算術右シフト結果と
上記n桁の入力データの上記最上位桁ビット信号との排
他的論理和を各ビット毎に求め、その結果を出力する第
2の排他的論理和回路と、 該第2の排他的論理和回路の各ビットの排他的論理和出
力の論理和を出力する第1の論理ゲートと、 該第1の論理ゲートの出力と上記第1の排他的論理和回
路の出力との論理和を出力する第2の論理ゲートとを具
備してなり、 該第2の論理ゲートの論理和出力よりオーバーフローフ
ラグを得ることを特徴とするシフトフラグ生成回路。
1. Inputting n-digit input data for displaying a sign at the most significant digit, and saving the r-digit arithmetic left shift result of the n-digit input data and the most significant digit bit signal of the n-digit input data. A shifter for outputting the n-r digit arithmetic right shift result in parallel, and the most significant digit bit signal of the r digit arithmetic left shift result output of the n digit input data by the shifter and the n digit input data. A first exclusive OR circuit that outputs an exclusive OR with the most significant bit signal, and the n-r digit arithmetic right that stores the most significant bit signal of the n digit input data by the shifter A second exclusive OR circuit that obtains an exclusive OR of the shift result and the most significant bit signal of the n-digit input data for each bit and outputs the result, and the second exclusive OR circuit. Exclusive OR output of each bit of OR circuit A first logical gate that outputs a logical sum; and a second logical gate that outputs a logical sum of the output of the first logical gate and the output of the first exclusive OR circuit. A shift flag generating circuit, wherein an overflow flag is obtained from a logical sum output of the second logic gate.
JP59021699A 1984-02-10 1984-02-10 Shift flag generation circuit Expired - Lifetime JPH0736149B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59021699A JPH0736149B2 (en) 1984-02-10 1984-02-10 Shift flag generation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59021699A JPH0736149B2 (en) 1984-02-10 1984-02-10 Shift flag generation circuit

Publications (2)

Publication Number Publication Date
JPS60167030A JPS60167030A (en) 1985-08-30
JPH0736149B2 true JPH0736149B2 (en) 1995-04-19

Family

ID=12062312

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59021699A Expired - Lifetime JPH0736149B2 (en) 1984-02-10 1984-02-10 Shift flag generation circuit

Country Status (1)

Country Link
JP (1) JPH0736149B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6398729A (en) * 1986-10-15 1988-04-30 Fujitsu Ltd Barrel shifter
JPS6421531A (en) * 1987-07-16 1989-01-24 Fujitsu Ltd Barrel shifter circuit
DE4304198A1 (en) * 1993-02-12 1994-08-18 Itt Ind Gmbh Deutsche Method of speeding up the data processing of a signal processor
US6292814B1 (en) * 1998-06-26 2001-09-18 Hitachi America, Ltd. Methods and apparatus for implementing a sign function

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5533102B2 (en) * 1972-12-29 1980-08-28
JPS5750049A (en) * 1980-09-09 1982-03-24 Toshiba Corp Shifting circuit

Also Published As

Publication number Publication date
JPS60167030A (en) 1985-08-30

Similar Documents

Publication Publication Date Title
EP0127988B1 (en) A normalizing circuit
JP2585649B2 (en) Division circuit
JPH0736149B2 (en) Shift flag generation circuit
JPH04350724A (en) Shift extent detecting circuit
JPH10283164A (en) Division circuit
JP2766133B2 (en) Parallel-serial data conversion circuit
JPS6227864A (en) Totalizing circuit
JP2907276B2 (en) Arithmetic processing unit
JP3482102B2 (en) Absolute distance calculation circuit
KR0175357B1 (en) Overflow Detection Circuit of Operator for High Speed
JP3210356B2 (en) Data zero judgment device
JP2615746B2 (en) Bit operation circuit
JP2569330B2 (en) Multiplication circuit
JP2575856B2 (en) Arithmetic circuit
JP3539077B2 (en) Division method by parallel operation method
JP2998324B2 (en) Normalized shift device and normalized shift method
KR20010091260A (en) Exponent unit for data processing system
JPH0764767A (en) Adder
JPH0553768A (en) Divider
JPS59217294A (en) Signal shift circuit
JPH0764768A (en) Absolute value accumulator
JPH06301516A (en) Semiconductor integrated circuit
JPS63115229A (en) Element shift system
JP2002351821A (en) Mediation control method and circuit
JPH03102265A (en) Maximum value detecting circuit