JP2907276B2 - Arithmetic processing unit - Google Patents

Arithmetic processing unit

Info

Publication number
JP2907276B2
JP2907276B2 JP8172218A JP17221896A JP2907276B2 JP 2907276 B2 JP2907276 B2 JP 2907276B2 JP 8172218 A JP8172218 A JP 8172218A JP 17221896 A JP17221896 A JP 17221896A JP 2907276 B2 JP2907276 B2 JP 2907276B2
Authority
JP
Japan
Prior art keywords
input data
carry
group
data
arithmetic
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
JP8172218A
Other languages
Japanese (ja)
Other versions
JPH1021054A (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 JP8172218A priority Critical patent/JP2907276B2/en
Publication of JPH1021054A publication Critical patent/JPH1021054A/en
Application granted granted Critical
Publication of JP2907276B2 publication Critical patent/JP2907276B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、2の補数演算を行
う演算処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an arithmetic processing unit for performing a two's complement operation.

【0002】[0002]

【従来の技術】この種の演算処理装置の従来例を図5、
図6を用いて説明する。図5において、演算処理装置
は、ここでは16ビットの入力データA0〜A15に対
して連続した4ビットを1群として並列動作する4群の
演算器群34、35、36及び37で分割構成されてい
る。各演算器群は、4つの入力選択回路31、4つの半
加算器33を含む。また、演算器群34、35、36は
上記構成に加えて4つの出力選択回路38を有し、演算
器群35、36は更に選択回路39を有する。演算器群
37は上記構成に加えてキャリー選択回路32を有す
る。
2. Description of the Related Art A conventional example of this type of arithmetic processing device is shown in FIG.
This will be described with reference to FIG. In FIG. 5, the arithmetic processing unit is divided into four groups of arithmetic units 34, 35, 36, and 37 that operate in parallel with four consecutive bits as one group for 16-bit input data A0 to A15. ing. Each operation unit group includes four input selection circuits 31 and four half adders 33. Further, the computing unit groups 34, 35 and 36 have four output selection circuits 38 in addition to the above configuration, and the computing unit groups 35 and 36 further have a selection circuit 39. The operation unit group 37 includes a carry selection circuit 32 in addition to the above configuration.

【0003】入力選択回路31は入力データの各ビット
または入力データの各ビットの論理反転を入力データの
MSB(Most Significant Bit)
によって選択し出力する。演算器群37のキャリー選択
回路32は論理値”1”または論理値”0”を入力デー
タのMSBによって選択し出力する。演算器群37の半
加算器33は、入力選択回路31の出力及びキャリー選
択回路32の出力を入力とし、各ビット毎の加算結果と
上位ビットの半加算器33へのキャリー信号を出力す
る。
[0003] The input selection circuit 31 converts the logical inversion of each bit of the input data or each bit of the input data into the MSB (Most Significant Bit) of the input data.
Select and output. The carry selection circuit 32 of the operation unit group 37 selects and outputs the logical value “1” or the logical value “0” according to the MSB of the input data. The half adder 33 of the operation unit group 37 receives the output of the input selection circuit 31 and the output of the carry selection circuit 32 as inputs, and outputs the result of addition for each bit and the carry signal of the upper bit to the half adder 33.

【0004】演算器群35、36における選択回路39
は、各演算器群内の最上位ビットの半加算器33のキャ
リー信号を選択して上位の演算器群へ制御信号として出
力する。
The selection circuit 39 in the operation unit groups 35 and 36
Selects the carry signal of the half-adder 33 of the most significant bit in each operation unit group and outputs it as a control signal to the upper operation unit group.

【0005】高速に演算を行うために各演算器群は並列
動作し、前述したように演算器群34、35、36の出
力選択回路38は下位演算器群の制御信号によって制御
される。
[0005] In order to perform the operation at high speed, the operation units operate in parallel, and the output selection circuits 38 of the operation units 34, 35 and 36 are controlled by the control signals of the lower operation units as described above.

【0006】従来、この演算処理装置において2の補数
の絶対値を求める場合、入力データが負数の時は、入力
選択回路31で入力データの各ビットの論理反転を選択
し、キャリー選択回路32において論理値”1”を選択
し、この2入力を半加算器33において加算していた。
また、入力データが正数の場合は、入力選択回路31で
入力データの各ビットを選択し、キャリー選択回路32
において論理値”0”を選択し、この2入力を半加算器
33において加算していた。
Conventionally, when calculating the absolute value of a two's complement number in this arithmetic processing device, when the input data is a negative number, the input selection circuit 31 selects the logical inversion of each bit of the input data, and the carry selection circuit 32 The logical value "1" is selected, and the two inputs are added in the half adder 33.
When the input data is a positive number, each bit of the input data is selected by the input selection circuit 31 and the carry selection circuit 32
, The logical value “0” is selected, and the two inputs are added in the half adder 33.

【0007】[0007]

【発明が解決しようとする課題】このように、従来の場
合、演算を高速に行うために連続した複数ビット毎に演
算器を分割し、並列動作しても入力データのMSBの値
によって演算器の入力が決まるので、演算時間が入力デ
ータのMSBに依存し、高速化が十分できていなかっ
た。
As described above, in the prior art, the arithmetic unit is divided into a plurality of continuous bits in order to perform the arithmetic operation at high speed, and even if the arithmetic unit is operated in parallel, the arithmetic unit is determined by the value of the MSB of the input data. Since the input is determined, the calculation time depends on the MSB of the input data, and the high-speed operation has not been sufficiently achieved.

【0008】そこで、本発明の課題は、最上位ビットの
値が確定する以前に演算を開始できるようにして演算の
高速化を図ることにある。
SUMMARY OF THE INVENTION It is an object of the present invention to speed up the operation by enabling the operation to be started before the value of the most significant bit is determined.

【0009】[0009]

【課題を解決するための手段】本発明は、N(Nは正の
整数)ビットの入力データに対して連続した複数ビット
を1群として並列動作する複数の演算器群で分割構成さ
れて2の補数演算を行う演算処理装置において、各演算
器群は、各ビット毎に入力データの論理反転データを求
る反転手段と、各ビット毎に前記論理反転データと
位演算器群からの複数のキャリー信号とを入力として演
算し、演算結果と該演算によるキャリー信号とを前記下
位演算器群からの各キャリー信号毎に出力する演算手段
と、当該演算手段からの複数のキャリー信号のうち一つ
を、前記入力データの最上位ビット及び前記連続した複
数ビットの最上位ビットの演算手段のキャリー出力のう
ち少なくとも一方によって上位の演算器群へ選択して
力する選択手段と、最下位群にあっては前記入力データ
の最上位ビット、残りの群にあっては前記入力データの
最上位ビットと下位の演算器群からのキャリー信号とに
よってそれぞれ各ビット毎の演算結果を選択する複数の
出力選択手段とを有することを特徴とする。
According to the present invention, two or more arithmetic units which operate in parallel as a group of a plurality of continuous bits for N (N is a positive integer) input data are divided into two units. in the arithmetic processing unit for performing a complement operation, the arithmetic and logic unit group, said logic inverted data and the lower logical inversion data of the input data for each bit and inverting means Ru determined <br/> Me, for each bit
An operation is performed using a plurality of carry signals from the group of position arithmetic units as inputs, and the operation result and the carry signal resulting from the operation are calculated as described above.
One of the arithmetic means you output to each carry signal from position calculation unit group, a plurality of carry signals from the computing means
A carry output of the arithmetic means of the most significant bit of the plurality of contiguous bits most significant bits and the data of the input data
Selection means for <br/> force out by selecting the arithmetic unit group of the upper by at least one Chi, the most significant bit of the input data In the lowest group, with the remaining groups of the input data A plurality of output selecting means for selecting an operation result for each bit based on the most significant bit and a carry signal from a lower-order arithmetic unit group are provided.

【0010】なお、前記演算手段は、2つのキャリー信
号を入力として受け、前記論理反転データと一方のキャ
リー信号とを入力とする第1の半加算器と、前記論理反
転データと他方のキャリー信号とを入力とする第2の半
加算器とから成る。
The arithmetic means receives two carry signals as inputs, receives a first half adder which receives the logically inverted data and one of the carry signals, and a first half adder which receives the logically inverted data and the other carry signal. And a second half adder having the input as an input.

【0011】本発明によればまた、N(Nは正の整数)
ビットの入力データに対して連続した複数ビットを1群
として並列動作する複数の演算器群で分割構成されて2
の補数演算を行う演算処理装置において、各演算器群
は、各ビット毎に”1”を示すABS信号に基づいて入
力データの論理反転データを選択データとして出力する
入力選択手段と、各ビット毎に前記選択データと下位演
算器群からの複数のキャリー信号とを入力として演算
し、演算結果と該演算によるキャリー信号とを前記下位
演算器群からの各キャリー信号毎に出力する演算手段
と、当該演算手段からの複数のキャリー信号のうちの一
つを、前記入力データの最上位ビットの論理反転データ
と前記”1”を示すABS信号との論理積及び前記連続
した複数ビットの最上位ビットの演算手段のキャリー出
力のうち少なくとも一方によって上位の演算器群へ選択
して出力する選択手段と、最下位群にあっては前記入力
データの最上位ビットの論理反転データと前記”1”を
示すABS信号との論理積、残りの群にあっては前記入
力データの最上位ビットの論理反転データと前記”1”
を示すABS信号との論理積と下位の演算器群からのキ
ャリー信号とによってそれぞれ各ビット毎の演算結果を
選択する複数の出力選択手段とを有することを特徴とす
る演算処理装置が得られる。
According to the present invention, N (N is a positive integer)
It is divided into a plurality of operation units that operate in parallel with a plurality of consecutive bits as one group with respect to the input data of bits, and
In the arithmetic processing unit that performs complementary operation of the arithmetic unit group includes an input selecting means for outputting a logic inverted data of the input data based on the ABS signal indicating "1" for each bit as the selected data, each bit Computing means for computing the selected data and a plurality of carry signals from the lower-order computing unit group as inputs, and outputting a computation result and a carry signal resulting from the computation for each carry signal from the lower-order computing unit group; and One of the plurality of carry signals from the arithmetic means is defined as the logical product of the logically inverted data of the most significant bit of the input data and the ABS signal indicating "1" and the most significant bit of the continuous plurality of bits. Selecting means for selecting and outputting to a higher-order arithmetic unit group by at least one of the carry outputs of the bit arithmetic means; Said a sense inverted data "1"
The logical product of the indicated ABS signal and the remaining group, the logically inverted data of the most significant bit of the input data and the "1"
And a plurality of output selecting means for selecting an operation result for each bit by a logical product of an ABS signal indicating the above and a carry signal from a lower-order operation unit group.

【0012】なお、前記演算手段は、2つのキャリー信
号を入力として受け、前記選択データと一方のキャリー
信号とを入力とする第1の半加算器と、前記選択データ
と他方のキャリー信号とを入力とする第2の半加算器と
から成る。
The arithmetic means receives two carry signals as inputs, and a first half adder which receives the selected data and one of the carry signals as inputs, and outputs the selected data and the other carry signal. And a second half adder as an input.

【0013】[0013]

【発明の実施の形態】本発明について図面を用いて説明
する。図1は本発明の第1の実施の形態を示す図であ
る。演算処理装置は、ここでは16ビットの入力データ
A0〜A15に対して連続した4ビットを1群として並
列動作する4つの演算器群15、16、17及び18で
分割構成されている。各演算器群は、4つの反転回路1
1及び4つの演算器12を含み、演算器群15〜17は
更に4つの出力選択回路14を、演算器群18は4つの
出力選択回路13をそれぞれ有する。また、演算器群1
6、17は上記構成に加えて選択回路1Aを有し、演算
器群18は選択回路19を有する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described with reference to the drawings. FIG. 1 is a diagram showing a first embodiment of the present invention. In this case, the arithmetic processing device is divided into four groups of arithmetic units 15, 16, 17, and 18 which operate in parallel with 16 bits of input data A0 to A15 as a group of continuous 4 bits. Each computing unit group has four inverting circuits 1
One and four operation units 12 are included, and operation unit groups 15 to 17 further have four output selection circuits 14, and operation unit group 18 has four output selection circuits 13, respectively. In addition, arithmetic unit group 1
6 and 17 have a selection circuit 1A in addition to the above configuration, and the operation unit group 18 has a selection circuit 19.

【0014】反転回路11は、図2(a)に示すよう
に、インバータゲート11から成る。演算器12は、図
2(b)に示すように、2個の半加算器121、122
から成る。半加算器121は、アンドゲート1211と
EX−OR(排他的論理和)回路1212とから成り、
半加算器122は、アンドゲート1221とEX−OR
回路1222とから成る。半加算器121、122は、
入力データの1ビットの論理反転信号と別々のキャリー
信号を入力として演算を行い、演算結果を出力する。な
お、各演算器群において、最初のビットの演算器12は
電源電位とアース電位とをキャリー信号として入力する
と共に2つのキャリー出力を発生する。2番目以降のビ
ットの演算器12は前位ビットの演算器12の2つのキ
ャリー出力を受け、次位ビットの演算器12に2つのキ
ャリー出力を与える。
The inverting circuit 11 includes an inverter gate 11, as shown in FIG. The arithmetic unit 12 includes two half adders 121 and 122 as shown in FIG.
Consists of The half adder 121 includes an AND gate 1211 and an EX-OR (exclusive OR) circuit 1212,
The half adder 122 includes an AND gate 1221 and an EX-OR.
And a circuit 1222. The half adders 121 and 122 are
An operation is performed using a 1-bit logical inversion signal of input data and a separate carry signal as inputs, and the operation result is output. In each operation unit group, the operation unit 12 of the first bit inputs the power supply potential and the ground potential as carry signals and generates two carry outputs. The arithmetic unit 12 for the second and subsequent bits receives two carry outputs from the arithmetic unit 12 for the leading bit, and provides two carry outputs to the arithmetic unit 12 for the next bit.

【0015】出力選択回路13は、図2(c)に示すよ
うに、インバータゲート131と入力データのMSBの
値によって選択を行う回路とを含み、演算器12からの
演算結果を入力とし、入力データのMSBの値によって
2つの入力の一方を選択し出力する。選択回路19は、
図2(e)に示すように、演算器群18の最上位ビット
の演算器12からの2本のキャリー信号、入力データの
MSBを入力とし、入力データのMSBによって出力を
選択し、上位演算器群に出力する。
As shown in FIG. 2 (c), the output selection circuit 13 includes an inverter gate 131 and a circuit for performing selection based on the value of the MSB of the input data. One of the two inputs is selected and output according to the value of the MSB of the data. The selection circuit 19
As shown in FIG. 2E, the two carry signals from the arithmetic unit 12 of the most significant bit of the arithmetic unit group 18 and the MSB of the input data are input, and the output is selected by the MSB of the input data. Output to the instrument group.

【0016】出力選択回路14は、図2(d)に示すよ
うに、インバータゲート141と下位演算器群のキャリ
ー信号(例えば、演算器群17の出力選択回路14の場
合、選択回路19の出力)によって選択を行う回路及び
入力データのMSBの値によって選択を行う回路とを含
み、演算器12からの演算結果を入力とし、2つの演算
結果とそれらの一方を反転した論理反転信号のうちのい
ずれか1つを選択して出力する。選択回路1Aは、図2
(f)に示すように、最上位ビットの演算器12からの
2本のキャリー信号を受け、下位演算器群のキャリー信
号によって選択を行う回路と入力データのMSBの値に
よって選択を行う回路とを含み、下位演算器群のキャリ
ー信号及び入力データのMSBによって出力を選択し、
上位演算器群に制御信号として出力する。
As shown in FIG. 2D, the output selection circuit 14 includes an inverter gate 141 and a carry signal of a lower-order operation unit group (for example, in the case of the output selection circuit 14 of the operation unit group 17, the output of the selection circuit 19 ) And a circuit for selecting based on the value of the MSB of the input data. The operation result from the operation unit 12 is input, and the two operation results and a logically inverted signal obtained by inverting one of them are input. Select any one and output. The selection circuit 1A is configured as shown in FIG.
As shown in (f), a circuit that receives two carry signals from the arithmetic unit 12 of the most significant bit and performs selection based on the carry signal of the group of lower arithmetic units, and a circuit that performs selection based on the MSB value of input data And the output is selected by the carry signal of the lower-order operation unit group and the MSB of the input data.
Output as a control signal to the higher-order computing unit group.

【0017】なお、図1においては、便宜上、例えば演
算器群18の出力選択回路13には最下位ビットの回路
にのみ入力データのMSBが与えられるように示されて
いるが、入力データのMSBは演算器群18の4つの出
力選択回路13すべてに与えられることは言うまでもな
い。これは、演算器群15、16、17の出力選択回路
14についても同様である。
In FIG. 1, for convenience, for example, the output selection circuit 13 of the operation unit group 18 is shown such that the MSB of the input data is given only to the circuit of the least significant bit. It is needless to say that is given to all four output selection circuits 13 of the operation unit group 18. This is the same for the output selection circuits 14 of the operation unit groups 15, 16, and 17.

【0018】この演算処理装置において2の補数の絶対
値を求める場合、入力データが負の時は、入力データの
論理反転に”1”を加算して絶対値を求めることができ
るので、演算器12において反転回路11により求めた
入力データの論理反転に”1”を加算した結果を、出力
選択回路13において入力データのMSBによって選択
し、出力選択回路14においては、下位演算器群のキャ
リー出力によって演算結果を選択することにより入力デ
ータの絶対値を得ることができる。入力データが正の時
は、演算器12において入力データの論理反転に”0”
を加算した結果の論理反転を、出力選択回路13、14
において選択することにより演算入力データの絶対値を
得ることができる。
When calculating the absolute value of a two's complement number in this arithmetic processing unit, when the input data is negative, "1" can be added to the logical inversion of the input data to obtain the absolute value. In step 12, the result obtained by adding "1" to the logical inversion of the input data obtained by the inverting circuit 11 is selected by the MSB of the input data in the output selecting circuit 13, and in the output selecting circuit 14, the carry output of the lower-order operation unit group is output. By selecting the operation result, the absolute value of the input data can be obtained. When the input data is positive, the arithmetic unit 12 inverts the logic of the input data to “0”.
Are added to the output selection circuits 13 and 14
By selecting in, the absolute value of the operation input data can be obtained.

【0019】よって、入力データのMSBの値に関わら
ず演算を実行し、その演算結果を入力データのMSBを
用いて選択するので演算開始時間が入力データのMSB
に依存することがなく実行できる。
Therefore, the operation is executed irrespective of the value of the MSB of the input data, and the operation result is selected using the MSB of the input data.
It can be executed without depending on.

【0020】図3は本発明の第2の実施の形態を示す図
である。演算処理装置は、ここでも16ビットの入力デ
ータA0〜A15に対して連続した4ビットを1群とし
て並列動作する4つの演算器群25、26、27及び2
8で分割構成されている。各演算器群は、4つの入力選
択回路21及び4つの演算器22を含み、演算器群2
5、28は更に4つの出力選択回路23を、演算器群2
6、27は4つの出力選択回路24をそれぞれ有する。
また、演算器群26、27は上記構成に加えて選択回路
2Dを有し、演算器群28は選択回路2Cを有する。
FIG. 3 is a view showing a second embodiment of the present invention. The arithmetic processing unit also has four arithmetic unit groups 25, 26, 27 and 2 that operate in parallel with 16-bit input data A0 to A15 as a group of continuous 4 bits.
8, and is divided. Each computing unit group includes four input selection circuits 21 and four computing units 22, and the computing unit group 2
5 and 28 further connect the four output selection circuits 23 to the computing unit group 2
6 and 27 each have four output selection circuits 24.
The operation unit groups 26 and 27 have a selection circuit 2D in addition to the above configuration, and the operation unit group 28 has a selection circuit 2C.

【0021】入力選択回路21は、図4(a)に示すよ
うに、インバータゲート211と選択回路とから成り
BS信号によって入力データの1ビットあるいはその
論理反転信号を選択して出力する。演算器22は、図4
(b)に示すように、2個の半加算器221、222か
ら成る。半加算器221は、アンドゲート2211とE
X−OR回路2212とから成り、半加算器222は、
アンドゲート2221とEX−OR回路2222とから
成る。半加算器221、222は、入力選択回路21の
出力と別々のキャリー信号を入力として演算を行い、演
算結果を出力する。なお、各演算器群において、最初の
ビットの演算器22は電源電位とアース電位とをキャリ
ー信号として入力すると共に2つのキャリー出力を発生
する。2番目以降のビットの演算器22は前位ビットの
演算器22の2つのキャリー出力を受け、次位ビットの
演算器22に2つのキャリー出力を与える。
The input selection circuit 21, as shown in FIG. 4 (a), consists of a inverter gate 211 and the selection circuit,
Select one bit or logical inversion signal thereof in the input data by A BS signal output. The arithmetic unit 22 is configured as shown in FIG.
As shown in (b), it is composed of two half adders 221 and 222. The half adder 221 includes an AND gate 2211 and E
An X-OR circuit 2212, and the half adder 222
It comprises an AND gate 2221 and an EX-OR circuit 2222. The half adders 221 and 222 perform an operation with the carry signal different from the output of the input selection circuit 21 as an input, and output the operation result. In each of the arithmetic unit groups, the arithmetic unit 22 of the first bit inputs the power supply potential and the ground potential as carry signals and generates two carry outputs. The arithmetic unit 22 for the second and subsequent bits receives two carry outputs from the arithmetic unit 22 for the leading bit, and provides two carry outputs to the arithmetic unit 22 for the next bit.

【0022】出力選択回路23は演算器22の出力を入
力とし、図4(c)に示すように、インバータゲート2
31と、入力データのMSBの論理反転とABS信号
の論理積をとるアンドゲート29(図3)の出力(以
下、制御信号と呼ぶ)によって出力を選択する回路とを
含む。なお、アンドゲート29からの制御信号は、演算
器群28内のすべての出力選択回路23に与えられる。
選択回路2Cは、図4(e)に示すように、演算器群2
8の最上位ビットの演算器22からの2本のキャリー信
号を入力とし、入力データのMSBの論理反転とABS
信号との論理積をとるアンドゲート29(図3)の制御
信号によって出力を選択し、上位演算器群に出力する。
The output selection circuit 23 receives the output of the arithmetic unit 22 as an input and, as shown in FIG.
31 and a circuit for selecting an output by an output (hereinafter, referred to as a control signal) of an AND gate 29 (FIG. 3) for performing a logical AND between the logical inversion of the MSB of the input data and the ABS signal . The control signal from the AND gate 29 is applied to all output selection circuits 23 in the arithmetic unit group 28.
The selection circuit 2C, as shown in FIG.
8 two carry signal from the arithmetic unit 22 of the most significant bit of an input, logic inversion and A BS of MSB of the input data
An output is selected by a control signal of an AND gate 29 (FIG. 3) which takes a logical product with a signal, and is output to a higher-order arithmetic unit group.

【0023】出力選択回路24は、図4(d)に示すよ
うに、インバータゲート241と下位演算器群のキャリ
ー信号(例えば、演算器群27の出力選択回路24の場
合、選択回路2Cの出力)によって選択を行う回路及び
入力データのMSBの論理反転とABS信号との論理積
をとるアンドゲート(図示せず)からの制御信号によっ
て出力を選択する回路とを含み、演算器22からの演算
結果を入力とし、2つの演算結果とそれらの一方を反転
した論理反転信号のうちのいずれか1つを選択して出力
する。選択回路2Dは、図4(f)に示すように、最上
位ビットの演算器22からの2本のキャリー信号を受
け、下位演算器群のキャリー信号によって選択を行う回
路と入力データのMSBの論理反転とABS信号との論
理積をとるアンドゲート29(図3)からの制御信号に
よって出力を選択する回路とを含み、上位演算器群にキ
ャリー出力を与える。
As shown in FIG. 4D, the output selection circuit 24 is provided with an inverter gate 241 and a carry signal of a group of lower-order operation units (for example, in the case of the output selection circuit 24 of the operation unit group 27, the output of the selection circuit 2C). ) by and a circuit for selecting the output by a control signal from the aND gate for taking a logical product of the logic inversion and the a BS signal MSB of the circuit and the input data to be selected (not shown), from the operator 22 The operation result is input, and one of the two operation results and a logically inverted signal obtained by inverting one of them is selected and output. As shown in FIG. 4 (f), the selection circuit 2D receives two carry signals from the arithmetic unit 22 of the most significant bit, performs selection by the carry signal of the lower arithmetic unit group, and the MSB of the input data. And a circuit for selecting an output by a control signal from an AND gate 29 (FIG. 3) for performing a logical product of the logical inversion and the ABS signal, and provides a carry output to a group of higher-order arithmetic units.

