JPH04294420A - Divider - Google Patents

Divider

Info

Publication number
JPH04294420A
JPH04294420A JP5873091A JP5873091A JPH04294420A JP H04294420 A JPH04294420 A JP H04294420A JP 5873091 A JP5873091 A JP 5873091A JP 5873091 A JP5873091 A JP 5873091A JP H04294420 A JPH04294420 A JP H04294420A
Authority
JP
Japan
Prior art keywords
data
bit
dividend
divider
adder
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
JP5873091A
Other languages
Japanese (ja)
Inventor
Keiji Nakamura
圭治 中村
Yoshinari Kiko
木虎 義詞
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP5873091A priority Critical patent/JPH04294420A/en
Publication of JPH04294420A publication Critical patent/JPH04294420A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To offer a divider capable of shortening a dividing arithmetic time. CONSTITUTION:The divider constituted of connecting plural adders 12h, etc., each of which executes the adding arithmetic of data Y constituting a divisor, data X including the bit data of data constituting a dividend in each digit and carry data in parallel by the number of digits constituting each divisor and each dividend is characteristically provided with detection parts 14h, etc., for detecting that the added result data of the adding operation by the adders 12h, etc., are '0', the 1st selection parts 17g, etc., for selecting and sending either one of carry data and '0' data sent by the adders 12h, etc., based upon a control signal sent from the detection parts 14h, etc., and the 2nd selection parts 18 for selecting and sending either one of residual data and the '0' data sent by the adders 12h, etc., based upon the control signal sent by the detection parts 14h, etc.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、除算器に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a divider.

【0002】0002

【従来の技術】被除数A及び除数Bがともに例えば4ビ
ットから構成されている場合、従来の除算器は、以下の
ように構成される。図4に示すように除数Bと被除数A
を構成するビットデータが1ビットずつ4ビット加算器
10に供給されて演算を行うことより、4ビット加算器
10が4段に接続される。又、インバータ、ANDゲー
ト、ORゲートにて構成され、各4ビット加算器10に
おいて処理するビットデータにおける除算結果、キャリ
データ、被除数Aのビットデータが供給され、これらの
供給データを処理する処理回路11の出力側が、それぞ
れ次段の4ビット加算器10及び次段の処理回路11に
接続される。又、8ビットからなる被除数A及び除数B
を除算する除算器の構成を図5に示す。尚、12は8ビ
ット加算器、13は上述した処理回路11に相当する処
理回路である。
2. Description of the Related Art When both the dividend A and the divisor B are composed of, for example, 4 bits, a conventional divider is constructed as follows. As shown in Figure 4, divisor B and dividend A
The bit data constituting the 4-bit adder 10 is supplied bit by bit to the 4-bit adder 10 for calculation, so that the 4-bit adder 10 is connected in four stages. Further, a processing circuit is configured of an inverter, an AND gate, and an OR gate, and is supplied with the division result, carry data, and bit data of the dividend A in the bit data processed in each 4-bit adder 10, and processes these supplied data. The output sides of 11 are connected to the next-stage 4-bit adder 10 and the next-stage processing circuit 11, respectively. Also, dividend A and divisor B consisting of 8 bits
FIG. 5 shows the configuration of a divider that divides . Note that 12 is an 8-bit adder, and 13 is a processing circuit corresponding to the processing circuit 11 described above.

【0003】0003

【発明が解決しようとする課題】ところが従来の除算器
は以下のイないしハに示す問題点がある。 (イ)  除算演算の途中で割り切れても最後のビット
データまで除算演算を実行するため演算に長時間を要す
る。 (ロ)  被除数Aが除数Bより小さい場合でも最後の
ビットデータまで除算演算を実行するため演算に長時間
を要する。 (ハ)  除数Bが1である場合にも最後のビットデー
タまで除算演算を実行するため演算に長時間を要する。
However, the conventional divider has the following problems (A) to (C). (b) Even if the data is divisible in the middle of the division operation, the division operation is executed up to the last bit data, so the operation takes a long time. (b) Even when the dividend A is smaller than the divisor B, the division operation is executed up to the last bit data, so the operation takes a long time. (c) Even when the divisor B is 1, the division operation is executed up to the last bit data, so the operation takes a long time.

【0004】本発明はこのような問題点を解決するため
になされたもので、除算演算時間の短縮が図れる除算器
を提供することを目的とする。
The present invention has been made to solve these problems, and an object of the present invention is to provide a divider that can reduce the time required for division operations.

