[go: up one dir, main page]

JPS5979495A - Shift circuit - Google Patents

Shift circuit

Info

Publication number
JPS5979495A
JPS5979495A JP57188971A JP18897182A JPS5979495A JP S5979495 A JPS5979495 A JP S5979495A JP 57188971 A JP57188971 A JP 57188971A JP 18897182 A JP18897182 A JP 18897182A JP S5979495 A JPS5979495 A JP S5979495A
Authority
JP
Japan
Prior art keywords
shift
bit
complement
circuit
shift 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
JP57188971A
Other languages
Japanese (ja)
Inventor
Tsutomu Sakamoto
務 坂本
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP57188971A priority Critical patent/JPS5979495A/en
Publication of JPS5979495A publication Critical patent/JPS5979495A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C19/00Digital stores in which the information is moved stepwise, e.g. shift registers

Landscapes

  • Shift Register Type Memory (AREA)

Abstract

PURPOSE:To eliminate the shift control using two complements and to attain a simple and high-speed shift control by performing a shift control at a right shift by an inverter using a complement of 1 of shift number N and supplying a lacking bit from another shift register. CONSTITUTION:For the right shift control, the complement of 1 of the shift number N is obtained from the inverter 6. In case the shift number is supplied with the complement of 1, the shift number is less by 1 compared with a case where the complement +1 of the complement of 2 of -N=N. This inconvenience is solved by adding a left shift of a bit through a shift circuit 7. That is, the complement of 1 of shift number N is obtained by the inverter 6 in a right shift mode and applied to the shift circuits 2 and 3 with the same bit allotment as a conventional circuit. The output of the circuit 3 is equal to the data that is shifted less by a bit than the normal shift. Therefore the signal R is turned genuine to have a left shift further by a bit through a shift circuit 7. Thus a normal shift result is obtained.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はディジタル式データ処理装倚忙使用されるシフ
ト回路に関し、特に、ラッチ回路を持たずに任意のシフ
ト数を1周期の間にシフトするいわゆるバレルシフタに
関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention relates to a shift circuit used in digital data processing equipment, and particularly to a shift circuit for shifting an arbitrary number of shifts during one cycle without having a latch circuit. Regarding the so-called barrel shifter.

〔発明の技術的背景〕[Technical background of the invention]

第1図は従来の(ツク成例である。同図において、(1
)は64ビツトのデータセレクタであり、論理シフト、
算術シフト、ローテートシフトなどのシフトモードに対
応し、32ビツトのデータD等を選択する。(2)は0
.16.32.48ビツトのシフト回路であυ、左ロー
テートシフトの機能を有する。このシフト回路(2)は
実際はデータセレクタでト1り成される。
Figure 1 shows an example of the conventional (1) configuration.
) is a 64-bit data selector with logical shift,
It corresponds to shift modes such as arithmetic shift and rotate shift, and selects 32-bit data D, etc. (2) is 0
.. It is a 16.32.48-bit shift circuit and has a left rotation shift function. This shift circuit (2) is actually made up of a data selector.

(3)は0.】、・・・15ビツトの各ビット単位でシ
フトモードな左シフト回路であり、これもデータセレク
タで構成され32ビツトの結果を出力する。シフト回路
12)、シフト回路(3)のシフト数はNで与えられ、
データーヒレフタ(4)を経由してシフト回路(2)及
び(3)に与えられる。(5)は右シフトを行う場合の
シフト数生成用の加算器であり、シフト数Nの2の補数
を求める。シフト数Nは6ビツトで構成され0〜31ビ
ツトのシフトを指示する。
(3) is 0. ], . . . This is a left shift circuit that operates in a shift mode in units of 15 bits. This circuit is also composed of a data selector and outputs a 32-bit result. The number of shifts in shift circuit 12) and shift circuit (3) is given by N,
The data is applied to shift circuits (2) and (3) via a data filler (4). (5) is an adder for generating a shift number when performing a right shift, and calculates the two's complement of the shift number N. The shift number N is composed of 6 bits and indicates a shift of 0 to 31 bits.

