JPS59117638A - Operating device - Google Patents

Operating device

Info

Publication number
JPS59117638A
JPS59117638A JP23158582A JP23158582A JPS59117638A JP S59117638 A JPS59117638 A JP S59117638A JP 23158582 A JP23158582 A JP 23158582A JP 23158582 A JP23158582 A JP 23158582A JP S59117638 A JPS59117638 A JP S59117638A
Authority
JP
Japan
Prior art keywords
register
data
bits
output data
bit
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
JP23158582A
Other languages
Japanese (ja)
Inventor
Hisayoshi Tsubo
坪 尚義
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 JP23158582A priority Critical patent/JPS59117638A/en
Publication of JPS59117638A publication Critical patent/JPS59117638A/en
Pending 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/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/552Powers or roots, e.g. Pythagorean sums
    • G06F7/5525Roots or inverse roots of single operands

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE:To execute a square root calculation by a small number of steps, by inputting and outputting data between three registers and an arithmetic circuit. CONSTITUTION:The value deriving a square root is set to the second register 2. Upper two bits of the second register 2 are set to the first register 1, and the data of second register 2 is shifted upward by two bits. Constant 01 is set to the third register 3. Data of the first register and data of the third register are subjected subtraction in an arithmetic device 4. If data of the first register is larger than or equal to data of the third register, upper two bits of the second register are set to lower two bits of the first register, and output data of a selecting circuit 5 is set to remaining upper bits of the first register. The square root extracting arithmetic for two bits is executed in every one step.

Description

【発明の詳細な説明】 〔発明の属する技術分野〕 本発明は、演算装置に関するもので、特に平方根の演算
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Technical field to which the invention pertains] The present invention relates to an arithmetic device, and particularly to square root arithmetic.

〔従来技術〕[Prior art]

従来の演算回路では、平方根を求める演算に於いて、シ
フト動作、減算動作、減算結果の補正動作及び平方根の
セット動作等をマイクロプログラムあるいはソフトウェ
アによって行っている。従って2ビツト毎の開平演算を
するためには3〜6ステツプが必要であシ高速演算処理
が出来ない。
In conventional arithmetic circuits, in the calculation of a square root, a shift operation, a subtraction operation, a correction operation of the subtraction result, a setting operation of the square root, etc. are performed by a microprogram or software. Therefore, 3 to 6 steps are required to perform square root calculation for every 2 bits, and high-speed calculation processing is not possible.

〔発明の目的〕[Purpose of the invention]

本発明は、平方根を求める演算に於いて、2進の2ビツ
トづつを減算演算によって開平する方式を用いている。
In the calculation of the square root, the present invention uses a method of square rooting each two binary bits by subtraction.

演算器の出力である桁上け(桁下げ)信号は減算演算時
には2つの入力データの大小関係を示す、従って従来の
如く減算結果を一旦レジスタにセットしてデータの正負
によって大小関係をチェックするのではなく、上記桁上
げ(桁下げ)信号によシ、大小関係によって異なったレ
ジスタにセットされるべきデータを決定する事および2
ビツトのシフト動作を演算動作と同時に行う事によυ、
従来3〜6スデツプ必要であった開平演算を1ステツプ
で実現する高速演算装置を提供する事を目的とする。
The carry (down) signal that is the output of the arithmetic unit indicates the magnitude relationship between two input data during a subtraction operation.Therefore, as in the past, the subtraction result is set in a register and the magnitude relationship is checked by the sign or minus of the data. 2. Determine the data to be set in different registers depending on the magnitude relationship based on the carry (down) signal, instead of 2.
By performing the bit shift operation at the same time as the arithmetic operation, υ
The object of the present invention is to provide a high-speed arithmetic device that can perform square root calculation in one step, which conventionally required 3 to 6 steps.

〔発明の構成〕[Structure of the invention]