【課題を解決するための手段】本発明は、除数を構成す
るデータYと被除数を構成するデータのビットデータを
各桁毎に含むデータXとキャリーデータとの加算演算を
行う加算器が除数及び被除数の構成ビット数分複数段に
並列接続される構成を有する除算器において、上記加算
器における上記加算演算の加算結果データが0であるこ
とを検出する検出部と、上記加算器が送出するキャリー
データあるいは0のデータのどちらかを上記検出部が送
出する制御信号に基づき選択し送出する第1の選択部と
、上記加算器が送出する剰余データあるいは0のデータ
のどちらかを上記検出部が送出する制御信号に基づき選
択し送出する第2の選択部と、を備えたことを特徴とす
る。
[Means for Solving the Problems] The present invention provides an adder that performs an addition operation between data Y constituting a divisor, data X containing bit data of data constituting a dividend for each digit, and carry data. In a divider configured to be connected in parallel in multiple stages corresponding to the number of bits constituting the dividend, the divider includes a detection unit that detects that the addition result data of the addition operation in the adder is 0, and a carry that the adder sends out. a first selection section that selects and sends out data or 0 data based on a control signal sent out by the detection section; It is characterized by comprising a second selection section that selects and sends out the selection based on the control signal to be sent out.

【0005】[0005]

【作用】検出部は、被除数の最下位ビットデータを処理
する加算器以外の各段の加算器に接続され、これらの各
段毎における加算器の加算結果データが0であるか否か
を判断し、当該判断結果を制御信号として第1及び第2
の選択部に送出する。よって、被除数のある桁のビット
データを処理する加算器に接続される検出部にて加算結
果データが0と判断された場合、当該検出部は、0であ
る旨の制御信号を第1及び第2の選択部に送出する。第
1及び第2の選択部は当該選択信号に基づき、0のデー
タを選択、送出する。このように検出部、第1及び第2
の選択部は、除算演算途中で加算器における加算結果が
0となった場合には、被除数におけるその後の各桁にお
ける加算演算を行なわず、第1及び第2の選択部からは
0のデータが選択、送出されるように作用する。
[Operation] The detection unit is connected to each stage of the adder other than the adder that processes the least significant bit data of the dividend, and determines whether the addition result data of the adder at each stage is 0 or not. The judgment result is used as a control signal for the first and second
Send to the selection section. Therefore, when the detection unit connected to the adder that processes the bit data of a certain digit of the dividend determines that the addition result data is 0, the detection unit sends a control signal indicating that it is 0 to the first and It is sent to the second selection section. The first and second selection sections select and send out data of 0 based on the selection signal. In this way, the detection unit, the first and second
If the addition result in the adder becomes 0 during the division operation, the selection section does not perform addition operation on each subsequent digit of the dividend, and the 0 data is sent from the first and second selection sections. It acts to be selected and sent.

【0006】[0006]

【実施例】第1の実施例 本発明の除算器の構成の一実施例を示す図1において図
5と同じ構成部分については同じ符号を付している。従
来の除算器を構成する加算器と同様に、8段に接続され
た8ビット加算器12hないし12aのすべてには、そ
れぞれ除数Bを構成する8ビットのデータが供給され、
又、8ビットの被除数Aを構成する各ビットデータが最
上位ビットデータ側より順次8ビット加算器12h、1
2g  …  に供給され、一方、各8ビット加算器1
2の出力側は上述した処理回路13に接続される。
First Embodiment In FIG. 1 showing an embodiment of the structure of a divider according to the present invention, the same components as in FIG. 5 are designated by the same reference numerals. Similar to the adders constituting a conventional divider, all of the 8-bit adders 12h to 12a connected in eight stages are each supplied with 8-bit data constituting the divisor B.
Further, each bit data constituting the 8-bit dividend A is sequentially added to the 8-bit adders 12h and 1 from the most significant bit data side.
2g..., while each 8-bit adder 1
The output side of 2 is connected to the processing circuit 13 described above.

【0007】さらに本実施例の除算器では以下に説明す
る各構成部分が付加される。被除数Aの最上位ビットデ
ータが供給され除算結果データの最上位ビットデータQ
7を送出する8ビット加算器12hにおいて、除数Bに
相当する8ビットからなるデータYと、被除数Aのデー
タにおける最上位ビットデータを含む8ビットのデータ
Xと、キャリーデータとの加算結果であるZ0ないしZ
7の8ビットからなるデータをパラレルに送出する8本
の出力端子Zhは、ORゲート14hを介してインバー
タ16、NANDゲート15fないし15aの入力側に
接続される。同様に、被除数Aの最上位より2ビット目
のデータが供給され除算結果データの最上位から2ビッ
ト目のデータQ6を送出する8ビット加算器12gにお
いて、上記加算結果を送出する出力端子Zgは、ORゲ
ート14gを介してNANDゲート15fないし15a
の入力側に接続される。又、同様に被除数Aの最上位よ
り3ビット目のデータが供給され除算結果データの最上
位から3ビット目のデータQ5を送出する8ビット加算
器12fにおいて、上記加算結果を送出する出力端子Z
fは、ORゲート14fを介してNANDゲート15e
ないし15aの入力側に接続される。以下、8ビット加
算器12bまで同様に構成される。
Furthermore, the divider of this embodiment has additional components described below. The most significant bit data of the dividend A is supplied and the most significant bit data Q of the division result data
This is the result of addition of 8-bit data Y corresponding to divisor B, 8-bit data X including the most significant bit data of dividend A data, and carry data in the 8-bit adder 12h that sends Z0 or Z
Eight output terminals Zh that send out data consisting of 8 bits of 7 in parallel are connected to the input sides of an inverter 16 and NAND gates 15f and 15a via an OR gate 14h. Similarly, in the 8-bit adder 12g which is supplied with the second most significant bit of the dividend A and sends out the second most significant bit of data Q6 of the division result data, the output terminal Zg which sends out the addition result is , NAND gates 15f to 15a via OR gate 14g
connected to the input side of the Similarly, in the 8-bit adder 12f, which is supplied with data from the third most significant bit of the dividend A and sends out data Q5 from the third most significant bit of the division result data, an output terminal Z is used to send out the addition result.
f is connected to the NAND gate 15e via the OR gate 14f.
to the input side of 15a. Thereafter, the configuration is the same up to the 8-bit adder 12b.

