JPS6083139A - Normalizing circuit of binary-coded decimal number - Google Patents

Normalizing circuit of binary-coded decimal number

Info

Publication number
JPS6083139A
JPS6083139A JP19148983A JP19148983A JPS6083139A JP S6083139 A JPS6083139 A JP S6083139A JP 19148983 A JP19148983 A JP 19148983A JP 19148983 A JP19148983 A JP 19148983A JP S6083139 A JPS6083139 A JP S6083139A
Authority
JP
Japan
Prior art keywords
data
encoder
binary
output
input
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.)
Granted
Application number
JP19148983A
Other languages
Japanese (ja)
Other versions
JPH0366692B2 (en
Inventor
Akira Kuwata
桑田 明
Toshiya 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
NEC Corp
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 NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP19148983A priority Critical patent/JPS6083139A/en
Publication of JPS6083139A publication Critical patent/JPS6083139A/en
Publication of JPH0366692B2 publication Critical patent/JPH0366692B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising

Abstract

PURPOSE:To attain a high-speed operation of a normalizing circuit of binary- coded decimal number by shifting the input data after detecting ''1'' that is most approximate to the most significant bit of the input data. CONSTITUTION:A preceding ''1'' detecting circuit 1 uses the data X of mantissa part as an input and detects ''1'' most approximate to the most significant bit MSB including this MSB and informs this detection information to an encoder 2. The encoder 2 converts the number of shifts into a code of binary display to perform normalization according to the received information. A shifter 3 obtains the input of the data X and shifts the data X according to the shift information which is coded by the encoder 2 to produce the nomalization data Y. This circuit ensures a normalizing action at a high speed.

Description

【発明の詳細な説明】 本発明は2進化lO進数(BCD)データを扱う演算装
置において、その処理過程で必要となる正規化回路に関
するものである0まず、10進浮動小数点演算の正規化
処理について説明する。通常10進浮動小数点のフォー
マットは第1図に示されるように指数部と仮数部に分か
れる。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a normalization circuit that is necessary in the processing process of an arithmetic device that handles binary coded 10-decimal (BCD) data. I will explain about it. The format of a decimal floating point number is usually divided into an exponent part and a mantissa part, as shown in FIG.

N=m@lOm:仮ee a指数 部 ここで言う正規化とは与えられたフォーマット内で有効
桁数を最大限に拡張するためのもので仮数データの最上
位デジット(以下rMsDJと、休し、lデジットを1
桁とする)が″失0’(”0’でない)になるように仮
数全体をシフトすることである。μ下正規化されたフォ
ーマットを正規数と呼ぶことにする。次に例をあげて正
規数ft説明−する◎今、仮りに0.053X10’ 
というデータがあったとすると、この値は (1) 0.053X10’ (2)0.530X]0
’ (3)5.300X102 などのように幾通シに
も表わさhるが、ここで言う正規数とは、(3)のフォ
ーマットで示されるようにMSDがNO#になるように
仮数全体をシフトしたものである。ここで10進の浮動
小数点演算のうち、減算を例に一連の処理について説明
する。説明を簡単にするため、仮数部4デジツト、指数
部2デジツトとして1.832X 10”なるデータX
、から9.525X10”なるデータY1を減算する例
についてその処理過程を概説する。
N=m@lOm: Provisional ee a Exponent part The normalization referred to here is to maximize the number of significant digits within a given format. , l digit to 1
This is to shift the entire mantissa so that the digit) becomes a ``missing 0'' (not a ``0''). The format normalized under μ will be called a normal number. Next, let's explain the normal number ft using an example. ◎Now, suppose 0.053X10'
If we have the data, this value is (1) 0.053X10' (2) 0.530X]0
' (3) Although it is expressed many times as in 5.300 It has been shifted. Here, a series of processing will be described using subtraction as an example of decimal floating point operations. To simplify the explanation, data
, the processing process will be outlined for an example of subtracting data Y1 of 9.525X10'' from .

例X* Yr (])桁合せ X、とYlの大小関係を比較し、小さい方の指数音大き
い方の指故に合わせなくてほいけない。
Examples

この例でFIX1=1.832X]0” yt==0.
952X10”となる。
In this example, FIX1=1.832X]0” yt==0.
952×10”.

(2)減算 Xl とYlの仮数での減算を行う。(2) Subtraction Subtract the mantissas of Xl and Yl.