次に第1図に示した従来回路の動作を説明する。Next, the operation of the conventional circuit shown in FIG. 1 will be explained.

まず、左論理シフトの場合は、データセレクタ+11は
「Do〜、1,01の組みを選択[7、シフト回路(2
)へ57、’/7ト数Nld (I)*****’)2
(*は1o″又は′1′のいずれであってもよい)で表
わされ、データセレクタ(4)を介して上位2ビツトが
シフト回路(2)、下位4ビツトがシフト回路(3)を
制御する。シフト数Nの上位2ビツトは’oo’の時0
ビツト、 ’01’のR16ヒツト、’10’ ノ時3
2ビツト、’II’ノ時48ピットの重みを持っている
。まだ下位4ビツトはO〜15ビットオでの重みを持つ
。従って、シフト回路(2)ではシフト数Nの最上位ビ
ットが0′であるから、0または16ビツト左ローテー
トシフトしたデータを選択し、シフト回路(3)へ流す
。シフト回路(3)では残りの0〜15ビツトの左シフ
トを行ない、データを出力する。左算術シフトも同様で
ある。
First, in the case of left logical shift, data selector +11 selects the set of 1, 01 [7, shift circuit (2
) to 57, '/7 number Nld (I) *****')2
(* may be either 1o'' or '1'), the upper 2 bits are sent to the shift circuit (2) and the lower 4 bits are sent to the shift circuit (3) via the data selector (4). Control.The upper 2 bits of the shift number N are 0 when it is 'oo'.
Bit, '01' R16 hit, '10' time 3
2 bits, 'II' has a weight of 48 pits. The lower 4 bits still have a weight of 0 to 15 bits. Therefore, in the shift circuit (2), since the most significant bit of the shift number N is 0', data rotated and shifted to the left by 0 or 16 bits is selected and sent to the shift circuit (3). The shift circuit (3) shifts the remaining 0 to 15 bits to the left and outputs the data. The same goes for left arithmetic shifts.