【0008】被除数Aの最下位ビットデータが供給され
除算結果データの最下位ビットデータQ0を送出する8
ビット加算器12aにおいて、上記加算結果を送出する
出力端子Zaは、処理回路13を介してマルチプレクサ
18に接続される。マルチプレクサ18は、上記処理回
路13より供給される8ビットのデータと8ビットのす
べてのビットデータが0である0データとのどちらかの
データをNANDゲート15aの出力信号を制御信号と
して選択する回路であり、NANDゲート15aより1
のデータが供給された場合には上記0のデータを選択し
NANDゲート15aより0のデータが供給された場合
には上記処理回路13の出力データを選択する。尚、マ
ルチプレクサ18の出力データが除算演算における剰余
のデータとなる。
The least significant bit data of the dividend A is supplied and the least significant bit data Q0 of the division result data is sent out 8
In the bit adder 12a, an output terminal Za for sending out the addition result is connected to a multiplexer 18 via a processing circuit 13. The multiplexer 18 is a circuit that selects the output signal of the NAND gate 15a as a control signal between the 8-bit data supplied from the processing circuit 13 and the 0 data in which all 8 bits are 0. 1 from the NAND gate 15a.
When data of 0 is supplied from the NAND gate 15a, the data of 0 is selected, and when data of 0 is supplied from the NAND gate 15a, the output data of the processing circuit 13 is selected. Note that the output data of the multiplexer 18 becomes the remainder data in the division operation.

【0009】上記インバータ16の出力側は、8ビット
加算器12gのキャリーデータ、1ビットの0のデータ
が供給されるマルチプレクサ17gに接続される。マル
チプレクサ17gは、上記8ビット加算器12gから供
給されるキャリーデータと0のデータとのいずれかをイ
ンバータ16の出力信号を制御信号として選択する回路
であり、インバータ16の出力データが1であれば上記
0のデータを選択しインバータ16の出力データが0で
あれば上記キャリーデータを選択する。尚、マルチプレ
クサ17gの出力データは8ビットからなる商の最上位
より2ビット目のビットデータQ6となる。
The output side of the inverter 16 is connected to a multiplexer 17g to which carry data of an 8-bit adder 12g and 1-bit 0 data are supplied. The multiplexer 17g is a circuit that selects either carry data or 0 data supplied from the 8-bit adder 12g using the output signal of the inverter 16 as a control signal, and if the output data of the inverter 16 is 1, If the data of 0 is selected and the output data of the inverter 16 is 0, the carry data is selected. Note that the output data of the multiplexer 17g is bit data Q6 of the second most significant bit of the 8-bit quotient.

【0010】同様に、NANDゲート15fの出力側は
、8ビット加算器12fのキャリーデータ、1ビットの
0のデータが供給されるマルチプレクサ17fに接続さ
れる。マルチプレクサ17fも上記マルチプレクサ17
gと同様に、上記8ビット加算器12fから供給される
キャリーデータと0のデータとのいずれかをNANDゲ
ート15fの出力信号を制御信号として選択する回路で
あり、NANDゲート15fの出力データが1であれば
上記0のデータを選択しNANDゲート15fの出力デ
ータが0であれば上記キャリーデータを選択する。尚、
マルチプレクサ17fの出力データは8ビットからなる
商の最上位より3ビット目のビットデータQ5となる。
Similarly, the output side of the NAND gate 15f is connected to a multiplexer 17f to which carry data of the 8-bit adder 12f and 1-bit 0 data are supplied. The multiplexer 17f is also the multiplexer 17
Similarly to g, this circuit selects either carry data or 0 data supplied from the 8-bit adder 12f using the output signal of the NAND gate 15f as a control signal, and the output data of the NAND gate 15f is 1. If so, the 0 data is selected, and if the output data of the NAND gate 15f is 0, the carry data is selected. still,
The output data of the multiplexer 17f is bit data Q5 of the third most significant bit of the 8-bit quotient.