【0024】図1の出力選択回路13、14と同様に、
演算器群25、26、27においてはすべての出力選択
回路23、24に、前段の選択回路2D、2Cの出力が
与えられる。
As with the output selection circuits 13 and 14 in FIG.
In the arithmetic unit groups 25, 26, 27, the outputs of the preceding selection circuits 2D, 2C are given to all the output selection circuits 23, 24.

【0025】この演算処理装置により2の補数の絶対値
演算及びインクリメント演算を行うことができる。絶対
値演算を行う場合、入力の正負に関わらず入力選択回路
21において、入力データの論理反転を選択する。次
に、入力データが負の時は、入力データの論理反転に”
1”を加算して絶対値を求めることができるので、演算
器22において入力選択回路21にて求めた入力データ
の論理反転に”1”を加算した結果を、出力選択回路2
3において選択し(この場合、ABSは”1”、入力デ
ータMBSの論理反転は”0”となる)、出力選択回路
24においては、同様にして下位演算器群のキャリー出
力の値によって演算結果を選択することにより入力デー
タの絶対値を得ることができる。入力データが正の時
は、演算器22において入力データの論理反転に”0”
を加算した結果の論理反転を、出力選択回路23、24
において制御信号により選択することで入力データの絶
対値を得ることができる。
With this arithmetic processing unit, it is possible to perform an absolute value operation and an increment operation of two's complement. When performing the absolute value operation, the input selection circuit 21 selects the logical inversion of the input data regardless of whether the input is positive or negative. Next, when the input data is negative, the logic of the input data is inverted.
Since the absolute value can be obtained by adding “1”, the result obtained by adding “1” to the logical inversion of the input data obtained by the input selection circuit 21 in the arithmetic unit 22 is output to the output selection circuit 2.
3 (in this case, the ABS is "1" and the logical inversion of the input data MBS is "0"). In the output selection circuit 24, the operation result is similarly determined by the value of the carry output of the lower operation unit group. By selecting, the absolute value of the input data can be obtained. When the input data is positive, the arithmetic unit 22 inverts the logic of the input data to “0”.
Are added to the output selection circuits 23 and 24.
, The absolute value of the input data can be obtained by selecting with the control signal.