本発明の装置は、少なくとも第ルジスタ、第2レジスタ
及び第3レジスタの3個のレジスタと、前記レジスタの
うち少なくとも第ルジスタと第3レジスタとの出力デー
タを入力する演算器と、第ルジスタのデータから第3レ
ジスタのデータを前記演算器で減じたとき第ルジスタの
データが第3レジスタのデータよシ大きいか等しい事を
前記演算器よ多出力される桁上げ(桁下げ)信号によっ
て決定しかく決定されたときは前記演算器の出力データ
を選択しそうでないときは第ルジスタの出力データを選
択する選択回路と、該選択回路の出力データを第ルジス
タの最下位から3ビツト目以上に入力し第ルジスタの最
下位の2ビツトに第2レジスタの最上位の2ビツトを入
力する手段と、第2レジスタの内容を上位方向に2ビツ
トシフトする手段と、第3レジスタの最下位の2ビツト
に定数論理値°o1°を入力し最下位から3ビツト目に
対しては前記桁上げ(桁下げ)信号によって決定する値
すなわち第ルジスタの出力データから第3レジスタの出
力データを減じたときに第ルジスタの出力データが第3
レジスタの出力データより大きいか等しければ論理値+
11@小さければ論理値9Pを入力しそして第3レジス
タの最下位から4ビツト目以上に対しては第3レジスタ
の出力データの最下位の3ビツト目から上位方向に1ビ
ツトシフトした値を入力する手段とを具備している。
The apparatus of the present invention includes at least three registers, a first register, a second register, and a third register; When the data in the third register is subtracted from the data in the third register by the arithmetic unit, it is determined whether the data in the register is greater than or equal to the data in the third register by the carry (carry down) signals output from the arithmetic unit. a selection circuit that selects the output data of the arithmetic unit when the arithmetic unit is selected, and selects the output data of the first logic register when it is not selected; means for inputting the most significant two bits of the second register into the two least significant bits of the register, means for shifting the contents of the second register upward by two bits, and a constant logical value for the two least significant bits of the third register. When inputting °o1°, the value determined by the carry (carry down) signal for the third bit from the lowest register, that is, the output data of the third register when the output data of the third register is subtracted from the output data of the first register, is the output of the third register. Data is the third
Logical value + if greater than or equal to register output data
11@If it is smaller, input the logical value 9P, and for the 4th bit or higher from the lowest register of the 3rd register, input the value shifted by 1 bit upwards from the 3rd lowest bit of the output data of the 3rd register. It is equipped with the means.

〔実施例の説明〕[Explanation of Examples]

次に、本発明の平方根を求める演算回路について図面を
用いて詳細に説明する。
Next, an arithmetic circuit for calculating a square root according to the present invention will be explained in detail with reference to the drawings.

図は本発明の一実施例を示すブロック図である。The figure is a block diagram showing one embodiment of the present invention.

本実施例は第ルジスタ1.第2レジスタ2、第3レジス
タ3、演算回路4、および選択回路5゜6.7および8
を含んでいる。
In this embodiment, the first Lujistar 1. Second register 2, third register 3, arithmetic circuit 4, and selection circuit 5゜6.7 and 8
Contains.

本実施例の動作は下記の通りである。The operation of this embodiment is as follows.

まず、図の第2レジスタlをクリアし、第2レジスタ2
に平方根を求められるべき値をセットし、第3レジスタ
3に定数として最下位の2ビツトがn0111でその他
のビットがすべてII□I+のデータをセットする。
First, clear the second register l in the figure, and
A value for which the square root is to be found is set, and data is set in the third register 3 as a constant with the lowest two bits being n0111 and all other bits being II□I+.

次に1選択回路5から出力される第ルジスタのデータと
第2レジスタ2の最上位の2ビツトのデータとを選択回
路6で選択し、第ルジスタlKセットする。同時に、選
択回路7で第2レジスタ2の出力データを上位方向に2
ピツトシフトしたデータを選択し第2レジスタ2にセッ
トする。
Next, the selection circuit 6 selects the data of the first register outputted from the first selection circuit 5 and the data of the most significant two bits of the second register 2, and sets the second register 1K. At the same time, the selection circuit 7 selects the output data of the second register 2 in the upper direction.
The pit-shifted data is selected and set in the second register 2.