【0011】以下同様に、各マルチプレクサ17eない
し17aには、各8ビット加算器12eないし12aが
送出するキャリーデータと0のデータとが供給され、N
ANDゲート15eないし15aの出力データによりど
ちらかのデータが選択される。尚、マルチプレクサ17
aの出力データは商の最下位ビットデータQ0となる。 又、商の最上位ビットデータQ7は、8ビット加算器1
2hのキャリーデータである。
Similarly, each multiplexer 17e to 17a is supplied with carry data and 0 data sent out by each 8-bit adder 12e to 12a, and N
Either data is selected by the output data of AND gates 15e to 15a. In addition, multiplexer 17
The output data of a becomes the least significant bit data Q0 of the quotient. Also, the most significant bit data Q7 of the quotient is sent to the 8-bit adder 1.
This is 2h carry data.

【0012】このように構成される本除算器の動作を以
下に説明する。被除数Aの最上位ビットデータが供給さ
れて除算演算を実行した結果、この段階で割り切れた場
合、即ち、8ビット加算器12hにおいて、除数Bに相
当するデータYと被除数Aの最上位ビットデータを含む
データXとキャリーデータとの加算結果データ(以下デ
ータZと記す)の全ビットデータがすべて0である場合
、ORゲート14hは0のデータをインバータ16、N
ANDゲート15fないし15aに送出する。よって各
回路の論理動作によりインバータ16、NANDゲート
15fないし15aからは1のデータがマルチプレクサ
17gないし17a、及び18に送出され、マルチプレ
クサ17gないし17aは上述したように供給される0
のデータを選択し送出する。よって商のデータはデータ
Q6ないしデータQ0がすべて0となる。尚、商の最上
位ビットデータであるQ7として8ビット加算器12h
が送出するキャリーデータの最上位ビットデータが相当
する。 又、マルチプレクサ18は、NANDゲート15aが送
出する1のデータの制御信号により0のデータを選択し
送出するので、剰余データは0となる。
The operation of the present divider configured in this manner will be explained below. If the most significant bit data of the dividend A is supplied and the most significant bit data of the dividend A is divisible at this stage as a result of the division operation, that is, the 8-bit adder 12h combines the data Y corresponding to the divisor B and the most significant bit data of the dividend A. When all bit data of the addition result data (hereinafter referred to as data Z) of included data X and carry data are all 0, the OR gate 14h transfers the 0 data to the inverter 16
It is sent to AND gates 15f and 15a. Therefore, according to the logic operation of each circuit, data of 1 is sent from the inverter 16 and NAND gates 15f to 15a to the multiplexers 17g to 17a and 18, and the data of 0 is supplied to the multiplexers 17g to 17a as described above.
Select and send the data. Therefore, in the quotient data, data Q6 to data Q0 are all 0. In addition, the 8-bit adder 12h is used as Q7, which is the most significant bit data of the quotient.
This corresponds to the most significant bit data of the carry data sent by . Further, the multiplexer 18 selects and sends out data of 0 based on the control signal of data of 1 sent out by the NAND gate 15a, so the remainder data becomes 0.

【0013】同様に、被除数Aの最上位から2ビット目
のデータが供給され除算演算を実行した結果、この段階
で割り切れた場合、即ち、8ビット加算器12gにおい
て、データZの全ビットデータがすべて0であるとき、
ORゲート14gは0のデータをNANDゲート15f
ないし15aに送出する。よってNANDゲート15f
ないし15aからは1のデータがマルチプレクサ17f
ないし17aに送出され、マルチプレクサ17fないし
17aは供給される0のデータを選択し送出する。よっ
て商のデータはデータQ5ないしデータQ0がすべて0
となる。 又、データQ7は8ビット加算器12hが送出するキャ
リーデータの最上位ビットデータが相当する。一方、8
ビット加算器12hが送出するデータZが0でないこと
よりインバータ16が0のデータをマルチプレクサ17
gへ送出するのでマルチプレクサ18は8ビット加算器
12gの送出するキャリーデータの最上位ビットデータ
を選択し送出する。よってデータQ6は8ビット加算器
12gの送出するキャリーデータの最上位ビットデータ
となる。
Similarly, if the second bit of data from the most significant bit of the dividend A is supplied and the result of executing the division operation is divisible at this stage, that is, in the 8-bit adder 12g, all bits of data Z are When all are 0,
The OR gate 14g sends 0 data to the NAND gate 15f.
to 15a. Therefore, NAND gate 15f
1 data from 15a to multiplexer 17f
to 17a, and multiplexers 17f to 17a select the supplied 0 data and send it out. Therefore, in the quotient data, data Q5 or data Q0 are all 0.
becomes. Further, data Q7 corresponds to the most significant bit data of the carry data sent out by the 8-bit adder 12h. On the other hand, 8
Since the data Z sent out by the bit adder 12h is not 0, the inverter 16 transfers the 0 data to the multiplexer 17.
Therefore, the multiplexer 18 selects and sends out the most significant bit data of the carry data sent out by the 8-bit adder 12g. Therefore, data Q6 becomes the most significant bit data of the carry data sent out by the 8-bit adder 12g.