【0026】インクリメント演算を行う場合は、入力デ
ータの正負に関わらず入力選択回路21において入力デ
ータの値を選択する。演算器22は半加算器なので、入
力データに”1”を加算した値を出力選択回路23、2
4において選択すればインクリメント演算結果を得るこ
とができる。よって、第1の実施の形態と同様に入力デ
ータのMSBの値に関わらず演算を実行し、その演算結
果を入力データのMSBを用いて選択するので、演算開
始時間が入力データのMSBに依存することがなく実行
できる。
When performing the increment operation, the input selection circuit 21 selects the value of the input data regardless of whether the input data is positive or negative. Since the arithmetic unit 22 is a half adder, a value obtained by adding “1” to the input data is output to the output selection circuits 23 and 2.
If the selection is made in step 4, the result of the increment operation can be obtained. Therefore, as in the first embodiment, the operation is executed regardless of the value of the MSB of the input data, and the operation result is selected using the MSB of the input data. Therefore, the operation start time depends on the MSB of the input data. It can be performed without doing.

【0027】また、絶対値演算とインクリメント演算を
組み合わせた場合でも同様に演算できる。
The same operation can be performed even when the absolute value operation and the increment operation are combined.

【0028】[0028]

【発明の効果】以上説明したように本発明は、入力デー
タの論理反転を用いて演算を行い、演算実行後に最上位
ビットの値で演算結果を選択するので、最上位ビットの
値が確定していなくても演算を実行でき、演算の高速化
が図れる。
As described above, according to the present invention, the operation is performed using the logical inversion of the input data, and the operation result is selected based on the value of the most significant bit after the execution of the operation, so that the value of the most significant bit is determined. The operation can be executed even if the operation is not performed, and the operation can be speeded up.

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