1.832−0.952 = 0.880(j 演算結
果の正規化 上述の減算により0.880X 10”という演算結果
が得られるが、これ全正規数にするため、仮数部4デジ
ツトのデータのうち、MSDffi含めてMSDに一査
近い“NO#デジットを検出し、その前にある@θ″の
デジット数分だけ(上記例の場合は]デジット)左シフ
トする。このとき指数の値f′122−】;21となシ
、正規化された値は8.800XIO”となる。浮動小
数点演算において、上述した演算結果の正規化過程は必
要不可欠なものであり、浮動小数点演算全体に占めるそ
の比重も太きい。正規化のための左シフトする方法とし
ては、1デジット左シフト機能を有したハードウェアを
用いて、仮数のMSDが′NO#になるかどうか?チェ
ックしながら繰シ返し左シフトするものが考えられる◎
しかし、この方法では、仮数のA4S Dよt)連続す
る′0′のデジット数分だけ実際にMSDのチェックと
シフト動作が必要となL”0”の数が多くなる程正規化
に要する時間が長くなってしまう。
1.832 - 0.952 = 0.880 (j Normalization of operation result The above subtraction gives an operation result of 0.880 Among them, the "NO# digit" that is one scan closer to the MSD, including MSDffi, is detected and shifted to the left by the number of digits of @θ" in front of it (digits in the above example). At this time, the exponent value f'122-];21, the normalized value is 8.800 The specific gravity is also heavy.As for the left shift method for normalization, use hardware with a 1-digit left shift function, and repeatedly shift the left shift while checking whether the MSD of the mantissa becomes 'NO#'. I can think of things to shift◎
However, with this method, as the number of L'0's that actually requires checking and shifting of the MSD for the number of consecutive '0' digits of the mantissa increases, the time required for normalization increases. becomes long.

従って他の前処理や演算処理が高速に実行可能であって
も正規化に要する時間が多い場合は全体的な浮動小数点
演算速度を著しく低下させてしまう。
Therefore, even if other preprocessing and calculation processing can be executed at high speed, if the time required for normalization is large, the overall floating point calculation speed will be significantly reduced.

そこで正規化を高速に実現するための方法として、デー
タのMSDも含め、MSDに一番近いNO”デジットを
検出し、MSDが5」” になるようにシックにより一
度に左シフトする方法が考えられる。本発明は2進化1
0進数データの最上位ビット(以下rMsBJと称す)
?−含めMSBに一番近い″1#を検出するための先行
壱検出回路と、その出力情報に従い4ビ・)ト単位のシ
フトビット数を決定するエンコーダと決定したシフトビ
ット数に従い実際に仮数部のシフトを行うシックによっ
て構成され、少ないハードウェアによって高速に正規化
処理が実現できる2進化lO進数正規化回路を提供する
ものである・本発明の2進化10進数正規化回路は、2
進化lO進数(BCD)で表わされたデータを入力とし
、前記データの最上位ピッ)CMSB)t−含め、MS
Bに一番近い“1#ヲ検出する先行壱検出回路と、前記
先行壱検出回路からの出力情報に基いて、4ビット単位
のシフト情報に変換するエンコーダと、前記エンコーダ
のシフト情報に従い、前記入力データをシフトするシフ
タとにより構成される一本発明によれば、簡単な回路構
成を以って、高速動作を行う2進化10進数正規化回路
を得ることができる0次に本発明を図を用いて詳細に説
明する。第2図は本発明の一実施例である2進化lO進
数正規化回路のブロック図である。lは仮数部データX
のMSBを含めMSBに一番近い@l′を検出する先行
壱検出回路で2は前記先行壱検出回路】がらの出力をビ
ット位置に対応したコードvcW換するエンコーダで、
3は前記エンコーダで得られたコードに基いて、データ
X?正規化データYIC変換するための7フタでちる。
Therefore, as a method to achieve normalization at high speed, a method is considered that includes the MSD of the data, detects the NO" digit closest to the MSD, and shifts the data to the left at once by thick so that the MSD becomes 5". The present invention is based on binary evolution 1
Most significant bit of decimal data (hereinafter referred to as rMsBJ)
? - A leading detection circuit for detecting "1#" closest to the MSB, an encoder for determining the number of shift bits in units of 4 bits according to its output information, and an encoder for actually determining the number of shift bits according to the determined number of shift bits. The present invention provides a binary coded decimal number normalization circuit that is configured with a thick circuit that performs a shift of 2
Data expressed in evolved lO base number (BCD) is input, and the most significant bit of the data is
a preceding one detection circuit that detects "1#" closest to B; an encoder that converts the output information from the preceding one detection circuit into shift information in units of 4 bits; According to the present invention, it is possible to obtain a binary coded decimal normalization circuit that operates at high speed with a simple circuit configuration. 2 is a block diagram of a binary IO base normalization circuit which is an embodiment of the present invention. l is mantissa data X
2 is an encoder that converts the output of the preceding first detection circuit into a code vcW corresponding to the bit position;
3 is the data X? based on the code obtained by the encoder. 7 lids for normalized data YIC conversion.