【0014】以下、各8ビット加算器12fないし12
bにてデータZが0となった場合も同様に動作する。こ
のように被除数Aを構成するビットデータを1ビットず
つ取り込み除算演算を実行していく段階で、ある位の上
記ビットデータにて8ビット加算器が送出するデータZ
が0になったとき、即ち、いわゆる割り切れたとき、未
発生の商と剰余を8ビット加算器を使用せずに発生させ
ることができ、除算時間を大幅に短縮することができる
Hereinafter, each 8-bit adder 12f to 12
The same operation occurs when the data Z becomes 0 at b. In this way, when the bit data constituting the dividend A is taken in one bit at a time and the division operation is executed, the data Z sent out by the 8-bit adder is
When becomes 0, that is, when it is so-called divisible, the ungenerated quotient and remainder can be generated without using an 8-bit adder, and the division time can be significantly shortened.

【0015】尚、8ビット加算器12aに至るまで割り
切れなかった場合には、従来の除算器と同様にマルチプ
レクサ17gないし17aが送出するデータにて商のデ
ータが構成され、マルチプレクサ18が送出するデータ
にて剰余のデータを構成する。
If it is not divisible up to the 8-bit adder 12a, the quotient data is made up of the data sent out by the multiplexers 17g to 17a, similar to the conventional divider, and the data sent out by the multiplexer 18 is Construct the remainder data.

【0016】第2の実施例 図2において、8ビット除算器20は図1に示す8ビッ
ト加算器12hないし12a及び各8ビット加算器の出
力側に接続される各処理回路13を包括的に示し、マル
チプレクサ21は図1に示すマルチプレクサ17gない
し17aを示している。尚、本実施例では図1に示すO
Rゲート14hないし14b、インバータ16、NAN
Dゲート15fないし15aにて構成される回路部分は
設けられていない。
Second Embodiment In FIG. 2, an 8-bit divider 20 comprehensively includes the 8-bit adders 12h to 12a shown in FIG. 1 and each processing circuit 13 connected to the output side of each 8-bit adder. 1, and the multiplexer 21 represents the multiplexers 17g to 17a shown in FIG. In this example, O shown in FIG.
R gate 14h or 14b, inverter 16, NAN
A circuit portion constituted by D gates 15f to 15a is not provided.

【0017】被除数A及び除数Bが供給される比較器2
3は、被除数Aと除数Bとの大小関係を判断し被除数A
より除数Bの方が大きい場合、即ち被除数A<除数Bの
場合に例えば1の信号を、除数Bより被除数Aの方が大
きい場合、即ち被除数A>除数Bの場合に0の信号をそ
れぞれマルチプレクサ21及びマルチプレクサ22に送
出する。
Comparator 2 supplied with dividend A and divisor B
3 determines the magnitude relationship between dividend A and divisor B and calculates dividend A.
When the divisor B is larger than the divisor B, that is, the dividend A<divisor B, a signal of 1 is sent to the multiplexer, and when the dividend A is larger than the divisor B, that is, when the dividend A>the divisor B, a signal of 0 is sent to the multiplexer. 21 and multiplexer 22.

【0018】マルチプレクサ21には、第1の実施例と
同様に8ビット除算器20を構成する各8ビット加算器
のキャリーデータ出力端子が接続され、当該8ビット加
算器よりキャリーデータが供給され、又、0のデータが
供給される。このようなマルチプレクサ21は、上述し
た比較器23の送出する1の制御信号が供給されること
で0のデータを選択し送出し、一方0の制御信号が供給
された場合には上記キャリーデータを選択し送出する。
Similar to the first embodiment, the multiplexer 21 is connected to the carry data output terminal of each 8-bit adder forming the 8-bit divider 20, and carry data is supplied from the 8-bit adder. Also, data of 0 is supplied. Such a multiplexer 21 selects and sends out data of 0 when supplied with the control signal of 1 sent out by the comparator 23 described above, and on the other hand, when the control signal of 0 is supplied, it selects and sends out the carry data. Select and send.

【0019】マルチプレクサ22には、第1の実施例に
示したマルチプレクサ18と同様に8ビット除算器20
より剰余データが供給され、又、被除数Aのデータが供
給され、上述した比較器23の送出する1の制御信号が
供給されることで被除数Aのデータを選択し送出し、一
方0の制御信号が供給された場合には上記剰余データを
選択し送出する。
The multiplexer 22 includes an 8-bit divider 20 similar to the multiplexer 18 shown in the first embodiment.
The remainder data is supplied, and the data of the dividend A is supplied, and the control signal of 1 sent from the above-mentioned comparator 23 is supplied, so that the data of the dividend A is selected and sent, while the control signal of 0 is supplied. is supplied, the above-mentioned surplus data is selected and sent.