【図1】本発明の第1の実施の形態の構成を示す回路図
である。
FIG. 1 is a circuit diagram showing a configuration of a first exemplary embodiment of the present invention.

【図2】図1に示された各部の具体的構成を示した図で
ある。
FIG. 2 is a diagram showing a specific configuration of each unit shown in FIG.

【図3】本発明の第2の実施の形態の構成を示す回路図
である。
FIG. 3 is a circuit diagram showing a configuration of a second exemplary embodiment of the present invention.

【図4】図3に示された各部の具体的構成を示した図で
ある。
FIG. 4 is a diagram showing a specific configuration of each unit shown in FIG. 3;

【図5】従来例の回路図を示す。FIG. 5 shows a circuit diagram of a conventional example.

【図6】図5に示された主要部の具体的構成を示した図
である。
FIG. 6 is a diagram showing a specific configuration of a main part shown in FIG. 5;

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

11 反転回路 21、31 入力選択回路 32 キャリー選択回路 12、22 演算器 33、121、122、221、222 半加算器 13、14、23、24、38 出力選択回路 1A、19、2C、2D、39 選択回路 15〜18、25〜28、34〜37 演算器群 11 Inverting circuit 21, 31 Input selecting circuit 32 Carry selecting circuit 12, 22 Operation unit 33, 121, 122, 221, 222 Half adder 13, 14, 23, 24, 38 Output selecting circuit 1A, 19, 2C, 2D, 39 selection circuits 15-18, 25-28, 34-37

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 N(Nは正の整数)ビットの入力データ
に対して連続した複数ビットを1群として並列動作する
複数の演算器群で分割構成されて2の補数演算を行う演
算処理装置において、 各演算器群は、 各ビット毎に入力データの論理反転データを求める反
手段と、 各ビット毎に前記論理反転データと下位演算器群からの
複数のキャリー信号とを入力として演算し、演算結果
該演算によるキャリー信号とを前記下位演算器群からの
各キャリー信号毎に出力する演算手段と、当該演算手段からの複数のキャリー信号のうち一つを、
前記入力データの最上位ビット及び前記連続した複数ビ
ットの最上位ビットの演算手段のキャリー出力のうち少
なくとも一方によって上位の演算器群へ選択して出力す
る選択手段と、最下位群にあっては前記入力データの最
上位ビット、残りの群にあっては前記入力データの最上
位ビットと下位の演算器群からのキャリー信号とによっ
てそれぞれ各ビット毎の演算結果を選択する複数の出力
選択手段とを有することを特徴とする演算処理装置。
1. An arithmetic processing device for performing a two's complement operation by dividing a plurality of N-bit (N is a positive integer) input data into a plurality of operation units that operate in parallel with a plurality of consecutive bits as one group in each arithmetic unit group includes a reversal unit that obtains a logical inversion data of the input data for each bit, and <br/> plurality of carry signal from the logic inversion data and lower group of computing units for each bit Is calculated as an input, and the calculation result and
And a carry signal obtained by the operation from the lower-order operation unit group.
And arithmetic means you output to each carry signal, one of a plurality of carry signals from the computing means,
The least significant bit of the most significant bit of the input data and the carry output of the arithmetic means of the most significant bit of the plurality of consecutive bits
At least one means for selecting and outputting to the higher-order arithmetic unit group, and the most significant bit of the input data in the least significant group, and the most significant bit of the input data in the remaining group. And a plurality of output selecting means for selecting an operation result for each bit according to a carry signal from a group of the operation units.
【請求項2】 請求項1記載の演算処理装置において、
前記演算手段は、2つのキャリー信号を入力として受
け、前記論理反転データと一方のキャリー信号とを入力
とする第1の半加算器と、前記論理反転データと他方の
キャリー信号とを入力とする第2の半加算器とから成る
ことを特徴とする演算処理装置。
2. The arithmetic processing device according to claim 1, wherein
The arithmetic means receives two carry signals as inputs, receives a first half adder that receives the logically inverted data and one of the carry signals as inputs, and receives the logically inverted data and the other carry signal as inputs. And a second half adder.
【請求項3】 N(Nは正の整数)ビットの入力データ
に対して連続した複数ビットを1群として並列動作する
複数の演算器群で分割構成されて2の補数演算を行う演
算処理装置において、 各演算器群は、 各ビット毎に”1”を示すABS信号に基づいて入力デ
タの論理反転データを選択データとして出力する入力
選択手段と、 各ビット毎に前記選択データと下位演算器群からの複数
のキャリー信号とを入力として演算し、演算結果と該演
算によるキャリー信号とを前記下位演算器群からの各キ
ャリー信号毎に出力する演算手段と、 当該演算手段からの複数のキャリー信号のうちの一つ
を、前記入力データの最上位ビットの論理反転データと
前記”1”を示すABS信号との論理積及び前記連続し
た複数ビットの最上位ビットの演算手段のキャリー出力
のうち少なくとも一方によって上位の演算器群へ選択し
て出力する選択手段と、 最下位群にあっては前記入力データの最上位ビットの論
理反転データと前記”1”を示すABS信号との論理
積、残りの群にあっては前記入力データの最上位ビット
の論理反転データと前記”1”を示すABS信号との論
理積と下位の演算器群からのキャリー信号とによってそ
れぞれ各ビット毎の演算結果を選択する複数の出力選択
手段とを有することを特徴とする演算処理装置。
3. An arithmetic processing unit for performing a two's complement operation by dividing a plurality of operation units operating in parallel as a group of a plurality of continuous bits for N (N is a positive integer) input data In the above, each of the arithmetic unit groups includes : an input selection unit that outputs logically inverted data of input data as selection data based on an ABS signal indicating “1” for each bit; Computing means for computing the selected data and a plurality of carry signals from the lower-order operation unit group as inputs, and outputting an operation result and a carry signal resulting from the operation for each carry signal from the lower-order operation unit group; Calculating one of the plurality of carry signals from the logical unit of the logically inverted data of the most significant bit of the input data and the ABS signal indicating "1" and calculating the most significant bit of the continuous plurality of bits; hand Selecting means for selecting and outputting to the higher-order arithmetic unit group by at least one of the carry outputs of the stages; and in the lowest-order group, the logically inverted data of the most significant bit of the input data and the ABS indicating "1" In the remaining group, the logical product of the logically inverted data of the most significant bit of the input data and the ABS signal indicating "1" and the carry signal from the lower-order arithmetic unit group, respectively. An arithmetic processing device comprising: a plurality of output selecting means for selecting an operation result for each bit.
【請求項4】 請求項3記載の演算処理装置において、
前記演算手段は、2つのキャリー信号を入力として受
け、前記選択データと一方のキャリー信号とを入力とす
る第1の半加算器と、前記選択データと他方のキャリー
信号とを入力とする第2の半加算器とから成ることを特
徴とする演算処理装置。
4. The arithmetic processing device according to claim 3, wherein
The arithmetic means receives two carry signals as inputs, a first half adder receiving the select data and one carry signal as inputs, and a second half adder receiving the select data and the other carry signal as inputs. And a half-adder.
JP8172218A 1996-07-02 1996-07-02 Arithmetic processing unit Expired - Lifetime JP2907276B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8172218A JP2907276B2 (en) 1996-07-02 1996-07-02 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8172218A JP2907276B2 (en) 1996-07-02 1996-07-02 Arithmetic processing unit

