JPH0142412B2 - - Google Patents

Info

Publication number
JPH0142412B2
JPH0142412B2 JP8207983A JP8207983A JPH0142412B2 JP H0142412 B2 JPH0142412 B2 JP H0142412B2 JP 8207983 A JP8207983 A JP 8207983A JP 8207983 A JP8207983 A JP 8207983A JP H0142412 B2 JPH0142412 B2 JP H0142412B2
Authority
JP
Japan
Prior art keywords
input
data
transmission signal
circuit
zero transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP8207983A
Other languages
Japanese (ja)
Other versions
JPS59206942A (en
Inventor
Akira Kuwata
Tosha Takahashi
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 JP8207983A priority Critical patent/JPS59206942A/en
Publication of JPS59206942A publication Critical patent/JPS59206942A/en
Publication of JPH0142412B2 publication Critical patent/JPH0142412B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/74Selecting or encoding within a word the position of one or more bits having a specified value, e.g. most or least significant one or zero detection, priority encoders

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Description

【発明の詳細な説明】 本発明は入力するデータの最上位ビツトも含め
て最上位ビツトに一番近い“1”を検出する先行
壱検出回路に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a preceding one detection circuit that detects the "1" closest to the most significant bit of input data, including the most significant bit.

一般に、演算装置において浮動小数点を扱う場
合、有効桁数を最大限に拡張するために、正規化
処理と呼ぶ処理を行うが、この処理を行うために
は最上位ビツト(以下MSBと記す)を含めて
MSBに一番近い“1”を検出することが必要で
ある。
Generally, when handling floating point numbers in an arithmetic unit, a process called normalization processing is performed in order to maximize the number of significant digits. Including
It is necessary to detect the "1" closest to the MSB.

まず、二進浮動小数点演算の正規化処理につい
て説明する。通常、二進浮動小数点のフオーマツ
トは、第1図に示すように、指数部と仮数部とに
分かれる。式で表わせば、データをN、仮数を
m、指数をeとするとき、下記のようになる; N=m・2e 正規化とは、与えられたフオーマツト内で有効
桁数を最大限に拡張するためのもので、仮数の
MSBが“1”になるように仮数全体を左シフト
することである。以下正規化されたフオーマツト
を正規数と呼ぶことにする。次に例をあげて正規
数を説明する。今、0.00101×26というデータが
あつたとすると、この値は (1) 0.00101×26 (2) 0.01010×25 (3) 1.01000×23 などのように幾通りにも表わせるが、ここでいう
正規数とは、(3)で示されるようにMSBが“1”
になるよう仮数全体を左シフトしたものである。
First, normalization processing for binary floating point arithmetic will be explained. Normally, a binary floating point format is divided into an exponent part and a mantissa part, as shown in FIG. Expressed as a formula, where N is the data, m is the mantissa, and e is the exponent, it is as follows; N=m・2 eNormalization means maximizing the number of significant digits within a given format. This is for expanding the mantissa.
The entire mantissa is shifted to the left so that the MSB becomes "1". Hereinafter, the normalized format will be referred to as a normal number. Next, we will explain normal numbers using an example. Now, if we have the data 0.00101×2 6 , this value can be expressed in many ways such as (1) 0.00101×2 6 (2) 0.01010×2 5 (3) 1.01000×2 3 , but here A normal number means that the MSB is “1” as shown in (3).
The entire mantissa is shifted to the left so that

次に、浮動小数点演算のうち、減算を例に一連
の処理について説明する。説明を簡単にするため
に、仮数部6ビツト、指数部3ビツトとして、A
=1.00001×24(=16.5)なるデータからB=
1.11110×23(=15.5)なるデータを減算する例に
ついてその処理過程を説明する。
Next, a series of floating point operations will be described using subtraction as an example. To simplify the explanation, assume that the mantissa part is 6 bits and the exponent part is 3 bits.
From the data =1.00001×2 4 (=16.5), B=
The processing process will be explained for an example of subtracting data 1.11110×2 3 (=15.5).

(1) 桁合せ AとBの大小関係を比較し、小さい方である
Bの指数をAの指数と同じにする。その結果B
の仮数が右に1ビツトだけシフトする。
(1) Digit alignment Compare the magnitude relationship between A and B, and set the index of B, which is the smaller one, to be the same as the index of A. The result B
The mantissa of is shifted one bit to the right.

B=1.11110×23→0.11111×104 (2) 減算 AとBの仮数での減算を実行する。 B=1.11110×2 3 →0.11111×10 4 (2) Subtraction Execute subtraction of the mantissas of A and B.

(Aの仮数)−(Bの仮数) =1.00001−0.11111=0.00010 (3) 演算結果の正規化 演算結果の0.00010×24を正規数にするため、
先行壱を検出し、その前にある“0”のビツト
数分だけ(この場合は4ビツト)左シフトす
る。この時、指数の値は4−4=0となり、正
規化された値は1.00000×20(=1.0)となる。
(Mantissa of A) - (Mantissa of B) = 1.00001 - 0.11111 = 0.00010 (3) Normalization of the calculation result To make the calculation result 0.00010 x 2 4 a normal number,
The leading number 1 is detected and shifted to the left by the number of "0" bits before it (4 bits in this case). At this time, the value of the index becomes 4-4=0, and the normalized value becomes 1.00000×2 0 (=1.0).

浮動小数点演算において、上述した演算結果の
正規化過程は必要不可欠なものであり、浮動小数
点演算全体に占るその比重も大きい。
In floating point arithmetic operations, the above-described normalization process of the arithmetic results is essential, and it plays a large role in the overall floating point arithmetic operations.

正規化のための左シフトする方法としては、1
ビツト左シフト機能を有したハードウエアを用い
て、仮数のMSBが“1”になるかどうかをチエ
ツクしながら、繰り返し左シフトするものが考え
られる。しかし、この方法では仮数のMSBより
連続する“0”のビツト数分だけ実際にMSBの
チエツクとシフト動作が必要となり、“0”の数
が多くなる程正規化に要する時間が長くなつてし
まう。従つて、他の前処理や演算処理が高速に実
行可能であつても正規化に要する時間が多い場合
は、全体的な浮動小数点演算速度を著しく低下さ
せてしまうという欠点がある。
As a left shift method for normalization, 1
It is conceivable to use hardware with a bit left shift function to repeatedly shift left while checking whether the MSB of the mantissa becomes "1". However, with this method, it is necessary to actually check and shift the MSB by the number of consecutive "0" bits from the MSB of the mantissa, and the more "0" there are, the longer the time required for normalization becomes. . Therefore, even if other preprocessing and arithmetic processing can be executed at high speed, if normalization requires a large amount of time, there is a drawback that the overall floating point arithmetic speed will be significantly reduced.

本発明は上記欠点を除き、比較的少ないハード
ウエアで、データの最上位ビツトも含めて最上位
ビツトに一番近い“1”を高速に検出するための
先行壱検出回路を提供するものである。
The present invention eliminates the above-mentioned drawbacks and provides a preceding one detection circuit for quickly detecting the "1" closest to the most significant bit, including the most significant bit of data, using relatively little hardware. .

本発明は、入力するデータの最上位ビツトも含
めて最上位ビツトに一番近い“1”を検出する先
行壱検出回路において、前記データの各ビツトに
対応して各ビツト情報が“0”ならば上位からの
零伝達信号を下位へ伝え、前記ビツト情報が
“1”ならば下位へ伝えない手段と、前記零伝達
信号がアクテイブでありかつ前記ビツト情報が
“1”である状態を検出する手段とを有する論理
ブロツクを各ビツトに対応して前記データのビツ
ト数分設けたことを特徴とする。
The present invention provides a first detection circuit that detects the "1" closest to the most significant bit of input data including the most significant bit, and detects if each bit information is "0" corresponding to each bit of the data. means for transmitting a zero transmission signal from an upper level to a lower level and not transmitting it to a lower level if the bit information is "1"; and detecting a state in which the zero transmission signal is active and the bit information is "1". The present invention is characterized in that as many logic blocks as the number of bits of the data are provided corresponding to each bit.

次に、本発明の実施例について図面を用いて説
明する。
Next, embodiments of the present invention will be described using the drawings.

第2図は本発明の第1の実施例の回路図であ
る。
FIG. 2 is a circuit diagram of a first embodiment of the present invention.

今、扱うデータとして、16ビツト長のレジスタ
1に格納されていて、レジスタ1のMSBを含め
て、MSBに一番近い“1”を検出する先行壱検
出回路2の入力を各ビツトに対し、それぞれ、デ
ータD15,D14,…,D0とする。D15〜D1をそれぞ
れ入力とする15個の論理ブロツクA15〜A1は構造
がすべて同じであり、各論理ブロツク同志は零伝
達信号線により接続されている。
The data to be handled now is stored in register 1 with a length of 16 bits, and for each bit, including the MSB of register 1, the input of the preceding one detection circuit 2 which detects the "1" closest to the MSB is as follows. Let data be D 15 , D 14 , ..., D 0 , respectively. The 15 logic blocks A 15 -A 1 each having inputs D 15 -D 1 have the same structure, and each logic block is connected by a zero transmission signal line.

D15を入力とする論理ブロツクA15の構成と動
作について説明する。入力データD15は、インバ
ータ11と2入力AND回路12の入力信号であ
り、次段の論理ブロツクA14への零伝達信号T14
を強制的に“0”にするかどうかのゲート13の
制御信号としても働く。インバータ11の出力信
号は次段のブロツクA14へ零伝達信号T15を伝え
るかどうかのゲート14の制御信号として働く。
2入力AND回路12はデータD15と前段からの零
伝達信号T15を入力し、その論理積を出力するも
のである。以降論理ブロツクA14〜A1までは零伝
達信号T14〜T1に入力データがD14〜D1に変わる
だけでその構造は全く同じである。最終論理ブロ
ツクA0は、伝達信号T0と入力データD0を入力と
する2入力AND回路15だけから成つている。
The configuration and operation of logic block A15 which receives D15 as input will be explained. The input data D 15 is an input signal of the inverter 11 and the two-input AND circuit 12, and is a zero transmission signal T 14 to the next stage logic block A 14 .
It also serves as a control signal for the gate 13 to determine whether or not to forcibly set it to "0". The output signal of the inverter 11 serves as a control signal for the gate 14 , which determines whether or not to transmit the zero transfer signal T15 to the next stage block A14.
The two-input AND circuit 12 inputs the data D 15 and the zero transmission signal T 15 from the previous stage, and outputs the logical product thereof. Thereafter, the structure of logic blocks A14 to A1 is exactly the same except that the input data is changed to zero transmission signals T14 to T1 and D14 to D1 . The final logic block A0 consists only of a two-input AND circuit 15 which receives the transmission signal T0 and the input data D0 .

次に、論理ブロツクA15の動作について説明す
る。零伝達信号T15が“0”のときは、2入力
AND回路12の出力データ線S15は“0”とな
り、入力データD15が“0”ならばインバータ1
1を通してゲート14がオンとなり、次段の論理
ブロツクA14への零伝達信号T14を“0”のまま
伝える。一方、入力データD15が“1”ならばゲ
ート13がオンとなり、次段の論理ブロツクA14
への零伝達信号T14を強制的に“0”にして伝え
る。その結果零伝達信号T15が“0”で入力され
た場合は、入力データD15〜D0の値に無関係に出
力データ線S15〜S0は“0”となる。次に零伝達
信号T15が論理ブロツクA15に“1”で入力され
た時は、入力データが“0”の場合インバータ1
1を通してゲート14がオンとなり、次段の論理
ブロツクA14への零伝達信号T14を“1”のまま
伝える。このとき、2入力AND回路12の出力
データ線S15は“0”である。入力データD15
“1”の場合、2入力AND回路12の出力データ
線S15は“1”となり、同時にゲート13がオン
となり、次段の論理ブロツクA14への零伝達信号
T14を強制的に“0”にする。前述のように零伝
達信号T15が“0”で入力されるとそれ以降の論
理ブロツクの出力データ線の値は“0”となる。
すなわち、零伝達信号T15が“1”で入力された
場合は、入力データの値が“1”となるまで出力
データ線の値を“0”にして次段の論理ブロツク
へ零伝達信号を“1”のまま伝え、入力データの
値が“1”となる論理ブロツクでその出力データ
線の値を“1”にするとともに次段の論理ブロツ
クへの零伝達信号を“0”にして、以降の論理ブ
ロツクの出力データ線の値を“0”にする。
Next, the operation of logic block A15 will be explained. When zero transmission signal T 15 is “0”, 2 inputs
The output data line S15 of the AND circuit 12 becomes "0", and if the input data D15 is "0", the inverter 1
1, the gate 14 is turned on and transmits the zero transmission signal T14 to the next stage logic block A14 as "0". On the other hand, if the input data D 15 is "1", the gate 13 is turned on, and the next stage logic block A 14
The zero transmission signal T14 is forcibly set to "0" and transmitted. As a result, when the zero transmission signal T15 is input as "0", the output data lines S15 - S0 become "0" regardless of the values of the input data D15 - D0 . Next, when the zero transmission signal T 15 is input as “1” to the logic block A 15 , if the input data is “0”, the inverter 1
1, the gate 14 is turned on and transmits the zero transmission signal T14 to the next stage logic block A14 as "1". At this time, the output data line S15 of the two-input AND circuit 12 is "0". When the input data D 15 is "1", the output data line S 15 of the 2-input AND circuit 12 becomes "1", and at the same time the gate 13 is turned on, and a zero transmission signal is transmitted to the next stage logic block A 14 .
Force T14 to “0”. As described above, when the zero transmission signal T15 is input as "0", the values of the output data lines of the subsequent logic blocks become "0".
That is, when the zero transmission signal T15 is input as "1", the value of the output data line is set to "0" until the input data value becomes "1", and the zero transmission signal is sent to the next stage logic block. The logic block whose input data value becomes "1" sets the value of its output data line to "1" and also sets the zero transmission signal to the next stage logic block to "0". The value of the output data line of the subsequent logic block is set to "0".

第3図は第2図に示す実施例の入力データに対
してアクテイブとなる出力データ線を説明するた
めの図である。
FIG. 3 is a diagram for explaining output data lines that become active in response to input data in the embodiment shown in FIG. 2.

入力データD15〜D0に対するアクテイブな出力
データ線を右端に示す。例えば、入力データD15
〜D9が“0”で、入力データD8で初めて“1”
となる場合、出力データ線S8だけアクテイブにな
る。このとき入力データD7〜D0はどのような値
であつてもかまわない。
Active output data lines for input data D 15 to D 0 are shown at the right end. For example, input data D 15
~ D 9 is “0” and input data D 8 is “1” for the first time
In this case, only the output data line S8 becomes active. At this time, the input data D 7 to D 0 may have any value.

このように、比較的少ないハードウエアにより
高速にデータの先行壱を検出することが可能にな
る。
In this way, it becomes possible to detect the first preceding piece of data at high speed with relatively little hardware.

第4図は本発明の第2の実施例の回路図であ
る。
FIG. 4 is a circuit diagram of a second embodiment of the present invention.

この実施例はn−MOS半導体装置で構成した
プリチヤージサンプリング方式の先行壱検出回路
である。
This embodiment is a pre-charge sampling type first detection circuit constructed using an n-MOS semiconductor device.

先行壱検出回路20の入力データは第2図に示
したレジスタ1の出力データであり、第2図と同
様にMSBよりD15,D14,…,D0で示してある。
入力データD15〜D1をそれぞれ入力とする15個の
論理ブロツクA15〜A1は構造がすべて同じであ
り、各論理ブロツク同志は零伝達信号線により接
続されている。
The input data of the preceding one detection circuit 20 is the output data of the register 1 shown in FIG. 2, and is indicated by D 15 , D 14 , . . . , D 0 from the MSB as in FIG. 2.
The 15 logic blocks A 15 -A 1 each receiving input data D 15 -D 1 have the same structure, and each logic block is connected by a zero transmission signal line.

まず、D15を入力とする論理ブロツクA15の構
成について説明する。論理ブロツクA15は、入力
データD15の値を反転するインバータ21とこの
インバータ21の出力データと前段からの零伝達
信号T15を入力とし、論理和否定を出力データ線
S15に出力する2入力NOR回路22と次段の論理
ブロツクA14へ論理ブロツクA15へ入力される零
伝達信号T15をそのまま伝えるかどうかをインバ
ータ21の出力信号により制御されるトランジス
タ23と、入力する零伝達信号T15を基本クロツ
クφ1の“1”の期間“1”にプリチヤージする
トランジスタ24とにより構成される。MSBよ
り数えて最終段の入力データD0を入力とする論
理ブロツクA0は入力データD0を反転するインバ
ータ25と、インバータ25の出力と入力データ
D1を入力とする前段の論理ブロツクA1からの零
伝達信号T0とを入力とし、論理和否定をS0に出
力する2入力NOR回路26とにより構成される。
論理ブロツクA15に入力される零伝達信号T15は、
トランジスタ27を介してグランドに接続され
る。トランジスタ27はゼロ検出許可信号
と基本クロツクφ1とを入力とする2入力NOR
回路28の出力によつて制御される。
First, the configuration of logic block A15 which receives D15 as an input will be explained. Logic block A 15 receives an inverter 21 that inverts the value of input data D 15 , the output data of this inverter 21, and a zero transmission signal T 15 from the previous stage, and outputs the logical OR NOT on the data line.
The transistor 23 , which is controlled by the output signal of the inverter 21, determines whether or not to directly transmit the zero transmission signal T15 input to the logic block A15 to the two-input NOR circuit 22 outputting to the logic block A15 and the next stage logic block A14. , and a transistor 24 that precharges the input zero transmission signal T15 to "1" during the "1" period of the basic clock φ1. The logic block A0 that receives input data D0 at the final stage counting from the MSB is an inverter 25 that inverts the input data D0 , and the output of the inverter 25 and the input data.
It is constituted by a two-input NOR circuit 26 which receives as input the zero transmission signal T 0 from the logic block A 1 at the previous stage, which receives D 1 as its input, and outputs the logical sum negation to S 0 .
The zero transfer signal T 15 input to the logic block A 15 is
It is connected to ground via a transistor 27. Transistor 27 is a two-input NOR transistor that receives the zero detection enable signal and basic clock φ1.
It is controlled by the output of circuit 28.

次に、この先行壱検出回路20の動作について
説明する。基本クロツクφ1が“1”の時に2入
力NOR回路28の出力が“0”でトランジスタ
27がオフとなり、トランジスタ24がオンとな
つて各ブロツク内の零伝達信号線は“1”にチヤ
ージされる。このとき、各ブロツク内の2入力
NOR回路からの出力データ線はすべて“0”に
なつている。次に、基本クロツクφ1が“0”と
なり、ゼロ検出許可信号がアクテイブ“0”
になると、2入力NOR回路28の出力が“1”
でトランジスタ27がオンし、論理ブロツクA15
への零伝達信号T15を“0”にする。ここで入力
データD15が“1”であれば、インバータ21を
通して零伝達信号T15とともに2入力NOR回路2
2には“0”“0”が入力され、その出力S15
“1”となる。このときトランジスタ23はオフ
で次段以降の論理ブロツクの零伝達信号線は
“1”にチヤージされたままで論理ブロツクA14
以降の2入力NOR回路からの出力S14〜S0
“0”となる。一方、論理ブロツクA15への零伝
達信号T15が“0”で入力データD15が“0”の
場合、インバータ21を通して2入力NOR回路
22の出力S15は“0”となる。このときトラン
ジスタ23はオンとなり、次段の論理ブロツク
A14への零伝達信号T14は“0”となつて、入力
データが“1”である論理ブロツクまで零伝達信
号は“0”で伝わる。この結果、入力データD15
から始めて入力データが“1”となつている論理
ブロツクまで零伝達信号は“0”で伝わり、各論
理ブロツクの2入力NOR回路からは“0”が出
力され、最初に入力データが“1”となつている
論理ブロツクでその出力信号は“1”となり、以
降の論理ブロツクの零伝達信号線は“1”にチヤ
ージされたままで、その出力信号は“0”であ
る。すなわち、ゼロ検出許可信号と基本ク
ロツクφ1がともに“0”のとき、入力データ
D15から始めて、最初に入力データが“1”であ
る論理ブロツクの出力データ線が“1”となり、
それ以外の論理ブロツクの出力データ線はすべて
“0”である。
Next, the operation of this preceding one detection circuit 20 will be explained. When the basic clock φ1 is "1", the output of the 2-input NOR circuit 28 is "0", the transistor 27 is turned off, the transistor 24 is turned on, and the zero transmission signal line in each block is charged to "1". . At this time, two inputs in each block
The output data lines from the NOR circuit are all "0". Next, the basic clock φ1 becomes “0” and the zero detection permission signal becomes active “0”.
, the output of the 2-input NOR circuit 28 becomes “1”
transistor 27 turns on, logic block A 15
The zero transmission signal T15 is set to "0". Here, if the input data D 15 is "1", the 2-input NOR circuit 2 is transmitted together with the zero transmission signal T 15 through the inverter 21.
2 is input with "0" and "0", and its output S15 becomes "1". At this time, the transistor 23 is off, and the zero transmission signal lines of the logic blocks from the next stage onwards remain charged to "1", and the logic block A14 remains charged to "1".
The subsequent outputs S14 to S0 from the two-input NOR circuit become "0". On the other hand, when the zero transmission signal T 15 to the logic block A 15 is "0" and the input data D 15 is "0", the output S 15 of the two-input NOR circuit 22 becomes "0" through the inverter 21. At this time, the transistor 23 is turned on and the next stage logic block is turned on.
The zero transmission signal T14 to A14 becomes "0" and is transmitted as "0" to the logic block whose input data is "1". As a result, the input data D 15
Starting from , the zero transmission signal is transmitted as "0" to the logic block whose input data is "1", and "0" is output from the 2-input NOR circuit of each logic block, and when the input data is "1" first. The output signal of the logic block becomes "1", and the zero transmission signal line of the subsequent logic blocks remains charged to "1", and the output signal thereof becomes "0". That is, when the zero detection permission signal and the basic clock φ1 are both “0”, the input data
Starting from D15 , the output data line of the logic block whose input data is "1" becomes "1",
All output data lines of other logic blocks are "0".

このように、比較的少ないハードウエアにより
高速に先行壱を検出することが可能である。尚、
上記実施例においては、データ長16ビツトを考え
たが、拡張されたデータ長に対しても有効であ
る。但し、上記実施例を極端に拡張したデータ長
に対して応用しようとした場合、零伝達信号の伝
播速度が各段のデイレイの累積となり、低下して
しまう。そこで、次に伝播速度の低下を回避する
先行壱検出回路の実施例について説明する。
In this way, it is possible to detect the preceding one at high speed with relatively little hardware. still,
In the above embodiment, a data length of 16 bits was considered, but it is also effective for extended data lengths. However, if the above embodiment is applied to an extremely expanded data length, the propagation speed of the zero transmission signal will be reduced due to the accumulation of delays at each stage. Therefore, next, an embodiment of a first detection circuit that avoids a decrease in propagation speed will be described.

第5図は本発明の第3の実施例の回路図であ
る。
FIG. 5 is a circuit diagram of a third embodiment of the present invention.

この実施例は、上述のように、拡張されたデー
タ長に対しても零伝達信号の伝播速度の低下を回
避した回路である。拡張されたデータ長として64
ビツト長のデータを例にして説明する。入力する
データは、MSBより順にD63,D62,…,D0であ
り、MSBである入力データD63から8ビツト単位
でまとめられている。各入力データに対応する論
理ブロツクB63〜B0は第4図における論理ブロツ
クA15と全く同じ回路構成であり、その動作につ
いて説明すると、入力データD63を入力とする論
理ブロツクB63の零伝達信号T63はゼロ検出許可
信号ZDEと基本クロツクφ1を入力とする2入
力NOR回路31の出力により制御され、次の入
力データD55を入力とする論理ブロツクB55の零
伝達信号T55は2入力NOR回路31の出力を反転
したものと、入力データD63,D62,D61,D60
D59,D58,D57,D56を入力とする9入力NOR回
路33の出力により制御される。以下同様にし
て、8ビツトのデータバスと、入力される伝達信
号との論理和否定の結果によつて次段の零伝達信
号を制御している。従つて、零伝達信号の伝播は
最大7段(9入力のNOR回路の個数)に押える
ことができる。
As described above, this embodiment is a circuit that avoids a decrease in the propagation speed of the zero transmission signal even for an extended data length. 64 as extended data length
This will be explained using bit length data as an example. The data to be input are D 63 , D 62 , . . . , D 0 in order from the MSB, and are grouped in 8-bit units starting from the input data D 63 which is the MSB. The logic blocks B 63 to B 0 corresponding to each input data have exactly the same circuit configuration as the logic block A 15 in FIG . The transmission signal T 63 is controlled by the output of the two-input NOR circuit 31 which receives the zero detection enable signal ZDE and the basic clock φ1, and the zero transmission signal T 55 of the logic block B 55 which receives the next input data D 55 is The inverted output of the 2-input NOR circuit 31 and the input data D 63 , D 62 , D 61 , D 60 ,
It is controlled by the output of a 9-input NOR circuit 33 which receives D 59 , D 58 , D 57 , and D 56 as inputs. Similarly, the zero transmission signal at the next stage is controlled based on the result of ORing the 8-bit data bus and the input transmission signal. Therefore, the propagation of the zero transmission signal can be suppressed to a maximum of seven stages (the number of nine-input NOR circuits).

次に、この実施例の動作について説明する。ゼ
ロ検出許可信号ZDEと基本クロツクφ1を入力
とする2入力NOR回路31の出力が“0”の場
合、9入力NOR回路33の出力も“0”となり、
以下同様にして全零伝達信号は“1”にチヤージ
されたままで、各論理ブロツクB63〜B0からの出
力データ線S63〜S0の値はすべて“0”のままで
ある。次にゼロ検出許可信号ZDEと基本クロツ
クφ1がともに“0”で2入力NOR回路31か
らの出力が“1”のとき、入力データD63から数
えて最終入力データD0で初めて“1”となる場
合を考えると第4図の実施例では、各論理ブロツ
クを一段ずつ伝播し、最後に1を出力することに
なるが、この第3の実施例では入力データD63
D56を一度に見て、9入力NOR回路33の出力を
“1”にする。以下8論理ブロツク単位に見てい
き7段の9入力NOR回路を通り論理ブロツクB7
に零伝達信号が“0”で入る。以降論理ブロツク
B7〜B1の出力データ線S7〜S1を“0”にしなが
ら伝播し、入力データD0が“1”の論理ブロツ
クB0の出力データ線S0を“1”にする。すなわ
ち、第2の実施例では64段の論理ブロツクを伝達
しなくてはならなかつたのが、第3の実施例の回
路を用いると、7段の9入力NOR回路と8段の
論理ブロツクの伝播に押えることができ、高速動
作が可能になる。
Next, the operation of this embodiment will be explained. When the output of the 2-input NOR circuit 31 inputting the zero detection permission signal ZDE and the basic clock φ1 is "0", the output of the 9-input NOR circuit 33 is also "0",
Similarly, the all-zero transmission signal remains charged to "1", and the values of the output data lines S63 - S0 from each logic block B63 - B0 all remain "0". Next, when the zero detection enable signal ZDE and the basic clock φ1 are both "0" and the output from the two-input NOR circuit 31 is "1", the final input data D 0 , counting from input data D 63 , becomes "1" for the first time. Considering the case where the input data D 63 to
Look at D56 at once and set the output of the 9-input NOR circuit 33 to "1". We will look at each of the 8 logic blocks below and pass through a 7-stage 9-input NOR circuit to logic block B 7.
The zero transmission signal enters as “0”. Logical block
The output data lines S 7 -S 1 of B 7 -B 1 are set to "0" while propagating, and the output data line S 0 of logic block B 0 whose input data D 0 is " 1 " is set to "1". In other words, in the second embodiment, 64 stages of logic blocks had to be transmitted, but by using the circuit of the third embodiment, it is possible to transmit 7 stages of 9-input NOR circuits and 8 stages of logic blocks. Propagation can be suppressed and high-speed operation is possible.

このように、この第3の実施例によれば、ビツ
ト長の大きなデータに対して入力データの先行壱
を検出するのに比較的少ないハードウエアを付加
することによつて高速に行うことが可能である。
As described above, according to the third embodiment, it is possible to detect the leading part of input data for data with a large bit length at high speed by adding relatively little hardware. It is.

上記三つの実施例では、MSBも含めてMSBに
一番近い“1”を検出するものとして先行壱検出
回路を説明したが、反対にMSBも含めてMSBに
一番近い“0”を検出することも、上記実施例に
おいて入力データを反転させることにより容易に
実現できる。また、最下位ビツト(LSB)も含
めてLSBに一番近い“1”あるいは“0”を検
出することも若干の回路変更で適用可能である。
In the above three embodiments, the preceding one detection circuit was described as one that detects the "1" closest to the MSB, including the MSB, but on the contrary, it detects the "0" closest to the MSB, including the MSB. This can also be easily realized by inverting the input data in the above embodiment. It is also possible to detect the "1" or "0" closest to the LSB, including the least significant bit (LSB), with a slight circuit modification.

以上詳細に説明したように、本発明によれば、
比較的少ないハードウエアでデータの最上位ビツ
トも含めて最上位ビツトに一番近い“1”を高速
に検出する先行壱検出回路が得られるのでその効
果は大きい。
As explained in detail above, according to the present invention,
The effect is great because it is possible to obtain a leading one detection circuit that can quickly detect the "1" closest to the most significant bit, including the most significant bit of data, with a relatively small amount of hardware.

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

第1図は浮動小数点のフオーマツトを示す図、
第2図は本発明の第1の実施例の回路図、第3図
は第2図に示す実施例の入力データに対してアク
テイブとなる出力データ線を説明するための図、
第4図は本発明の第2の実施例の回路図、第5図
は本発明の第3の実施例の回路図である。 1……レジスタ、2……先行壱検出回路、11
……インバータ、12……2入力AND回路、1
3,14……ゲート、20……先行壱検出回路、
21……インバータ、22……2入力NOR回路、
23……トランジスタ、24……トランジスタ、
25……インバータ、26……2入力NOR回路、
27……トランジスタ、28……2入力NOR回
路、30……先行壱検出回路、31……2入力
NOR回路、33……9入力NOR回路。
Figure 1 shows the floating point format.
FIG. 2 is a circuit diagram of the first embodiment of the present invention, FIG. 3 is a diagram for explaining output data lines that are active in response to input data of the embodiment shown in FIG. 2,
FIG. 4 is a circuit diagram of a second embodiment of the invention, and FIG. 5 is a circuit diagram of a third embodiment of the invention. 1...Register, 2...Preceding one detection circuit, 11
...Inverter, 12...2 input AND circuit, 1
3, 14...gate, 20...preceding one detection circuit,
21...Inverter, 22...2 input NOR circuit,
23...Transistor, 24...Transistor,
25...Inverter, 26...2 input NOR circuit,
27... Transistor, 28... 2-input NOR circuit, 30... Leading one detection circuit, 31... 2-input
NOR circuit, 33...9 input NOR circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 入力するデータの最上位ビツトも含めて最上
位ビツトに一番近い“1”を検出する先行壱検出
回路において、前記データの各ビツトに対応し
て、各ビツト情報が“0”ならば上位からの零伝
達信号を下位へ伝え、前記ビツト情報が“1”な
らば下位へ伝えない手段と、前記零伝達信号がア
クテイブでありかつ前記ビツト情報が“1”であ
る状態を検出する手段とを有する論理ブロツクを
各ビツトに対応して前記データのビツト数分設け
たことを特徴とする先行壱検出回路。
1 In the preceding one detection circuit that detects the "1" closest to the most significant bit of the input data, including the most significant bit, if each bit information is "0" corresponding to each bit of the data, the upper means for transmitting a zero transmission signal from a zero transmission signal to a lower level and not transmitting it to a lower level if the bit information is "1"; and means for detecting a state in which the zero transmission signal is active and the bit information is "1". 1. A preceding detection circuit characterized in that logic blocks having the same number of bits as the number of data bits are provided corresponding to each bit.
JP8207983A 1983-05-11 1983-05-11 Leading "1" detecting circuit Granted JPS59206942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8207983A JPS59206942A (en) 1983-05-11 1983-05-11 Leading "1" detecting circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8207983A JPS59206942A (en) 1983-05-11 1983-05-11 Leading "1" detecting circuit

Publications (2)

Publication Number Publication Date
JPS59206942A JPS59206942A (en) 1984-11-22
JPH0142412B2 true JPH0142412B2 (en) 1989-09-12

Family

ID=13764448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8207983A Granted JPS59206942A (en) 1983-05-11 1983-05-11 Leading "1" detecting circuit

Country Status (1)

Country Link
JP (1) JPS59206942A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2173617B (en) * 1985-03-18 1988-08-24 Texas Instruments Ltd Apparatus for locating and indicating the position of an end }1} bit of a number in a multi-bit number format
JPS6419430A (en) * 1987-07-15 1989-01-23 Fujitsu Ltd Priority encoder
JPH01180626A (en) * 1988-01-12 1989-07-18 Mitsubishi Electric Corp Priority analyzer
JPH0410029A (en) * 1990-04-27 1992-01-14 Nec Corp Lead 1-bit detecting circuit