前記先行壱検出回路lは仮数部データXを入力とし、M
SBk眩め、MSBに一番近い′1#を検出し、その情
報をエンコーダ2に知らせる◎エンコーダ2では、受け
とった情報に従い、正規化するためのシフト数を二進数
表示のコードに変換する。次にジッタ3では、前記デー
タXを入力とし、前記エンコーダ2によってコード化さ
れたシフト情報に従い、@シピデータXをシフトし、正
規化データY’&つくる。柑6図は先行壱検出回路lと
、エンコーダ2の真理値図である。今、仮シに正規化す
べきデータのデータ長K1−16ビツト(4デジツト)
とすると、MSBより連続する10”のビット数によっ
て、全ピット0を除くと、16通勺に分けられる◎その
16通シのデータに対して、先行壱検出回路によシ選択
される出力815〜SOを示し、さらに工yコーダ2の
出力と、その出力コードに対応するり7トビツト数を示
す。第3図は先行壱検出回路1とエンコーダ2の第1の
実施例を示す。1−15 、1−14.1−13・・・
・・・1−1.1−0は同じ論理構造あブロックで、1
つの論理ブロック1−n(以下n=on1+2・・・・
・・15)はプリチャージトランジスタPn%NORゲ
ートMn、インバータN 、及びスイッチトランジスタ
Rnから構成され、入力するデータのMSBを含め、M
SBに一番近い′l”のピット位置に対応した選択aS
n(5lll −Soのうちどれか一本)がアクティブ
になる回路である。エンコーダ2は出力線Et、Esを
プリチャージするトランジスタTr2と先行壱検出回路
1からの出力Snによシ制御されるトランジスタQ、〜
Qmから構成され、Snのうち、有効な選択線により先
行壱のピット位置に対応するコード(シフトビット数に
関する情報を含む)を出力?m’ E o 〜E sに
出力する。出力線E、 、 g 。
The preceding one detection circuit l receives mantissa data X as input, and M
SBk dizziness detects '1# closest to MSB and informs the encoder 2 of the information ◎The encoder 2 converts the shift number for normalization into a code in binary representation according to the received information. Next, in jitter 3, the data X is input, and according to the shift information encoded by the encoder 2, the @cipi data X is shifted to create normalized data Y'&. Figure 6 is a truth value diagram of the preceding detection circuit 1 and the encoder 2. Now, the data length of the data to be normalized to the temporary one is K1 - 16 bits (4 digits)
Then, depending on the number of consecutive 10" bits from the MSB, excluding all 0 pits, it is divided into 16 pieces of data. ◎For the 16 pieces of data, the output 815 is selected by the preceding one detection circuit. ~SO, and also the output of the encoder 2 and the number of bits corresponding to the output code. Fig. 3 shows a first embodiment of the preceding one detection circuit 1 and the encoder 2.1- 15, 1-14.1-13...
...1-1.1-0 is a block with the same logical structure, 1
logical blocks 1-n (hereinafter n=on1+2...
...15) is composed of a precharge transistor Pn%NOR gate Mn, an inverter N, and a switch transistor Rn, and includes the MSB of input data, M
Selection aS corresponding to the pit position of 'l'' closest to SB
In this circuit, n (any one of 5lll-So) becomes active. The encoder 2 includes a transistor Tr2 that precharges the output lines Et and Es, and a transistor Q controlled by the output Sn from the preceding detection circuit 1.
Outputs a code (including information regarding the number of shift bits) corresponding to the first pit position by a valid selection line of Sn. Output to m' E o to E s. Output lines E, , g.

は常に10″が出力される。第7図はエンコーダ2のト
ランジスタQ、〜Qlnの位置を示す表である。このエ
ンコーダ2(Cよりシフトビットa?E、〜E0の2進
数表示にて出力される・次に第3図の第1の実施例の動
作全詳細に説明する。まず、φ1が“l”で制御信号L
OE が”0” +7)(!:き、NORゲーデー4 
(7)出力A;)f ”O’ テあり・ディスチャージ
トランジスタTrlidオフ、プリチャージトランジス
タpHl〜Pal”jオンとな夛、零伝達信号線B□〜
BGは勺’l/こプリチャージされる。biJ記征伝達
信号BIII〜Boが′1″になると、NORゲートf
%its −MOの出力S15””S。
is always output as 10''. Fig. 7 is a table showing the positions of transistors Q and ~Qln of encoder 2. This encoder 2 (C outputs shift bits a?E, ~E0 in binary notation.・Next, the operation of the first embodiment shown in FIG. 3 will be explained in detail. First, when φ1 is "L"
OE is “0” +7) (!: Ki, NOR game day 4
(7) Output A;) f ``O'' with te, discharge transistor Trlid off, precharge transistor pHl~Pal''j on, zero transmission signal line B□~
BG is precharged. When the biJ record transmission signals BIII to Bo become '1', the NOR gate f
%its-MO output S15""S.