Publications (2)

Publication Number Publication Date
JPH1021054A JPH1021054A (en) 1998-01-23
JP2907276B2 true JP2907276B2 (en) 1999-06-21

Family

ID=15937790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8172218A Expired - Lifetime JP2907276B2 (en) 1996-07-02 1996-07-02 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP2907276B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
PT2439183E (en) 2010-10-06 2014-03-11 Ceramoss Gmbh Monolithic ceramic body with mixed oxide edge areas and metallic surface, method for producing same and use of same

Also Published As

Publication number Publication date
JPH1021054A (en) 1998-01-23

Similar Documents

Publication Publication Date Title
US4807172A (en) Variable shift-count bidirectional shift control circuit
JP3304971B2 (en) Absolute value calculation circuit
JP2585649B2 (en) Division circuit
EP0605885B1 (en) Method and apparatus for automatically designing logic circuit, and multiplier
JP2511527B2 (en) Floating point arithmetic unit
JP3537378B2 (en) Adders and integrated circuits
JP3356613B2 (en) Addition method and adder
JP2907276B2 (en) Arithmetic processing unit
US6151616A (en) Method and circuit for detecting overflow in operand multiplication
JPH0546363A (en) Divider
JPH10187416A (en) Floating point arithmetic unit
JPH0464091B2 (en)
JP3019796B2 (en) Multiplier
JPS62197868A (en) Linear approximation conversion circuit for pipeline construction
US5084835A (en) Method and apparatus for absolute value summation and subtraction
JP2705162B2 (en) Arithmetic processing unit
JP2991788B2 (en) Decoder
JP2606339B2 (en) Multiplier
JP3106525B2 (en) Addition method and its circuit
JP2532083B2 (en) Flag generation circuit
US6041341A (en) Method and circuit for adding operands of multiple size
JP3540136B2 (en) Data division parallel shifter
JPH10333885A (en) Multiplying circuit
JP2518973B2 (en) Adder with rounding function and multiplier using the same
JP3803653B2 (en) Multiplication processor

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990303