【0020】このように構成される除算器においては、
被除数A及び除数Bのデータが8ビット除算器20に供
給されると同時に比較器23にも供給され、比較器23
にてその大小関係が比較され、被除数A<除数Bであれ
ば比較器23の送出する制御信号によりマルチプレクサ
21は0のデータを送出するので、商の値は強制的に0
とすることができる。又、マルチプレクサ22は上記制
御信号により被除数Aを選択し送出することより剰余デ
ータは強制的に被除数Aの値とすることができる。この
ように本実施例の除算器では、被除数A<除数Bであれ
ば除算演算開始と同時に商及び剰余を発生するので、被
除数Aを構成するすべてのビットについて演算を行う必
要がなく、除算演算時間を大幅に短縮することができる
In the divider configured in this way,
The data of the dividend A and the divisor B are supplied to the 8-bit divider 20 and simultaneously supplied to the comparator 23.
The magnitude relationship between them is compared at
It can be done. Furthermore, the multiplexer 22 selects and sends out the dividend A based on the control signal, so that the remainder data can be forcibly set to the value of the dividend A. In this way, in the divider of this embodiment, if dividend A<divisor B, the quotient and remainder are generated at the same time as the division operation starts, so there is no need to perform operations on all the bits that make up the dividend The time can be significantly reduced.

【0021】第3の実施例 図3において、8ビット除算器20は図1に示す8ビッ
ト加算器12hないし12a及び各8ビット加算器の出
力側に接続される各処理回路13を包括的に示し、本実
施例では図1に示すORゲート14hないし14b、イ
ンバータ16、NANDゲート15fないし15aにて
構成される回路部分は設けられていない。又、マルチプ
レクサ24は、図1に示すように8ビット除算器20を
構成する各8ビット加算器が送出するキャリーデータの
最上位ビットデータがそれぞれ供給され、又、被除数A
のビットデータがそれぞれ供給される各マルチプレクサ
を総括的に示している。マルチプレクサ25には、図1
に示すマルチプレクサ18と同様に8ビット除算器20
を構成する8ビット加算器12aに接続される処理回路
13の出力信号が供給され、又、8ビットからなる0の
データが供給される。
Third Embodiment In FIG. 3, an 8-bit divider 20 comprehensively includes the 8-bit adders 12h to 12a shown in FIG. 1 and each processing circuit 13 connected to the output side of each 8-bit adder. In this embodiment, the circuit portion constituted by the OR gates 14h to 14b, the inverter 16, and the NAND gates 15f to 15a shown in FIG. 1 is not provided. Further, as shown in FIG. 1, the multiplexer 24 is supplied with the most significant bit data of the carry data sent out by each 8-bit adder constituting the 8-bit divider 20, and is also supplied with the most significant bit data of the carry data sent out by each 8-bit adder constituting the 8-bit divider 20.
The diagram generally shows each multiplexer to which bit data of is supplied. The multiplexer 25 includes
An 8-bit divider 20 similar to the multiplexer 18 shown in FIG.
An output signal from a processing circuit 13 connected to an 8-bit adder 12a constituting the 8-bit adder 12a is supplied, and 0 data consisting of 8 bits is also supplied.

【0022】本実施例において、除数Bを構成するデー
タの内、最下位ビットデータを除いた7ビットのデータ
が供給されるNOR回路26の出力側はNANDゲート
27に接続される。又、NANDゲート27の入力側に
は除数Bの最下位ビットデータが供給され、NANDゲ
ート27はこれらの供給される信号の論理動作により制
御信号を発生し、該制御信号をマルチプレクサ24及び
25へ送出する。
In this embodiment, the output side of the NOR circuit 26 to which 7-bit data excluding the least significant bit data of the data constituting the divisor B is supplied is connected to a NAND gate 27. Further, the least significant bit data of the divisor B is supplied to the input side of the NAND gate 27, and the NAND gate 27 generates a control signal by the logical operation of these supplied signals, and sends the control signal to the multiplexers 24 and 25. Send.

【0023】マルチプレクサ24は、NANDゲート2
7から0のデータの制御信号が供給されることにより被
除数Aのデータを選択し送出し、NANDゲート27よ
り1のデータの制御信号が供給されることにより8ビッ
ト除算器20が送出するキャリーデータを選択し送出す
る。マルチプレクサ25は、NANDゲート27より0
のデータの制御信号が供給されることにより0のデータ
を選択し送出し、NANDゲート27より1のデータの
制御信号が供給されることにより8ビット除算器20が
送出する剰余のデータを選択し送出する。
[0023] The multiplexer 24 has a NAND gate 2
Carry data is selected and sent by the 8-bit divider 20 when the control signal for the data from 7 to 0 is supplied, and the data of dividend A is selected and sent, and when the control signal for the data from 1 is supplied from the NAND gate 27. Select and send. The multiplexer 25 outputs 0 from the NAND gate 27.
The 8-bit divider 20 selects and sends out the data of 0 when the control signal of the data is supplied, and the 8-bit divider 20 selects the remainder data to send when the control signal of the data of 1 is supplied from the NAND gate 27. Send.