次からは、後述するように、第ルジスタ1の出力データ
と第3レジスタ3の出力データとの大小関係によって選
択回路5の選択データ及び第3レジスタ3の最下位から
3ビツト目のデータとが自動的に決定され、以下に説明
する様に開平の演算が進められる。
From then on, as will be described later, the selection data of the selection circuit 5 and the data of the 3rd bit from the bottom of the third register 3 are determined by the magnitude relationship between the output data of the register 1 and the output data of the third register 3. It is automatically determined, and the square root calculation proceeds as described below.

まず、第ルジスタ1の出力データから第3レジスタ3の
出力データが演算器4で減算される。
First, the output data of the third register 3 is subtracted from the output data of the register 1 by the arithmetic unit 4.

この時第ルジスタ1の出力データが第3レジスタ3の出
力データよシ大きいか等しい事を演算器4から出力され
る桁上げ(桁下げ)信号9にょシ決定し、大きいか等し
いときには、選択回路5は演算器4の出力データを選択
し出力し、選択回路6を介し最下位の2ビツトに第2レ
ジスタ2の最上位の2ビツトを、そして最下位の3ビツ
ト以上に選択回路5の出力データを第ルジスタ1に入力
スル。一方、第3レジスタ3には選択回路8を介し最下
位の2ビツトは常数″01′1を、最下位から3ビツト
目は前記の桁上げ(桁下げ)信号9から決定される値で
ある論理Jl+を、そして最下位から4ビツト目以上に
は第3レジスタ3の出力データの最下位から3ビツト目
より上位に向けて上位方向に1ビツトシフトしたデータ
を入力する。
At this time, the carry (down) signal 9 output from the arithmetic unit 4 determines whether the output data of the register 1 is greater than or equal to the output data of the third register 3, and if the data is greater or equal, the selection circuit 5 selects and outputs the output data of the arithmetic unit 4, sends the most significant two bits of the second register 2 to the lowest two bits via the selection circuit 6, and outputs the output of the selection circuit 5 to the lowest three bits and above. Input the data into Lujistar 1. On the other hand, in the third register 3, the lowest two bits are the constant "01'1" via the selection circuit 8, and the third bit from the lowest is the value determined from the carry (down) signal 9. The logic Jl+ is inputted, and data shifted by one bit in the upper direction from the third bit from the lowest order of the output data of the third register 3 is inputted to the fourth bit and above from the lowest order.

そして第2レジスタ2には第2レジスタ2の出力データ
を上位方向に2ビツトシフトして入力される様に選択回
路7を介して行うが最下位の2ビツトは不定でも良い。
Then, the output data of the second register 2 is input to the second register 2 by shifting two bits upwards through the selection circuit 7, but the two least significant bits may be undefined.

