JPS60537A - Normalizing circuit - Google Patents

Normalizing circuit

Info

Publication number
JPS60537A
JPS60537A JP58108641A JP10864183A JPS60537A JP S60537 A JPS60537 A JP S60537A JP 58108641 A JP58108641 A JP 58108641A JP 10864183 A JP10864183 A JP 10864183A JP S60537 A JPS60537 A JP S60537A
Authority
JP
Japan
Prior art keywords
bits
register
bit
circuit
normalization
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
JP58108641A
Other languages
Japanese (ja)
Inventor
Atsushi Aiiso
相磯 温
Yutaka Yasui
豊 安井
Shoji Yamamoto
山本 祥二
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP58108641A priority Critical patent/JPS60537A/en
Publication of JPS60537A publication Critical patent/JPS60537A/en
Pending 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

Landscapes

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

Abstract

PURPOSE:To execute quick normalizing process by shifting plural bits in a bundle among plural bits at the first time, then changing the shift from plural bits to one bit at a time when the plural-bit shifting is recognized as excess shifting. CONSTITUTION:Output bits a0-an-1 of a register 10 in which decimals are set are connected with the input sides of a 4-bit shift circuit 24 and 1-bit shift circuit 12, and the output of the register 10 is shifted by four bits in a bundle at the circuit 24. Exclusive OR gate groups 32-38 take the exclusive OR of the sign bit a0 of the register 10 and high-order four bits and input the result into an encoder 40 as e0-e3. When all the signals e0-e3 are ''0'', the encoder 40 sets its output signal fa to ''1'' and opens a gate 26 and inputs the output of the circuit 24 into the register 10. When the excess of bits is shifted at the circuit 24 and any one of the signals e1-e3 goes to ''1'', the encoder 40 sets its output signal to ''1'' and switches the shifting operation to the circit 12. Then a gate 28 is opened by means of a signal fb and bits are shifted one by one and inputted into the register 10. When the signal e0 goes to ''1'', the normalization is terminated and an end signal F is outputted.

Description

【発明の詳細な説明】 発明の技術分野 本発明は小数の正規化回路に関し、正規化処理を迅速に
行なえるようにしようとするものである。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a decimal number normalization circuit, and is intended to enable quick normalization processing.

従来技術と問題点 計算機などではnビットの2進小数Ao=aoa+らa
lまでが0である小数は最上位のビットalが1になる
ように小数点を移動させる、即ち正規化処理を行なうこ
とが多い。この正規化処理は次式のように表わすことが
できる。
Conventional technology and problems In computers, n-bit binary decimal numbers Ao=aoa+ra a
For decimal numbers where up to l is 0, the decimal point is often moved so that the most significant bit al becomes 1, that is, normalization processing is often performed. This normalization process can be expressed as follows.

=A+X2’ 但し2°<A+<2−1こ−でSはサイ
ンビットでAo≧0なら0.A。
=A+X2' where 2°<A+<2-1- where S is a sign bit and if Ao≧0 then 0. A.

〈0なら1であり、A1は正規化後の小数、mは正規化
処理で行なった小数点のシフト回数で、これらは正規化
小数の仮数部、指数部と呼ばれる。
If <0, it is 1, A1 is the decimal after normalization, m is the number of shifts of the decimal point performed in the normalization process, and these are called the mantissa and exponent parts of the normalized decimal.