【0024】8ビット除算器20には上述した各実施例
と同様に被除数A及び除数Bが供給される。このように
構成される本実施例の除算器では、除数Bの値が1であ
る場合にはNANDゲート27より0のデータの制御信
号が送出されるので、マルチプレクサ24は被除数Aの
値を送出し、マルチプレクサ25は0のデータを選択し
送出する。マルチプレクサ24が送出する被除数Aの値
は除算演算における商の値であり、マルチプレクサ25
が送出する0の値は除算演算における剰余の値である。 このように、除数Bの値が1であれば、8ビット除算器
20にて除算演算を行う前に商及び剰余を発生させるこ
とができ、除算演算時間を大幅に短縮することができる
The 8-bit divider 20 is supplied with a dividend A and a divisor B in the same manner as in each of the embodiments described above. In the divider of this embodiment configured as described above, when the value of the divisor B is 1, the NAND gate 27 sends out a control signal of 0 data, so the multiplexer 24 sends out the value of the dividend A. Then, the multiplexer 25 selects and sends out data of 0. The value of the dividend A sent out by the multiplexer 24 is the quotient value in the division operation, and the value of the dividend A sent out by the multiplexer 25
The value of 0 sent out by is the remainder value in the division operation. In this way, if the value of the divisor B is 1, the quotient and remainder can be generated before the 8-bit divider 20 performs the division operation, and the time required for the division operation can be significantly shortened.

【0025】尚、上述した各実施例における説明では被
除数A及び除数Bは8ビットとしたが、勿論これに限る
ものではなく任意のビット数にてなるデータであっても
各実施例に示す構成部分をビット数に応じて変更するこ
とで対応することができる。又、上記第2及び第3の実
施例に示す構成部分を有する除算器においても上述した
ように除算演算時間を短縮する効果を奏するが、上記第
2及び第3の実施例に示した比較器23並びにNORゲ
ート26及びNANDゲート27の構成部分のどちらか
一方を第1の実施例に示す除算器に付加した除算器が好
ましく、さらに上記構成部分の両者を第1の実施例に示
す除算器に付加した除算器が最も好ましく、除算演算を
最も高速に処理することができる。
In the explanation of each of the above embodiments, the dividend A and the divisor B are 8 bits, but this is of course not limiting, and data having any number of bits can be used in the configuration shown in each embodiment. This can be done by changing the part according to the number of bits. In addition, the divider having the components shown in the second and third embodiments also has the effect of shortening the division operation time as described above, but the comparator shown in the second and third embodiments 23, NOR gate 26, and NAND gate 27 are preferably added to the divider shown in the first embodiment, and furthermore, both of the above components are added to the divider shown in the first embodiment. A divider added to the .

【0026】[0026]

【発明の効果】以上詳述したように本発明によれば、除
算演算途中で割り切れた場合には被除数の残りのビット
データにおける除算演算は行わず、上記残りのビットデ
ータによる除算演算にて発生するであろう、商である0
の値を強制的に発生し、かつ剰余の値として発生するで
あろう、0の値を強制的に発生するので、除算演算時間
を短縮することができる。さらに、被除数より除数の方
が大きい場合には除算演算を実行せず、強制的に商を0
とし、かつ剰余データを被除数とするように構成し、あ
るいはさらに除数が1である場合には除算演算を実行せ
ず、商を強制的に被除数とし、剰余を強制的に0とする
ように構成することで、より除算演算時間を短縮するこ
とができる。
Effects of the Invention As detailed above, according to the present invention, if the division is divisible in the middle of the division operation, the division operation is not performed on the remaining bit data of the dividend, and the division operation is performed on the remaining bit data. will be, the quotient is 0
Since the value of 0 is forcibly generated and the value of 0, which would be generated as the remainder value, is forcibly generated, the time required for the division operation can be shortened. Furthermore, if the divisor is larger than the dividend, the division operation is not performed and the quotient is forced to 0.
and the remainder data is the dividend, or if the divisor is 1, the division operation is not executed, the quotient is forced to be the dividend, and the remainder is forced to be 0. By doing so, the division operation time can be further reduced.

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

【図1】  本発明の除算器の第1の実施例における構
成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a first embodiment of a divider according to the present invention.

【図2】  本発明の除算器の第2の実施例における構
成を示すブロック図である。
FIG. 2 is a block diagram showing the configuration of a second embodiment of the divider of the present invention.

【図3】  本発明の除算器の第3の実施例における構
成を示すブロック図である。
FIG. 3 is a block diagram showing the configuration of a third embodiment of the divider of the present invention.

【図4】  従来の除算器の構成を示すブロック図であ
る。
FIG. 4 is a block diagram showing the configuration of a conventional divider.

【図5】  8ビットのデータの除算演算を行う従来の
除算器の構成を示すブロック図である。
FIG. 5 is a block diagram showing the configuration of a conventional divider that performs a division operation on 8-bit data.

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