但し、左算術シフトの場合は符号ビットD。が残るよう
制御されるが本発明と直接関係がないので説明は省略す
る。左ローテートシフトの場合はデータセレクタ(1)
で[D3.〜31 + Do〜31Jの組みを選択する
他の動作は上記した左論理シフトと回じであるので省I
l+75する。
However, in the case of left arithmetic shift, the sign bit is D. is controlled so that it remains, but since it has no direct relation to the present invention, its explanation will be omitted. For left rotation shift, data selector (1)
[D3. The other operations for selecting the set of ~31 + Do ~31J are the left logical shift and rotation described above, so I can save I.
Add l+75.

次に右シフトに関して説明する。右シフトモードに対応
するデータセレクタ(1)の動作は、右算術シフトでr
 Do〜、I、S」の組合せを選択すること以外は左シ
フトと同様である。ここでSはデータDの符号ビットD
、を32ビツトに拡張したものである、シフト数Nは、
まず加算器(5)により2の補数に変換される。即ち6
4−Nの値をデータセレクタ(4)で選択し、上記と同
様にシフト回路(2)またけ(3)に与える。例えば右
5ビットシフト時、シフト数N=(000101)2は
加算器(5)により(111011)2に変換され、デ
ータセレクタ(4)から出力される。この選択されたシ
フト数Nの上位2ビツト(′11″)からシフト回路(
2)は48ビツト左ローテートシフトした結果を生成し
、シフト回路(3)に出力する。そ1,2で下位4ビツ
ト(′″1011”)からシフト回路(3)は、左11
ビツトシフトし最終結果を生成するが、この結果は右5
ビツトシフトと等価である。
Next, the right shift will be explained. The operation of the data selector (1) corresponding to right shift mode is r with right arithmetic shift.
It is the same as the left shift except that the combination of "Do~, I, S" is selected. Here, S is the sign bit D of data D
is expanded to 32 bits, and the shift number N is
First, it is converted into a two's complement number by an adder (5). That is 6
The value of 4-N is selected by the data selector (4) and applied to the shift circuit (2) and the straddle (3) in the same manner as above. For example, when shifting 5 bits to the right, the shift number N=(000101)2 is converted to (111011)2 by the adder (5) and output from the data selector (4). The shift circuit (
2) generates the result of 48-bit left rotation shift and outputs it to the shift circuit (3). In parts 1 and 2, the shift circuit (3) shifts from the lower 4 bits (''1011'') to the left 11 bits.
Bit shift is performed to generate the final result, but this result is 5 bits to the right.
Equivalent to bit shift.

〔背景技術の問題点〕[Problems with background technology]

以上の従来技術に於ては、右シフトに於てシフト数Nの
2の補数を求めなければならず、これに要する時間が無
視できず、データ処理装置全体の性能にも影響を及ばず
ようになる欠点があった。
In the above conventional technology, the two's complement of the shift number N must be found in the right shift, and the time required for this cannot be ignored, and the performance of the entire data processing device will not be affected. It had some drawbacks.

〔発明の目的〕[Purpose of the invention]

本発明は上記欠点を克服するために2つの補数によるシ
フト制御が不要であり、高速で且つ簡単な、シフト制御
が可能なシフト回路を提供することを目的とする。
SUMMARY OF THE INVENTION In order to overcome the above-mentioned drawbacks, it is an object of the present invention to provide a shift circuit that does not require shift control using two's complement numbers and is capable of high-speed and simple shift control.

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

本発明に於ては右シフト時のシフト制御をインバータに
よりシフト数Nの1の補数で行ない、不足の1ビツトは
別のシフトレジスタ傾よシ加えて正規のシフト結果を得
られるようにしたものである。
In the present invention, shift control when shifting to the right is performed by an inverter using the 1's complement of the shift number N, and the missing 1 bit is added to another shift register to obtain a normal shift result. It is.

〔発明の実施例〕[Embodiments of the invention]

第2図は本発明の一実施例を示す図である。同図におい
ては第1図と同一部分には同一番号が付けである。新し
く設けられた部分について説明をすると、((i) f
lシフト数Nの各ビットを反転するインバータ、(7)
は0″マたは′1″ビットの左シフト回路であり、右シ
フトを示す信号Rが真(′″1つになったときのみ′″
1#1#ビツトフトを行う回路である。
FIG. 2 is a diagram showing an embodiment of the present invention. In this figure, the same parts as in FIG. 1 are given the same numbers. To explain the newly added part, ((i) f
l Inverter that inverts each bit of shift number N, (7)
is a left shift circuit for 0" or "1" bits, and the signal R indicating right shift is true ("only when there is one")
This is a circuit that performs 1#1#bitsoft.

即ち左シフト時はRを偽COつとし、シフト回路(力に
シフト動作を行わせない。またこのシフト回路(力は他
のシフト回路+21 、 (3)と同様データセレクタ
で構成され32ビツト出力する。
That is, when shifting to the left, R is set to false CO, and the shift circuit (power) does not perform a shift operation. Also, this shift circuit (power) is composed of a data selector like the other shift circuits +21, and has a 32-bit output. do.

次に第2図の動作を説明する。まず、左シフト時は従来
例と同様にシフト数Nがそのままデータセレクタ(4)
を経由し、シフト回路(2)及び(3)に与えられる。
Next, the operation shown in FIG. 2 will be explained. First, when shifting to the left, the shift number N is the same as the data selector (4) as in the conventional example.
is applied to shift circuits (2) and (3).

また信号几は偽にし、シフト回路(力はシフト動作はせ
ずに人力を結果としてそのまま出力する。この時データ
セレクタ(1)、シフト回路(2)。
Also, the signal is set to false, and the shift circuit outputs the human power as it is without performing a shift operation. At this time, the data selector (1) and the shift circuit (2).

(3)は第1図と同様の動作を行う。(3) performs the same operation as in FIG.

次に、右シフト時のシフト制b111は、シフト数Nの
′″1″の補数(N)をインバータ(6)より得る。′
1′の補数でシフト数を与えた場合は、2の補数(−N
=N+1)で与える場合に対してシフト数が1だけ少な
いがこの不都合はシフト回路(力で1ビツトの左シフト
を追加することによシ解決されている。即ち右シフlH
j:シフト数Nの′″1#の補数をインバータ(6)で
求め、データセレクタ(4)を経由して、従来回路と同
じビット割当てによりシフト回路+21 、 (31に
与える。シント回路(3)の出力は正規のシフトより1
ビツト少くシフトされたデータであるので、信号Rを真
にすることによりシフト回路(力により更に1ビツトだ
け左ソフトさせ正規のシフト結果を得るのである。
Next, the shift system b111 at the time of right shift obtains the ``1'' complement (N) of the shift number N from the inverter (6). ′
If the shift number is given as a 1''s complement, it is a 2's complement (-N
=N+1), but this disadvantage is solved by adding a 1-bit left shift using the shift circuit (i.e., right shift lH).
j: The complement of ``1#'' of the shift number N is obtained by the inverter (6), and is given to the shift circuit +21, (31) via the data selector (4) with the same bit assignment as the conventional circuit. ) output is 1 less than regular shift
Since the data has been shifted by a smaller number of bits, by making the signal R true, the shift circuit (power) further softens the data by one bit to the left to obtain a normal shift result.

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

本発明は以上のようになるものであって、右シフト時に
加算器による演算が不要なため、シフト回路(力と加算
器(5)の動作時間の差の分だけシフトが高速比される
。一般にシフト回路をI’flJ成するデータセレクタ
の動作時間は加算器に比べて数倍短いので本発明の構成
による効果は大きい。
The present invention is as described above, and since the operation by the adder is not required when shifting to the right, the shift is increased in speed by the difference between the operation time of the shift circuit (power and the adder (5)). Generally, the operating time of the data selector forming the shift circuit I'flJ is several times shorter than that of the adder, so the effect of the configuration of the present invention is large.

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

第1図は従来のシフト回路構成を示す図、第2図は本発
明の一実施例の構成を示す図であるう1:データセレク
タ、  2:シフト回路、  3:シフト回路、4:デ
ータセし/フタ、  6:インバータ、  71ビツト
シフレづ伐夕、It:右シフトを示す信号。 代理人 弁理士  井 上 −力 筒  1  図 第  2  図
FIG. 1 is a diagram showing the configuration of a conventional shift circuit, and FIG. 2 is a diagram showing the configuration of an embodiment of the present invention. 1: Data selector 2: Shift circuit 3: Shift circuit 4: Data set / Lid, 6: Inverter, 71-bit shift shift, It: Signal indicating right shift. Agent Patent Attorney Inoue - Rikitsutsu 1 Figure 2

Claims (1)

【特許請求の範囲】[Claims] n +] ヒツト(n :正数)から成るシフト数Nの
1の補ppqを求める手段と、該シフト数NとNとを選
択する手段と、2°ビツトのデータを一方向にO′−ま
たは1ビツトシフトする手段とを具備し7、該otたは
1ビツトシフトする手段はシフト数Nの選択に呼応して
1ビツトシフトする仁とにより2  ビットのデータを
入力し、一方向にのみ0ないし2 −1ビツトシフトす
ることにょシ左右両方向のシフトを行い2°ビツト長の
シフト結果を得ることを特徴とするシフト回路。
n+] means for calculating the 1's complement ppq of the shift number N consisting of hits (n: positive number); means for selecting the shift numbers N and N; or 1-bit shifting means 7, and the ot or 1-bit shifting means inputs 2-bit data by shifting 1 bit in response to the selection of the shift number N, and inputs 2-bit data from 0 to 2 only in one direction. - A shift circuit characterized in that when shifting by 1 bit, a shift is performed in both left and right directions to obtain a shift result of 2° bit length.
JP57188971A 1982-10-29 1982-10-29 Shift circuit Pending JPS5979495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57188971A JPS5979495A (en) 1982-10-29 1982-10-29 Shift circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57188971A JPS5979495A (en) 1982-10-29 1982-10-29 Shift circuit

Publications (1)

Publication Number Publication Date
JPS5979495A true JPS5979495A (en) 1984-05-08

Family

ID=16233126

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57188971A Pending JPS5979495A (en) 1982-10-29 1982-10-29 Shift circuit

Country Status (1)

Country Link
JP (1) JPS5979495A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63163527A (en) * 1986-12-25 1988-07-07 Nec Corp Data packing circuit
JPS63314639A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd Barrel shifter circuit
JPS63314640A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd Barrel shifter circuit
JPS63314641A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd barrel shifter circuit
US4807172A (en) * 1986-02-18 1989-02-21 Nec Corporation Variable shift-count bidirectional shift control circuit
JPH01161434A (en) * 1987-12-17 1989-06-26 Nec Corp Shift arithmetic circuit
JPH01244527A (en) * 1988-03-25 1989-09-28 Nec Corp Information processor
JP2013218708A (en) * 2006-01-31 2013-10-24 Qualcomm Inc Register-based shifts for unidirectional rotator

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57196350A (en) * 1981-05-27 1982-12-02 Mitsubishi Electric Corp Data processor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57196350A (en) * 1981-05-27 1982-12-02 Mitsubishi Electric Corp Data processor

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4807172A (en) * 1986-02-18 1989-02-21 Nec Corporation Variable shift-count bidirectional shift control circuit
JPS63163527A (en) * 1986-12-25 1988-07-07 Nec Corp Data packing circuit
JPS63314639A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd Barrel shifter circuit
JPS63314640A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd Barrel shifter circuit
JPS63314641A (en) * 1987-06-17 1988-12-22 Fujitsu Ltd barrel shifter circuit
JPH01161434A (en) * 1987-12-17 1989-06-26 Nec Corp Shift arithmetic circuit
JPH01244527A (en) * 1988-03-25 1989-09-28 Nec Corp Information processor
JP2013218708A (en) * 2006-01-31 2013-10-24 Qualcomm Inc Register-based shifts for unidirectional rotator
JP2015144002A (en) * 2006-01-31 2015-08-06 クゥアルコム・インコーポレイテッドQualcomm Incorporated Register-based shifts for unidirectional rotator

Similar Documents

Publication Publication Date Title
US4953115A (en) Absolute value calculating circuit having a single adder
JPH0479013B2 (en)
US4648059A (en) N-bit magnitude comparator
US20020156990A1 (en) Modulus address generator and method for determining a modulus address
JPH0426731B2 (en)
JPS5979495A (en) Shift circuit
US7051194B2 (en) Self-synchronous transfer control circuit and data driven information processing device using the same
JPH01271833A (en) Shifter
JPS642986B2 (en)
JPS6224815B2 (en)
JPH07118654B2 (en) Arithmetic unit
JP2509279B2 (en) Floating point number-fixed point number converter
JPH09244873A (en) High speed barrel shifter
JPH0553762A (en) Series comparator
US4707799A (en) Bit sliced decimal adding/subtracting unit for multi-digit decimal addition and subtraction
KR100567643B1 (en) Zero determination signal generating circuit
JPS634335A (en) Data format conversion circuit
JP3110072B2 (en) Pre-normalization circuit
JPS6130118A (en) Timer circuit
JPH04192033A (en) Complement conversion circuit
JPH0363816A (en) Bit retriever
JPS63115229A (en) Element shift system
JPH06309147A (en) Arithmetic and logic unit
JPH025128A (en) Dividing circuit
JPH07191830A (en) Arithmetic unit