第2図はAo=SOO1010なる小数の正規化をして
5101QOO(S=0(7)場合)にした例を示し、
2回の左シフトで正規化完了となっている。第1図はか
\る正規化を行なう処理プログラムの概要を、第3図は
ハードウェアを示す。第1図に示すように正規化はサイ
ンビットsと小数の各ビットaI+ a 2・・・・・
・との排他オアをとる形で行なわれ、この排他オアの結
果Fが0なら次のビソトとサインビットとの排他オアを
とり、F=1になるまでこれを繰り返す。第3図では正
規化に当って小数A、 oをレジスタ10にセントする
。該レジスタの入出力端に1ビツトシフト回路12の出
、入力端が接続され、該シフト回路12はレジスタ10
の出力端の各ビットa1〜an−1を1ビ・71〜ずつ
左へシフl〜して該レジスタ10へ入力する。この処理
は該レジスタ10ヘシフトクロソクCLKが入力する度
に行なわれる。14は排他オアゲートで、シフトが行な
われる毎にaoとaaQとa2.・・・・・・の排他オ
アをとる。その結果FがOならインヒビットゲー)16
.18は開き、クロックCLKが該ゲートを通ってレジ
スタ10および20へ入力する。レジスタ20はクロッ
クCLKが入る度に+1回路22で該レジスタの内容に
+1したものを取込み、結果シフト回数mを計数する。
Figure 2 shows an example where the decimal number Ao=SOO1010 is normalized to 5101QOO (S=0(7)),
Normalization is completed with two left shifts. FIG. 1 shows an outline of a processing program that performs such normalization, and FIG. 3 shows the hardware. As shown in Figure 1, normalization involves the sign bit s and each decimal bit aI+a2...
If the result of this exclusive OR is 0, exclusive OR is performed between the next bit and the sign bit, and this is repeated until F=1. In FIG. 3, decimal numbers A and o are placed in register 10 during normalization. The output and input terminals of a 1-bit shift circuit 12 are connected to the input and output terminals of the register, and the shift circuit 12 is connected to the input and output terminals of the register 10.
Each of the bits a1 to an-1 at the output end of is shifted to the left by 1 bit·71~ and input to the register 10. This process is performed every time the shift clock CLK is input to the register 10. 14 is an exclusive OR gate which inputs ao, aaQ, a2 . Take the exclusive OR of... As a result, if F is O, inhibit game) 16
.. 18 is open and the clock CLK enters registers 10 and 20 through the gate. Each time the clock CLK is input to the register 20, the +1 circuit 22 fetches the contents of the register by +1, and counts the number of shifts m as a result.

a1=1になるとF=1となり、ゲート16.18は閉
じてシフト及び計数は停止する。
When a1=1, F=1, gates 16 and 18 are closed, and shifting and counting are stopped.

このときのレジスタ10の内容が正規化された小数の数
値部つまり仮数、mはその指数である。従来法では上記
のように最上位ビットが1になるまで1ビツトずつシフ
トを行なうので、最下位ビ・ノドのみ1のnビット小数
では(n−2)回シフトを繰り返さねばならず、処理時
間が長くなるという欠点がある。
The contents of the register 10 at this time are the normalized numerical part of the decimal number, that is, the mantissa, and m is its exponent. In the conventional method, as described above, the shift is performed one bit at a time until the most significant bit becomes 1. Therefore, for an n-bit decimal number where only the least significant bit is 1, the shift must be repeated (n-2) times, which increases the processing time. The disadvantage is that it becomes long.

発明の目的 本発明は最初はシフトを複数ビットずつ行ない、それで
はシフトし過ぎという所で1ビツトシフトに切換え、こ
うして迅速な正規化処理を可能にしようとするものであ
る。
OBJECTS OF THE INVENTION The present invention attempts to initially shift a plurality of bits at a time, and then switch to a 1-bit shift when the shift becomes too much, thus enabling rapid normalization processing.

発明の構成 本発明の正規化回路は小数をセットされるレジスタと、
該レジスタの全ピントを1ビツトずつシフトする1ビツ
トシフト回路および複数ビ・ノドずつシフトする複数ビ
ットシフト回路と、該レジスタの上位複数ビットが複数
ビットシフト可能な状態か、1ビツトシフトのみ可能な
状態か、更に正規化完了かを判断して、前記複数ビット
シフト回路または1ビツトシフト回路のどちらかを有効
にし、正規化完了で正規化完了信号を出力する回路とを
備えることを特徴とするが、次に実施例を参照しながら
これを説明する。
Structure of the Invention The normalization circuit of the present invention includes a register to which a decimal number is set;
A 1-bit shift circuit that shifts all pins of the register one bit at a time, a multiple-bit shift circuit that shifts multiple bits/nodes at a time, and whether the high-order bits of the register can be shifted by multiple bits or only 1 bit can be shifted. , further comprising a circuit that determines whether normalization is completed, enables either the multi-bit shift circuit or the one-bit shift circuit, and outputs a normalization completion signal when normalization is completed, This will be explained with reference to examples.