Also Published As

Publication number Publication date
JPS59206942A (en) 1984-11-22

Similar Documents

Publication Publication Date Title
EP0127988B1 (en) A normalizing circuit
JP2674754B2 (en) Barrel shifter
EP0362580A2 (en) Leading 0/1 anticipator (LZA)
US5568410A (en) Method and apparatus for determining the amount of leading zeros or ones in a binary data field
JPH02138620A (en) Calculation of numerical quantity and numerical data processor
JPH07225671A (en) Result normalization mechanism and method of operation
EP0328619B1 (en) Apparatus and method for using a single carry chain for leading one detection and for ''sticky'' bit calculation
US4152775A (en) Single line propagation adder and method for binary addition
US5027310A (en) Carry chain incrementer and/or decrementer circuit
JPS62196767A (en) Foating point accumulator circuit of pipeline construction
EP0234495B1 (en) Arithmetic circuit capable of executing floating point operations and fixed point operations
EP0408353B1 (en) Semiconductor integrated circuit
US5398327A (en) Central processing unit including two-valued/n-valued conversion unit
JPH0142412B2 (en)
US5923574A (en) Optimized, combined leading zeros counter and shifter
US5321640A (en) Priority encoder and method of operation
US5798952A (en) Leading bit anticipator
US20030140074A1 (en) Leading Zero Anticipatory (LZA) algorithm and logic for high speed arithmetic units
CA1085961A (en) One-bit-out-of-n-bit checking circuit
KR910001708B1 (en) Central processing unit
JP3090330B2 (en) Output signal generating apparatus and method, and FIFO memory
JPH06202775A (en) Bus interface circuit
JP3106525B2 (en) Addition method and its circuit
JPS61275936A (en) Condition determining device
US4907185A (en) Program-controlled computer with an interrupt capability for floating-point operation