14bないし14h…ORゲート、15aないし15f
…NANDゲート、16…インバータ、17aないし1
7g…マルチプレクサ、23…比較器、26…NORゲ
ート、27…NANDゲート。
14b to 14h...OR gate, 15a to 15f
...NAND gate, 16...Inverter, 17a to 1
7g...Multiplexer, 23...Comparator, 26...NOR gate, 27...NAND gate.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】  除数を構成するデータYと被除数を構
成するデータのビットデータを各桁毎に含むデータXと
キャリーデータとの加算演算を行う加算器が除数及び被
除数の構成ビット数分複数段に並列接続される構成を有
する除算器において、上記加算器における上記加算演算
の加算結果データが0であることを検出する検出部と、
上記加算器が送出するキャリーデータあるいは0のデー
タのどちらかを上記検出部が送出する制御信号に基づき
選択し送出する第1の選択部と、上記加算器が送出する
剰余データあるいは0のデータのどちらかを上記検出部
が送出する制御信号に基づき選択し送出する第2の選択
部と、を備えたことを特徴とする除算器。
Claim 1: An adder that performs an addition operation between data Y constituting the divisor and data X containing bit data of the data constituting the dividend for each digit and carry data has multiple stages corresponding to the number of bits constituting the divisor and dividend. In the divider configured to be connected in parallel to the divider, a detection unit detects that the addition result data of the addition operation in the adder is 0;
a first selection section that selects and sends either carry data or 0 data sent out by the adder based on a control signal sent out by the detection section; A divider comprising: a second selection section that selects and sends out either one based on the control signal sent out by the detection section.
【請求項2】  被除数と除数との大小関係を判断する
比較器と、上記加算器が送出するキャリーデータあるい
は0のデータのどちらかを上記比較器が送出する制御信
号に基づき選択し送出する第3の選択部と、上記加算器
が送出する剰余データあるいは被除数データのどちらか
を上記比較器が送出する制御信号に基づき選択し送出す
る第4の選択部と、を備えた請求項1記載の除算器。
2. A comparator for determining the magnitude relationship between the dividend and the divisor, and a comparator for selecting and transmitting either carry data or 0 data transmitted by the adder based on a control signal transmitted by the comparator. 3. A fourth selection section that selects and sends out either the remainder data or the dividend data sent out by the adder based on the control signal sent out by the comparator. Divider.
【請求項3】  除数が1であることを検出する1検出
器と、上記加算器が送出するキャリーデータあるいは被
除数データのどちらかを上記1検出器が送出する制御信
号に基づき選択し送出する第5の選択部と、上記加算器
が送出する剰余データあるいは0のデータのどちらかを
上記1検出器が送出する制御信号に基づき選択し送出す
る第6の選択部と、を備えた請求項1記載の除算器。
3. A detector for detecting that the divisor is 1, and a detector for selecting and transmitting either carry data or dividend data transmitted by the adder based on a control signal transmitted by the first detector. 5. A sixth selection section that selects and sends out either the remainder data sent out by the adder or the 0 data based on the control signal sent out by the one detector. Divider listed.
JP5873091A 1991-03-22 1991-03-22 Divider Pending JPH04294420A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5873091A JPH04294420A (en) 1991-03-22 1991-03-22 Divider

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5873091A JPH04294420A (en) 1991-03-22 1991-03-22 Divider

Publications (1)

Publication Number Publication Date
JPH04294420A true JPH04294420A (en) 1992-10-19

Family

ID=13092623

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5873091A Pending JPH04294420A (en) 1991-03-22 1991-03-22 Divider

Country Status (1)

Country Link
JP (1) JPH04294420A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008003663A (en) * 2006-06-20 2008-01-10 Nec Electronics Corp Data processor and processing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008003663A (en) * 2006-06-20 2008-01-10 Nec Electronics Corp Data processor and processing method

Similar Documents

Publication Publication Date Title
US4707800A (en) Adder/substractor for variable length numbers
US3993891A (en) High speed parallel digital adder employing conditional and look-ahead approaches
US4525797A (en) N-bit carry select adder circuit having only one full adder per bit
US6301600B1 (en) Method and apparatus for dynamic partitionable saturating adder/subtractor
JP2983542B2 (en) Processing speed-up device
JPS6135590B2 (en)
US4172288A (en) Binary or BCD adder with precorrected result
US5134579A (en) Digital adder circuit
US4110831A (en) Method and means for tracking digit significance in arithmetic operations executed on decimal computers
US5325321A (en) High speed parallel multiplication circuit having a reduced number of gate stages
US4319335A (en) Arithmetic logic unit controller
US5204832A (en) Addition apparatus having round-off function
JP3537378B2 (en) Adders and integrated circuits
JPH04294420A (en) Divider
JPS608933A (en) Arithmetic processing unit
JPH0149973B2 (en)
JP2991788B2 (en) Decoder
JPS6152493B2 (en)
GB2215496A (en) Multi-stage parallel binary adders and/or subtractors
JP2575969B2 (en) Floating point multiplier / divider
US6301597B1 (en) Method and apparatus for saturation in an N-NARY adder/subtractor
US6272514B1 (en) Method and apparatus for interruption of carry propagation on partition boundaries
JP2617591B2 (en) Serial operation circuit
JPS62154029A (en) Multiplier circuit
JP3528334B2 (en) Data select circuit