は、すべて1″0″になる。一方、エンコーダ2はゲー
ト回路Q1〜Qmがすべてオフし、プリチャージトラン
ジスタTr2がオンして出力ラインE3、E、はすべて
′l”にプリチャージされる。次に01が′0″に遷移
し、このとき制御信号LOgがアクティブ(0”)であ
れば、NORゲート4の出力Aは″1’になシ、ディス
チャージトランジスタTriはオンして4伝達信号線B
l、が′0″となる◎このとき、論理ブロック1−15
に人力するデータD15が@0#のとき、インバータN
i5の出力は′1“となシ、スイッチトランジスタR1
gはオンし、ブロック1−14の零伝達信号線B14も
Q o$1となる。すなわち、スイッチトランジスタR
nは入力するデータが′0″ならば上位からの零伝達信
号と下位に伝え、′1”ならば伝えない手段を提供する
。また、このとき、入力するデーID1sが′0”でめ
り、インバータN15の出力が61#であるため、NO
RゲートM1Bの出力は0”でめる。
are all 1″0″. On the other hand, in the encoder 2, the gate circuits Q1 to Qm are all turned off, the precharge transistor Tr2 is turned on, and the output lines E3 and E are all precharged to 'l'.Next, 01 transitions to '0'. , at this time, if the control signal LOg is active (0''), the output A of the NOR gate 4 is not ``1'', and the discharge transistor Tri is turned on and the 4 transmission signal line B is turned on.
l becomes '0'' ◎At this time, logical block 1-15
When data D15 input manually is @0#, inverter N
The output of i5 is '1'', and the switch transistor R1
g is turned on, and the zero transmission signal line B14 of block 1-14 also becomes Qo$1. That is, the switch transistor R
n provides means for transmitting a zero transmission signal from the upper level to the lower level if the input data is '0', and not transmitting it if it is '1'. Also, at this time, the input data ID1s is '0' and the output of the inverter N15 is 61#, so the NO
The output of R gate M1B is set to 0''.

一方、入力するデータD1Bが“1”のとき、インバー
タN15の出力は@0”となシ、スイッチトランジスタ
1(15はオフし、論理ブロック1−14の零伝達信号
線B14は′1”にチャージされたままで、以降の零伝
達信号線B13〜B0も1#にチャージされたままとな
シ、論理ブロック1−14〜1−0からの出力814〜
S0は@0”のままとなる。しかし、論理ブロック1−
15の零伝達信号線B1は′O″となっておシ、上述し
たようにインバータN15の出カモ″′O”であるため
、NORゲーデーlBからの出力st’sはパ1”に遷
移する。このため、エンコーダ2の論理ブロック2−1
5のトランジスタQl、Qzはオンし、出力ラインE2
r E3はディスチャージされてE3〜E0はすべて′
0”になる。すなわち、入力するデータI)tsが11
hのときは、エンコーダ2の出力E。〜E3がすべて′
O”となシ、第1表の真理衣に従い、シフトビット数か
°゛0″であることを示す制御信号として働くことにな
る。一般にφ1が′1″で制御信号LOEが60”のと
き、NORゲート4の出力Aは0”でメジ、ディスチャ
ーシト2ンジスタTriはオフ、プリチャージトランジ
スタPn(n=0〜15)はオンとなり、零伝達信号線
BIS〜B0が11′にプリチャージされる。前記零伝
達信号線BIB〜B0が′1″になると、NORゲート
Mnの出力816〜S0はすべて′θ″となる。一方、
エンコーダ2はゲート回路Q1〜Qmが全てオフし、プ
リチャージトランジスタTr2がオンして出力ラインE
、、 E、は1″にプリチャージされる。
On the other hand, when the input data D1B is "1", the output of the inverter N15 is "@0", the switch transistor 1 (15 is turned off, and the zero transmission signal line B14 of the logic block 1-14 is "1"). The outputs 814 to 814 from the logic blocks 1-14 to 1-0 remain charged, and the subsequent zero transmission signal lines B13 to B0 also remain charged to 1#.
S0 remains @0”. However, logical block 1-
The zero transmission signal line B1 of 15 becomes ``O'', and as mentioned above, since the output of inverter N15 is ``O'', the output st's from NOR gate IB transitions to ``P1''. . Therefore, the logic block 2-1 of encoder 2
5 transistors Ql and Qz are turned on, and the output line E2
r E3 is discharged and E3 to E0 are all '
0". In other words, the input data I)ts is 11
When h, output E of encoder 2. ~E3 is everything'
According to Mari in Table 1, the shift bit number serves as a control signal indicating that the number of bits to be shifted is 0. Generally, when φ1 is '1'' and control signal LOE is 60'', the output A of the NOR gate 4 is 0'', the discharge gate 2 transistor Tri is off, and the precharge transistor Pn (n = 0 to 15) is on. Therefore, the zero transmission signal lines BIS-B0 are precharged to 11'. When the zero transmission signal lines BIB-B0 become '1', the outputs 816-S0 of the NOR gate Mn all become 'θ'. ,
In encoder 2, all gate circuits Q1 to Qm are turned off, precharge transistor Tr2 is turned on, and output line E is turned off.
,, E, are precharged to 1″.