発明の実施例 第4図は本発明の第1の実施例を示し、第3図と同じ部
分には同じ符号が付しである。24は4ビツトシフト回
路で1ビツトシフト回路12と同様にその人、出力端は
レジスタ10の出、入力端に接続され、レジスタ10の
出力端の各ビア)a+〜a n −Hを4ビツトシフト
して該レジスタ10へ入力する。第5図(alは4ビツ
トシフト回路24の一例を示す。本例ではn=3として
おり、各8個の人、出力端子を持ち、1番目のサインピ
ントはそのま\であるが、6番目の入力は2番目の出力
へ、7番目の入力は3番目の出力へ・・・・・・接続さ
れ、5〜8番の出力は“0”入力を与えられ、こうして
レジスタ10の出力a+”a7の4ビツトずつのシフト
が行なわれる。■ピントシフト回路は第5図(blの構
成を有する。これらのシフト回路の出力端は信号fa、
 fbで開かれるアンドゲート26.28およびオアゲ
ート30を通してレジスタ10の入力端へ接続される。
Embodiment of the Invention FIG. 4 shows a first embodiment of the invention, in which the same parts as in FIG. 3 are given the same reference numerals. 24 is a 4-bit shift circuit which, like the 1-bit shift circuit 12, has an output terminal connected to the output and input terminal of the register 10, and shifts each via (a+ to a n -H) of the output terminal of the register 10 by 4 bits. Input to the register 10. Fig. 5 (al shows an example of the 4-bit shift circuit 24. In this example, n = 3, each has 8 output terminals, and the 1st sine focus remains the same, but the 6th The input of is connected to the 2nd output, the 7th input is connected to the 3rd output, etc., and the outputs of 5th to 8th are given "0" input, thus the output of register 10 is "a+" A7 is shifted by 4 bits at a time.■The focus shift circuit has the configuration shown in FIG. 5 (bl).The output terminals of these shift circuits receive signals fa,
It is connected to the input end of the register 10 through an AND gate 26, 28 and an OR gate 30 which are opened at fb.

4ビツトシフトか1ビツトシフトかはレジスタ10の上
位4ビツトを見て決定する。排他オアゲート32.3’
4,36.38及び符号器40がこれを行なう回路で、
該排他ゲート群はサインビットaoと上位4ビツトa1
〜a4の排他オアをとり、その結果をeo〜e3として
出力する。符号器40はこれらを入力されて下記真理値
表に示す出力信号fa−fcを生じる。
Whether it is a 4-bit shift or a 1-bit shift is determined by looking at the upper 4 bits of register 10. Exclusive or gate 32.3'
4, 36. 38 and encoder 40 are the circuits that do this,
The exclusive gate group has the sign bit ao and the upper 4 bits a1
Take the exclusive OR of ~a4 and output the result as eo~e3. Encoder 40 receives these signals and produces output signals fa-fc shown in the truth table below.

表 1 eo〜e3がOということはa1〜a4がaQと同じ、
即ちOということであり、この場合は4ビットシフトし
てよい。またeoは0であるがe1〜e?のいずれかカ
月ということはalは0従って正規化未了であるがa2
〜a4のいずれかが1従って4ビツトシフトではシフト
し過ぎということである。従って符号器40は前者の場
合信号faを生じ、アンドゲート26を開いて4ビツト
シフト回路24を有効にし、また後者の場合は信号fb
を生じてアンドゲート28を開き、1ビツトシフト回路
12を有効にする。これらの信号fa、 fbはアンド
ゲート42,44にも加わり、これらを開いて“′4”
または1”を加算器22ヘオアゲート46を通して入力
し、レジスタ2oと加算器22からなる回路を+4回路
または+1回路にする。
Table 1 eo to e3 are O, which means a1 to a4 are the same as aQ,
That is, it is O, and in this case, it may be shifted by 4 bits. Also, eo is 0, but e1 to e? This means that al is 0, so normalization has not been completed, but a2
-a4 is 1, so a 4-bit shift is too much. Encoder 40 therefore produces signal fa in the former case, opens AND gate 26 to enable 4-bit shift circuit 24, and produces signal fb in the latter case.
is generated to open the AND gate 28 and enable the 1-bit shift circuit 12. These signals fa and fb are also applied to AND gates 42 and 44, which open them and output "'4".
or 1'' is inputted to the adder 22 through the OR gate 46, and the circuit consisting of the register 2o and the adder 22 becomes a +4 circuit or a +1 circuit.

更に、eo−1のときはこれはa1=l即ち正規化終了
ということであり、このとき符号器40は出力fc(−
F)を生じてインヒビソトゲート16及び48を閉じ、
レジスタ10.20のシフト、計数動作を停止する。信
号Fは正規化終了表示信号となる。
Furthermore, when eo-1, this means that a1=l, that is, the normalization is completed, and at this time the encoder 40 outputs fc(-
F) closing the inhibitor gates 16 and 48;
Stop the shifting and counting operations of register 10.20. Signal F becomes a normalization completion indication signal.

第6図は+8ピントシフトを行なう本発明の第2の実施
例を示し、第4図と同じ部分には同じ符号を付しである
。50は8ビツトシフト回路で第5図(C)の如き構成
を有し、9番目、10番目、・・・・・・のデータビッ
トa9.a、。、・・・・・・を1番目、2番目、・・
・・・・のデータビットXI、X2. ・・・・・・に
する。52は排他オアゲート群で、レジスタ10が出力
するサインビットaoと1〜8番目のデータビットa1
〜a8との排他オアをとり、その結果80j”e7を出
力する。符号器40はこれを受け、次表の真理値表に示
す出力fa+ fb+ fcを生じる。
FIG. 6 shows a second embodiment of the present invention that performs a +8 focus shift, and the same parts as in FIG. 4 are given the same reference numerals. 50 is an 8-bit shift circuit having a configuration as shown in FIG. 5(C), in which the 9th, 10th, . . . a. ,..., first, second, etc.
... data bits XI, X2. Do... 52 is an exclusive OR gate group, which includes the sign bit ao output from the register 10 and the first to eighth data bits a1.
Exclusive OR is performed with ~a8 and the result is 80j''e7. The encoder 40 receives this and produces the output fa+fb+fc shown in the truth table below.

表2 項1は8ビツトシフト可のケースであり、項2〜8はe
1〜e7従ってa2〜aeのいずれがが1で、8ビツト
シフト不可、1ビツトシフト、ケースであり、eo=l
は正規化完了のケースである。
Table 2 Item 1 is a case where 8-bit shift is possible, and items 2 to 8 are e
1 to e7 Therefore, any of a2 to ae is 1, 8 bit shift is not possible, 1 bit shift is the case, and eo = l
is a case where normalization is complete.

これらのケースに従って符号器4oば出力信号fa。According to these cases, encoder 4o outputs signal fa.

fb、 fcを生し、8ヒツトシフト、1ビツトシフト
、正規化完了表示を行なう。
It generates fb and fc, performs an 8-hit shift, a 1-bit shift, and displays the completion of normalization.

8ビットシフj−より更に大きい多ビツトシフト及びエ
ビノド、4ビツト、8ビツト各シフトの組合せなども考
えられるが、回路が比較的簡単でありかつ多ビツトシフ
トによる実用上のメリットが大きいなどの点を勘案する
ことも大切である。
A multi-bit shift even larger than the 8-bit shift j-, and a combination of vinod, 4-bit, and 8-bit shifts, may be considered, but consideration should be given to the fact that the circuit is relatively simple and the multi-bit shift has great practical advantages. That is also important.

また以上ではサインビットoっまり正の小数について述
べたが、サインビット1つまり負の小数についても同様
に本発明を適用できる。なお正規化される小数Aoがオ
ール0または1の場合は本発明回路で処理する前に除い
ておく。
Moreover, although the above description has been made of a positive decimal number with zero sign bits, the present invention can be similarly applied to a sign bit of one, that is, a negative decimal number. Note that if the decimal number Ao to be normalized is all 0 or 1, it is removed before being processed by the circuit of the present invention.

発明の詳細 な説明したように本発明によれば正規化処理を迅速に行
なうことができ、高速演算に寄与する所大なるものがあ
る。
As described in detail, according to the present invention, normalization processing can be performed quickly, and this invention greatly contributes to high-speed calculation.

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

第1図〜第3図は従来の正規化処理を説明するフローチ
ャート、説明図、およびブロック図、第4図は本発明の
実施例を示すブロック図、第5図は1,4.8ビツトシ
フト回路の回路図、第6図は本発明の他の実施例を示す
ブロック図である。 図面で、10は小数をセットされるレジスタ、12は1
ビツトシフト回路、24.25は複数ビットシフト回路
、32,34,36.38.40゜52はシフト回路選
択等を行なう回路である。 出願人 富士通株式会社 代理人弁理士 青 柳 稔 第4図 第5図
1 to 3 are flowcharts, explanatory diagrams, and block diagrams explaining conventional normalization processing, FIG. 4 is a block diagram showing an embodiment of the present invention, and FIG. 5 is a 1, 4.8 bit shift circuit. FIG. 6 is a block diagram showing another embodiment of the present invention. In the drawing, 10 is a register where a decimal number is set, and 12 is a register that is set to a decimal number.
A bit shift circuit, 24.25 is a plural bit shift circuit, and 32, 34, 36, 38, 40.52 is a circuit for selecting a shift circuit, etc. Applicant Fujitsu Ltd. Representative Patent Attorney Minoru Aoyagi Figure 4 Figure 5

Claims (1)

【特許請求の範囲】[Claims] 小数をセットされるレジスタと、該レジスタの全ビット
を1ビツトずつシフトする1ビツトシフト回路および複
数ビットずつシフトする複数ビットシフト回路と、該レ
ジスタの上位複数ビットが複数ピントシフト可能な状態
か、1ビツトシフトのみ可能な状態か、更に正規化完了
かを判断して、前記複数ビットシフト回路または1ビツ
トシフト回路のいずれかを有効にし、正規化完了で正規
化完了信号を出力する回路とを備えることを特徴とする
正規化回路。
A register to which a decimal number is set, a 1-bit shift circuit that shifts all bits of the register one bit at a time, and a multiple-bit shift circuit that shifts multiple bits at a time, and whether the upper bits of the register are in a state where multiple pins can be shifted. and a circuit that determines whether only bit shifting is possible or whether normalization is complete, enables either the multi-bit shift circuit or the one-bit shift circuit, and outputs a normalization completion signal when normalization is complete. Characteristic normalization circuit.
JP58108641A 1983-06-17 1983-06-17 Normalizing circuit Pending JPS60537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58108641A JPS60537A (en) 1983-06-17 1983-06-17 Normalizing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58108641A JPS60537A (en) 1983-06-17 1983-06-17 Normalizing circuit

Publications (1)

Publication Number Publication Date
JPS60537A true JPS60537A (en) 1985-01-05

Family

ID=14489941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58108641A Pending JPS60537A (en) 1983-06-17 1983-06-17 Normalizing circuit

Country Status (1)

Country Link
JP (1) JPS60537A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61282925A (en) * 1985-06-07 1986-12-13 Matsushita Electric Ind Co Ltd Normalizing circuit
EP0404535A2 (en) * 1989-06-20 1990-12-27 Sony Corporation Bandwidth compression device
EP0809179A2 (en) * 1996-05-07 1997-11-26 Lucent Technologies Inc. Digital microprocessor device having variable-delay division hardware
CN103699351A (en) * 2013-12-05 2014-04-02 西安交通大学 Two-end-cutting phase shifting circuit

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61282925A (en) * 1985-06-07 1986-12-13 Matsushita Electric Ind Co Ltd Normalizing circuit
EP0404535A2 (en) * 1989-06-20 1990-12-27 Sony Corporation Bandwidth compression device
EP0809179A2 (en) * 1996-05-07 1997-11-26 Lucent Technologies Inc. Digital microprocessor device having variable-delay division hardware
EP0809179A3 (en) * 1996-05-07 1997-12-29 Lucent Technologies Inc. Digital microprocessor device having variable-delay division hardware
CN103699351A (en) * 2013-12-05 2014-04-02 西安交通大学 Two-end-cutting phase shifting circuit
CN103699351B (en) * 2013-12-05 2016-06-29 西安交通大学 One is decaptitated the shift circuit that truncates

Similar Documents

Publication Publication Date Title
US4893268A (en) Circuit and method for accumulating partial products of a single, double or mixed precision multiplication
EP0328063A2 (en) Absolute value calculating circuit having a single adder
JPS58158739A (en) Floating point addition method and apparatus
JPH07225671A (en) Result normalization mechanism and method of operation
US5132925A (en) Radix-16 divider using overlapped quotient bit selection and concurrent quotient rounding and correction
US5187678A (en) Priority encoder and floating-point normalization system for IEEE 754 standard
US5339267A (en) Preprocessor of division device employing high radix division system
JPS60537A (en) Normalizing circuit
JPS58182754A (en) Arithmetic processor
US3489888A (en) Floating point look-ahead binary multiplication system utilizing two&#39;s complement notation for representing negative numbers
JPH0568725B2 (en)
JPH0346024A (en) Floating point computing element
JPH09114641A (en) Apparatus and method for decision of most significant digit
JPS5968058A (en) Floating point multiplier
US4719590A (en) Apparatus and method for performing addition and subtraction
US4159529A (en) Fibonacci code adder
US3571580A (en) Device for determining least significant {37 one{38 {0 in a binary word
US6683530B1 (en) Method and apparatus for performing a floating point compare operation
US5148480A (en) Decoder
JPS62187933A (en) Adder/subtractor
US3324288A (en) Data processing apparatus including means for correcting codes arranged in a packed format
KR100198783B1 (en) Driving method of serial operating divider
KR100196520B1 (en) Apparatus for conversion of two&#39;s complement numbers
JP2711487B2 (en) Fixed data addition / subtraction circuit
KR0154934B1 (en) Improved circuit for accomplishing the 2&#39;s complement