もし、第ルジスタ1の出力データが第3レジスタ3の出
力データよシ小さいときには、演算器4から出される桁
上げ(桁下げ)信号9の論理値が、上述の第ルジスタ1
の出力データが第3レジスタ3の出力データより大きい
か等しいときに対して逆転する。従って、第ルジスタ1
の出力データが第3レジスタ3の出力データより小さい
事を桁上げ(格下げ)信号9によシ決定し、選択回路5
は第ルジスタ1を選択し出力し、選択回路6を介し最下
位の2ビツトに第2レジスタ2の最上位の2ビツトを、
そして最下位の3ビツト以上に選択回路5の出力データ
を第ルジスタ1に入力する。一方、第3レジスタ3には
、選択回路8を介し最下位の2ビツトは常数II (1
1Ifを、最下位から3ビツト目は前記の桁上け(桁下
け)信号9から決定される値である論理It□Itを、
そして最下位から4ビツト目以上には第3レジスタ3の
出力データの最下位から3ビツト目よシ上位に向けて上
位方向に1ビツトシフトしたデータを入力する。そして
第2レジスタ2には第2レジスタ2の出力データを上位
方向に2ビツトシフトして入力される様に選択回路7を
介して行うが最下位の2ビツトは不定でも良い。以上説
明した動作により1ステツプすなわちレジスタに対する
クロックが1回出る毎に2ビツトの開平演算が実行され
る。
If the output data of the register 1 is smaller than the output data of the third register 3, the logical value of the carry (down) signal 9 output from the arithmetic unit 4 is
This is reversed when the output data of the third register 3 is greater than or equal to the output data of the third register 3. Therefore, the first Rujista 1
It is determined by the carry (downgrade) signal 9 that the output data of is smaller than the output data of the third register 3, and the selection circuit 5
selects and outputs the register 1, and sends the two most significant bits of the second register 2 to the two least significant bits through the selection circuit 6.
Then, the output data of the selection circuit 5 is inputted to the register 1 in the least significant three bits and above. On the other hand, the lowest two bits are stored in the third register 3 via the selection circuit 8 as a constant II (1
1If, and the third bit from the bottom is the logic It□It, which is the value determined from the above carry (down) signal 9.
Then, data obtained by shifting the output data of the third register 3 by one bit in the upper direction from the third bit from the lowest order is inputted to the fourth bit and above from the lowest order. Then, the output data of the second register 2 is input to the second register 2 by shifting two bits upwards through the selection circuit 7, but the two least significant bits may be undefined. With the operation described above, a 2-bit square root operation is executed in each step, that is, each time a clock signal to the register is output.

以上の演算は、 Newton にュートン)の反復公
式を石川したものであシ、これを反復することにより、
最初に第2レジスタに設定された値の開平された結果が
、第3レジスタの最下位から3ビツト目以上に得られる
The above calculation is an Ishikawa version of Newton's iteration formula, and by repeating this,
The result of the square root of the value initially set in the second register is obtained at the third or higher bit from the bottom of the third register.

〔発明の効果〕〔Effect of the invention〕

本発明は以上説明したように、平方根の開平演算を2ビ
ツトづつ行う際、従来の方式では3〜6ステツプ必要で
あったのを常に1ステツプで実現出来るため、演算を高
速化できる効果がある。
As explained above, the present invention has the effect of speeding up the calculation because it can always perform the square root calculation on 2 bits at a time in 1 step, whereas the conventional method required 3 to 6 steps. .

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

図は本発明の一実施例のブロック図を示す。 図において、1・・・・・・第2レジスタ、2・・・・
・・第2レジスタ、3・・・・・・第3レジスタ、4・
・・・・・演算回路、5.6,7.8・・・・・・選択
回路。
The figure shows a block diagram of one embodiment of the invention. In the figure, 1... second register, 2...
...Second register, 3...Third register, 4.
... Arithmetic circuit, 5.6, 7.8 ... Selection circuit.

Claims (1)

【特許請求の範囲】 少すくとも第ルジスタ、第2レジスタ及び第3レジスタ
の3個のレジスタと、 前記レジスタのうち少なくとも第ルジスタと第3レジス
タとの出力データを入力とする演算器と、 第ルジスタのデ・−夕から第3レジスタノテータを前記
演s指で減じたとき第ルジスタのデータが第3レジスタ
のデータよシ大きいか等しい事を前記演算器より出力さ
れる桁上げ(桁下゛げ)信号によって決定しかく決定さ
れたときは角fl ie K H口器の出力データを選
択しそうでないときは第ルジスタの出力データを選択す
る選択回路と、該選択回路の出力データを第ルジスタの
最下位から3ビツト目以上に入力し第ルジスタの最下位
の2ビツトに第2レジスタの最上位の2ビツトを入力す
る手段と、 第2レジスタq内容を上位方向に2ビツトシフトする手
段と、 第3レジスタの最下位の2ビツトに定数の論理値″01
 ” e入力し最下位から3ビツト目に対しては前記桁
上け(桁下げ)信号によって決定する値すなわち第ルジ
スタの出力データから第3レジスタの出力データを減じ
たときに第2レジスタの出力データが第3レジスタの出
力データより大きいか等しければ論理値11111小さ
ければ論理値110 Ifを入力しそして第3レジスタ
の最下位から4ビツト目以上に対しては第3レジスタの
出力データの最下位の3ビツト目から上位方向に1ピン
トシフトした値を入力する手段と を具備することを特徴とする演算処理装置。
[Scope of Claims] At least three registers, a first register, a second register, and a third register; an arithmetic unit receiving output data from at least the first register and the third register among the registers; When the third register notator is subtracted from the data in the register with the operator's finger, the carry (lower digit) output from the arithmetic unit indicates that the data in the register is greater than or equal to the data in the third register. (G) A selection circuit that selects the output data of the corner fl ie K H mouthpart when it is determined by the signal, and selects the output data of the first Lujistor when it is not determined; means for inputting the third bit or more from the lowest register and inputting the highest two bits of the second register into the lowest two bits of the second register; means for shifting the contents of the second register q by two bits in the upper direction; The lowest 2 bits of the 3rd register are set to the constant logical value ``01''.
” For the 3rd bit from the least significant input, the value determined by the carry (down) signal is the output of the 2nd register when the output data of the 3rd register is subtracted from the output data of the 1st register. If the data is greater than or equal to the output data of the third register, input the logical value 11111; if it is smaller, input the logical value 110 If. An arithmetic processing device comprising: means for inputting a value shifted by one focus in an upward direction from the third bit of
JP23158582A 1982-12-24 1982-12-24 Operating device Pending JPS59117638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23158582A JPS59117638A (en) 1982-12-24 1982-12-24 Operating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23158582A JPS59117638A (en) 1982-12-24 1982-12-24 Operating device

Publications (1)

Publication Number Publication Date
JPS59117638A true JPS59117638A (en) 1984-07-07

Family

ID=16925817

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23158582A Pending JPS59117638A (en) 1982-12-24 1982-12-24 Operating device

Country Status (1)

Country Link
JP (1) JPS59117638A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62113236A (en) * 1985-10-31 1987-05-25 ゼネラル・エレクトリツク・カンパニイ Circuit for determining root function

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62113236A (en) * 1985-10-31 1987-05-25 ゼネラル・エレクトリツク・カンパニイ Circuit for determining root function

Similar Documents

Publication Publication Date Title
US5751592A (en) Apparatus and method of supporting functional design of logic circuit and apparatus and method of verifying functional design of logic circuit
JP3345894B2 (en) Floating point multiplier
EP3716043B1 (en) Information processor, information processing method, and program
JPH07107664B2 (en) Multiplication circuit
JPS59117638A (en) Operating device
JPS58169281A (en) Generator for fringed pattern
JP2575969B2 (en) Floating point multiplier / divider
JP3166781B2 (en) Adder circuit
US6654776B1 (en) Method and apparatus for computing parallel leading zero count with offset
JPH0113129B2 (en)
JP2907276B2 (en) Arithmetic processing unit
JP2777265B2 (en) High radix square root arithmetic unit
JP2569330B2 (en) Multiplication circuit
JPH0368415B2 (en)
JP2953405B2 (en) Method for speeding up logic simulation and logic simulation apparatus
JPS63254525A (en) Dividing device
JP3284717B2 (en) Barrel shifter
JPS59216247A (en) Function value arithmetic circuit
JP3539077B2 (en) Division method by parallel operation method
JPH0764768A (en) Absolute value accumulator
JPS62211729A (en) Data operation unit
JPS59225447A (en) Floating point numeral arithmetic device
JPH01237831A (en) Divider
JPH0695854A (en) Division arithmetic unit
JPH02126322A (en) Information processor