次に01が60”に遷移し、制御信号LOE力;″’o
’otまのとき、NORゲート4の出力Aは“1″とな
り、ディスチャージトランジスタTriはオンして零伝
達信号線13tsは′0″になる。このとき入力データ
DISが0”であればインバータI’Jtsの出力は@
1”となp1スイッチトランジスタgtsはオンして、
次段の論理ブロック1−14の零伝達信号線B144″
′O”となシ、入力データDn(n=0〜15)がal
”である論理ブロックまで零伝達信号Bn(n=0〜1
5)が”′0”で伝わる。入力データDnが61”でる
る論理ブロックl−mで、スイッチトランジスタRmが
オフし、次段以降の論理ブロック1−n(n:0〜m−
1)の零伝達信号、ljB n (n =O〜m−1)
は”1”のままとなる。このとき、出力線80〜815
は、入力データDnが“1”である論理ブロックl −
mの出力線amのみが61”となシ、それ以外の論理ブ
ロック1−n (n、=0〜m −1、m+1〜15)
の出力線8 n (n=0〜m −1、m+1〜15)
は10′となる。一方エンコーダ2は、前記先行壱検出
回路1の出力線Snのうち、“1nである出力線Smを
入力とする論理ブロック2−mのトランジスタJ(2コ
または1コ)がオンし、出力ラインE。−E、icシフ
トビット数を示す情報が出力される。(ただし、Eo 
、E、は常に101合出力する)次に具体的な例を用い
て、2進化10進数の正規化の様子を説明する。第4図
に示すよう[4デジツト(16ビツト)の2進化10進
浮動小数点データを考える。前記データは10進数で0
.293であるが、2進化10進数でばXのように表わ
される。データXにおいて5DII+から、D14 e
 D13と調べ、最初にu3prとなるのはDoである
ため、第3図の先行壱検出回路1においてり、全入力と
する論理ブロックJ −9の出力線S、たけかl”とな
る。次に前記先行壱検出回路lの出力線S。−8,ll
?人力とするエンコーダ2では%Sllを入力とする論
理ブロック2−9のトランジスタQllだけがオンし、
出力線E3は0″となるが% atは11”にグリチャ
ージされたままである。さらにシフタ3では第6図の真
理値表によりS、が61”のときのシフトビット数が4
であるため、前記データX?入力とし、実際に4ビツト
シフトして、データY?得る。これまで論理ブロック1
−15〜1−0はすべて同じ構成であるとして、説明し
てきたが、最終段の論理ブロックl−0は次段の論理ブ
ロックを持たないため、零伝達信号Boを次段へ伝える
ための手段であるスイッチトランジスタRoe持つ必要
がなく、第3図の実施例では除いである。
Next, 01 transitions to 60", and the control signal LOE power;"'o
When the output is "0", the output A of the NOR gate 4 becomes "1", the discharge transistor Tri is turned on, and the zero transmission signal line 13ts becomes "0".At this time, if the input data DIS is "0", the inverter I 'The output of Jts is @
1", the p1 switch transistor gts is turned on,
Zero transmission signal line B144″ of next stage logic block 1-14
'O' and input data Dn (n=0 to 15) is al
The zero transmission signal Bn (n=0 to 1
5) is transmitted as "'0". In the logic block l-m where the input data Dn is 61", the switch transistor Rm is turned off, and the logic block 1-n (n: 0 to m-
1) zero transmission signal, ljB n (n = O ~ m-1)
remains "1". At this time, output lines 80 to 815
is a logic block l − whose input data Dn is “1”
Only the output line am of m is 61", other logic blocks 1-n (n, = 0 to m -1, m+1 to 15)
Output line 8 n (n=0~m-1, m+1~15)
becomes 10'. On the other hand, in the encoder 2, the transistor J (2 or 1) of the logic block 2-m, which receives the output line Sm which is "1n" among the output lines Sn of the preceding one detection circuit 1, is turned on, and the output line E.-E, information indicating the number of ic shift bits is output. (However, Eo
, E always outputs the sum of 101) Next, the normalization of binary coded decimal numbers will be explained using a specific example. As shown in FIG. 4, consider 4-digit (16-bit) binary-coded decimal floating-point data. The above data is 0 in decimal
.. 293, which is expressed as X in binary coded decimal notation. From 5DII+ in data X, D14 e
D13 and the first one to become u3pr is Do, so in the preceding one detection circuit 1 of FIG. The output line S.-8,ll of the preceding one detection circuit l
? In the manually operated encoder 2, only the transistor Qll of the logic block 2-9, which inputs %Sll, is turned on.
Output line E3 becomes 0'', but %at remains charged to 11''. Furthermore, in shifter 3, the number of shift bits when S is 61'' is 4 according to the truth table in Figure 6.
Therefore, the data X? Take it as input, actually shift it by 4 bits, and get data Y? obtain. So far logical block 1
-15 to 1-0 have all been described as having the same configuration, but since the final stage logic block l-0 does not have a next stage logic block, there is no means for transmitting the zero transmission signal Bo to the next stage. It is not necessary to have a switch transistor Roe, which is omitted in the embodiment of FIG.

以上述べてきたような構成により、先行壱検出回路1は
、MSBを含め、MSBに一番近い勺”を検出すること
ができ、エンコーダ2は、正規化に必要なシフトビット
数の情報全2進数のコードにて出力することができる0 上記実施例においては、4デジツト(16ビツト)デー
タについて説明してきたが、8デジツト(32ビツト)
% 16デジツト(64ピツト)・・・・・・と、ビッ
ト幅が大きいほど、従来の2進化10進数の正規化処理
に比べ、高速に正規化が可能となる。
With the configuration described above, the preceding one detection circuit 1 is able to detect the number closest to the MSB, including the MSB, and the encoder 2 is able to detect all the information on the number of shift bits necessary for normalization. In the above embodiment, 4-digit (16-bit) data has been explained, but 8-digit (32-bit) data can be output as a base number code.
% 16 digits (64 pits)... The larger the bit width, the faster normalization becomes possible compared to conventional binary coded decimal normalization processing.

次に2進数の正規化も同時に行える第2の実施例を第5
図に示す。第2の実施例のブロック図も第2図と同じで
、先行壱検出回路l、エンコーダ2、シフタ3とから成
る。先行壱検出回路1は第3図の第1の実施例と全く同
じであり、さらにシフタ3はエンコーダ2からのシフi
ff報Vこ従い実際、にシフト動作を行う。紀2の実施
例が第1の実施例と異なる点はエンコーダ2である。第
1の実施例ではエンコーダ2の出力のうち% Eo及び
Elは常に′0#が出力される構成であっ友が、本実施
例では第5図に示すようにEO%El もφ1が′1”
のとき、”1”MCグリチャージされ、φ1が@0”に
遷移すると先行壱検出回路1からのアクティブな出力線
S□を入力とするエンコーダ2の論[7”ロック2−r
n中のトランジスタQj(4コ乃至lコ)をすべてオン
して、2進数の正規化の之めの必要なシフトビット数を
E。−E、に2進叔のコードにして、前記シフタ3へ送
る。第5図のエンコーダ2のトランジスタの位置を第8
図に示し、シフタのシフトビット数を第9図に示す。エ
ンコーダ20部分を第5図のような構成にすることで、
2進数の正規化をも比較的少ないハードウェアで高速に
実現することができるが、本実施例ではエンコーダ2の
出力ラインE0 、E、を制御信号BCD/BIN で
制御することにより、2進数、2進化lO進数、両方の
正規化を同一のハードウェアで高速に実現できる・次に
第5図に示す第2の実施例を詳細に説明する。今、正規
化するデータを16とットデータとし、0000001
010010011なる2進数のデータを考える。前記
データTh2進化lO進数と考えると、0293(10
)となる。
Next, we will explain the second embodiment in which binary numbers can be normalized at the same time.
As shown in the figure. The block diagram of the second embodiment is also the same as that in FIG. The preceding one detection circuit 1 is exactly the same as the first embodiment shown in FIG.
According to the ff signal V, a shift operation is actually performed. The second embodiment differs from the first embodiment in the encoder 2. In the first embodiment, %Eo and El of the output of the encoder 2 are always outputted as '0#, but in this embodiment, as shown in FIG. ”
When MC is recharged to "1" and φ1 changes to @0, the encoder 2 inputs the active output line S□ from the preceding one detection circuit 1 [7" lock 2-r
Turn on all transistors Qj (4 to 1) in n and set the number of shift bits required for binary normalization to E. -E, is converted into a binary uncle code and sent to the shifter 3. The position of the transistor of encoder 2 in FIG.
The number of bits shifted by the shifter is shown in FIG. By configuring the encoder 20 part as shown in Figure 5,
Normalization of binary numbers can also be realized at high speed with relatively little hardware, but in this embodiment, by controlling the output lines E0 and E of the encoder 2 with the control signal BCD/BIN, the normalization of binary numbers, Normalization of both binary coded IO base numbers can be realized at high speed with the same hardware.Next, the second embodiment shown in FIG. 5 will be explained in detail. Now, let the data to be normalized be 16 and cut data, and 0000001
Consider binary data 010010011. Considering the data Th2 evolution lO base number, 0293 (10
).

まず、前記データを2進数として正規化する場合は、制
御信号BCD/BIN を”0#にする。第1の実施例
で説明したように、前記データを入力すると、前記先行
壱検出回路の出力80〜5IIlのうち、S、のみがア
クティブとなり、S、 ?入力とするエンコーダ2の論
理ブロック2−9内のトランジスタQjがすべてオンと
なるが、制御信号BCD/BINは10”であるため、
トランジスタTr3はオフでエンコーダ2の出力E、〜
E0がそのままシフタ3にシフトビット数の情報として
入シ、第9図の真理値表に従い、シフタ3で前記入力デ
ータを6ビツトシフトし、1010010011000
000なる正規化データ7得る。次に前記データ管2進
化10進数として正規化する場合は、制御信号BCD 
/BINを11”とする。前記2進数の正規化の場合と
同じくエンコーダ2の論理ブロック2−9内のトランジ
スタQjがすべてオンし、エンコーダ2の出力ラインE
、〜E0には2進数の正規化の場合と同じシフトビット
数の情報が出力されるが、制御信号BCD/BINが“
l”であるため、トランジスタTr3がオンとなり、出
力ラインE。、E、は強制的に”0#にされて、シフタ
3に4ビット単位の補正されたシフトビット数の情報と
して入9、第9図の真理値表に従い前記入力データを4
ビツトシフトして0010100100110000(
2930)なる正規化データを得る。
First, when normalizing the data as a binary number, the control signal BCD/BIN is set to "0#".As explained in the first embodiment, when the data is input, the output of the preceding one detection circuit is Of 80 to 5IIl, only S becomes active, and all the transistors Qj in the logic block 2-9 of encoder 2, which are input to S, ?, are turned on, but since the control signal BCD/BIN is 10'',
Transistor Tr3 is off and encoder 2 output E, ~
E0 is directly inputted to the shifter 3 as information on the number of shift bits, and according to the truth table in FIG.
Normalized data 7 of 000 is obtained. Next, when normalizing the data tube as a binary coded decimal number, the control signal BCD
/BIN is set to 11". As in the case of binary number normalization, all the transistors Qj in the logic block 2-9 of the encoder 2 are turned on, and the output line E of the encoder 2 is turned on.
, ~E0 outputs the same shift bit number information as in the case of binary normalization, but the control signal BCD/BIN is “
1", the transistor Tr3 is turned on, and the output lines E., E, are forcibly set to "0#," and the information on the corrected shift bit number in units of 4 bits is input to the shifter 3. According to the truth table in Figure 9, the input data is
Bit shift to 0010100100110000 (
2930) is obtained.

このように第2の実施例では、エンコーダ2の出力ライ
ンに簡単な制御回路を付加することにより、2進数及び
2進化10進数の正規化が少ないハードウェアで高速に
実現できる。前述したように、正規化処理は浮動小数点
演算において必要不可欠なものであり、浮動小数点演算
全体に占るその比重も大きい。従って、第2の実施例を
用いることにより、2進数及び2進化10進数の浮動小
数点演算を少ないハードウェアで高速に処理することが
可能となる。
As described above, in the second embodiment, by adding a simple control circuit to the output line of the encoder 2, normalization of binary numbers and binary coded decimal numbers can be realized at high speed with less hardware. As mentioned above, normalization processing is indispensable in floating-point calculations, and its weight in the entire floating-point calculations is large. Therefore, by using the second embodiment, floating point operations of binary numbers and binary coded decimal numbers can be processed at high speed with less hardware.

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

第1図は2進及び、2進化10進浮動小数点のフォーマ
ット、第2図は、正規化処理過程のブロック図、第3図
は本発明による正規化回路の第1の実施例における先行
壱検出回路とエンコーダの回路図、第4図は、仮数部を
具体的に0293とした場合の正規化処理過程を示すブ
ロック図、第5図は本発明の第2の実施例による先行壱
検出回路とエンコーダの回路図である。第6図は第1の
実施例における先行壱検出回路と、エンコーダの真理値
表、第7図は第1の実施例におけるエンコーダのゲート
トランジスタの配置表、第8図は第2の実施例における
エンコーダのゲートトランジスタの配置表、第9図は、
第2の実施例Vこおける先行壱検出回路とエンコーダの
A珪匝表で心る01・・・・・・先行壱検出回路、2・
・・・・・エンコーダ、3・・・・・・シ7り、4+f
vln・・・・・・NORゲ−)、Nn・・・・・・イ
ンバータ、’l’rlTr:IQ m・・・・・・ディ
スチャージトランジスタ、’l’r2+Pn・・・・・
・グリチy −ジトランジスタsRn・・・・・・スイ
ッチトランジスタ(n=0.1.2〜15)。
FIG. 1 is a binary and binary coded decimal floating point format, FIG. 2 is a block diagram of the normalization processing process, and FIG. 3 is a preceding detection in the first embodiment of the normalization circuit according to the present invention. FIG. 4 is a block diagram showing the normalization processing process when the mantissa is specifically set to 0293, and FIG. 5 is a circuit diagram of the circuit and encoder, and FIG. FIG. 3 is a circuit diagram of an encoder. FIG. 6 is a truth table of the first detection circuit and the encoder in the first embodiment, FIG. 7 is a layout table of gate transistors of the encoder in the first embodiment, and FIG. 8 is a diagram of the encoder in the second embodiment. The encoder gate transistor layout table, Figure 9, is as follows:
2nd embodiment Preceding one detection circuit in V and encoder A
...Encoder, 3...C7ri, 4+f
vln...NOR game), Nn...Inverter, 'l'rlTr:IQ m...Discharge transistor, 'l'r2+Pn...
- Grichi y-ditransistor sRn...Switch transistor (n=0.1.2 to 15).

Claims (1)

【特許請求の範囲】[Claims] 2進化lO進数で表わされたデータを入力とし、前記デ
ータの最上位ピッ)1?含め、該最上位ビットに一査近
い″′1#全1#ヲる先行壱検出回路と、前記先行壱検
出回路からの出力情報に基いて、所定ビット単位のシフ
ト情報に変換するエンコーダと、前記エンコーダのシフ
ト情報に従い前記入力データをシフトするシフタとを有
することを特徴とする2進化10進数正規化回路。
Data expressed in binary coded 1O base is input, and the most significant bit of the data is 1? an encoder that converts into shift information in predetermined bit units based on the output information from the preceding one detection circuit; and a shifter that shifts the input data according to shift information of the encoder.
JP19148983A 1983-10-13 1983-10-13 Normalizing circuit of binary-coded decimal number Granted JPS6083139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19148983A JPS6083139A (en) 1983-10-13 1983-10-13 Normalizing circuit of binary-coded decimal number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19148983A JPS6083139A (en) 1983-10-13 1983-10-13 Normalizing circuit of binary-coded decimal number

Publications (2)

Publication Number Publication Date
JPS6083139A true JPS6083139A (en) 1985-05-11
JPH0366692B2 JPH0366692B2 (en) 1991-10-18

Family

ID=16275491

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19148983A Granted JPS6083139A (en) 1983-10-13 1983-10-13 Normalizing circuit of binary-coded decimal number

Country Status (1)

Country Link
JP (1) JPS6083139A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5187678A (en) * 1989-09-30 1993-02-16 Kabushiki Kaisha Toshiba Priority encoder and floating-point normalization system for IEEE 754 standard

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5452945A (en) * 1977-10-05 1979-04-25 Hitachi Ltd Floating decimal point arithmetic control unit
JPS5690343A (en) * 1979-12-25 1981-07-22 Fujitsu Ltd Data normalization device
JPS57111735A (en) * 1980-12-29 1982-07-12 Fujitsu Ltd Digit matching circuit appended with complement function
JPS58158739A (en) * 1982-02-22 1983-09-21 レイセオン カンパニ− Floating point addition method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5452945A (en) * 1977-10-05 1979-04-25 Hitachi Ltd Floating decimal point arithmetic control unit
JPS5690343A (en) * 1979-12-25 1981-07-22 Fujitsu Ltd Data normalization device
JPS57111735A (en) * 1980-12-29 1982-07-12 Fujitsu Ltd Digit matching circuit appended with complement function
JPS58158739A (en) * 1982-02-22 1983-09-21 レイセオン カンパニ− Floating point addition method and apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5187678A (en) * 1989-09-30 1993-02-16 Kabushiki Kaisha Toshiba Priority encoder and floating-point normalization system for IEEE 754 standard

Also Published As

Publication number Publication date
JPH0366692B2 (en) 1991-10-18

Similar Documents

Publication Publication Date Title
JPS59216245A (en) Normalizing circuit
KR940001562B1 (en) Priority encoder
US5020016A (en) Circuit for detecting zero result of addition/subtraction by simultaneously processing each pair of corresponding bits of a pair of given numbers in parralel
US5187678A (en) Priority encoder and floating-point normalization system for IEEE 754 standard
US20070050434A1 (en) Data processing apparatus and method for normalizing a data value
WO1989002119A1 (en) Apparatus and method for using a single carry chain for leading one detection and for ''sticky'' bit calculation
JPH0659858A (en) Floating point arithmetic unit
JPS6083139A (en) Normalizing circuit of binary-coded decimal number
EP0551531A1 (en) Apparatus for executing ADD/SUB operations between IEEE standard floating-point numbers
US4758975A (en) Data processor capable of processing floating point data with exponent part of fixed or variable length
US4410956A (en) Exponential operation device
EP0508411B1 (en) Redundant binary type digital operation unit
US5155699A (en) Divider using neural network
JP3429927B2 (en) Normalization circuit device of floating point arithmetic unit
US5754458A (en) Trailing bit anticipator
US5657260A (en) Priority detecting counter device
US4125867A (en) Electronic calculator or microprocessor having a hexadecimal/binary coded decimal arithmetic unit
US3786490A (en) Reversible 2{40 s complement to sign-magnitude converter
JPS6019237A (en) Normalizing circuit
US5948049A (en) Normalization circuitry
JP2555577B2 (en) Arithmetic unit
JPH11316674A (en) Fod circuit
JPH09507940A (en) Carry select adder with leading zero digit precounting
JPS60116032A (en) Normalizing circuit
JPS6097436A (en) Rounding control circuit