JPS58121449A - Square root operating circuit - Google Patents

Square root operating circuit

Info

Publication number
JPS58121449A
JPS58121449A JP57004203A JP420382A JPS58121449A JP S58121449 A JPS58121449 A JP S58121449A JP 57004203 A JP57004203 A JP 57004203A JP 420382 A JP420382 A JP 420382A JP S58121449 A JPS58121449 A JP S58121449A
Authority
JP
Japan
Prior art keywords
bits
input
square root
binary number
address
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
JP57004203A
Other languages
Japanese (ja)
Inventor
Haruo Akagi
赤木 治生
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP57004203A priority Critical patent/JPS58121449A/en
Publication of JPS58121449A publication Critical patent/JPS58121449A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/03Digital function generators working, at least partly, by table look-up
    • G06F1/035Reduction of table size
    • G06F1/0356Reduction of table size by using two or more smaller tables, e.g. addressed by parts of the argument
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2101/00Indexing scheme relating to the type of digital function generated
    • G06F2101/08Powers or roots

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Error Detection And Correction (AREA)

Abstract

PURPOSE:To reduce the required number of ROMs and simplify the circuit configuration and the selective control of the ROMs, by admitting a part of the error of X corresponding to an error which is admitted to the Y to the X when Y=X1/2 is found. CONSTITUTION:A decoder 5 inputs four higher-order bits (2<14>-2<11> bits) of an input X, and outputs a chip select signal CS1 when the logic of all bits is ''0'', and outputs another chip select signal CS2 when the logic of all bits is not ''0''. An ROM (6-2) inputs eleven higher-order bits out of fifteen bits of binary numbers which represent the input X as an address, and the LSB of the address is regarded as numbers of 2<m> (m=15-11) and stores as binary number data representing square roots of the numbers at location assigned by the address.

Description

【発明の詳細な説明】 この発明はディジタル演算における平方根演算回路に関
するものでるる。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a square root calculation circuit in digital calculation.

平方根演算回路としてよく用いられるものにROM (
read −only −memory、読出し専用メ
モリ)等で構成された関数変換装置がある。Xを表す2
進数全入力してY=JT’ceす2進数を出力するRO
MとしてはアドレスXの位置のデータにY=v/Yt−
格納しておけばよい。オ1図は平方根演算に用いられる
R OMの内容の一例を示す図で、図において(1)は
アドレス、12)はデータである。入力Xは11ビツト
の2進数で表されそのLSB(最下位ビット)はlであ
り、これがアドレス(1)全指定するとその右側のデー
タ(2)(ト)が読出される。この場合データは8ビツ
ト(上位の2ビツトは不要。
ROM (ROM) is often used as a square root calculation circuit.
There is a function conversion device configured with a read-only memory (read-only memory) or the like. 2 representing X
RO that inputs all base numbers and outputs Y=JT'ce binary numbers
As M, the data at address X is Y=v/Yt-
Just store it. Figure 1 shows an example of the contents of a ROM used for square root calculations. In the figure, (1) is an address and 12) is data. Input X is expressed as an 11-bit binary number, the LSB (least significant bit) of which is l, and when address (1) is fully specified, data (2) on the right side thereof is read out. In this case, the data is 8 bits (the upper 2 bits are not required).

であるが後述の理由で入れてろる)でLSB=1である
。Y=JYの関係はあらかじめ計算しYのl以下の計算
値は4捨5人されてその結果がROMに書込まれている
However, it is included for reasons explained later), and LSB=1. The relationship Y=JY is calculated in advance, and the calculated values of Y less than l are rounded down by 4 to 5, and the results are written in the ROM.

ところで入力データXが、14〜2°の「ビットの2進
数で表される場合、従来の装置では11ビツト入 力の
ROM 16種類を用意しXの範囲を第2図に示すとお
シナl乃至す16の16区域に分けて各区域ごとに11
ビツト入力のROMt−割当て、どのROIVI金使う
かはチップセレクト信号によって定める。
By the way, if the input data Divided into 16 areas and 11 areas for each area.
The ROMt-allocation of bit inputs and which ROI VI money to use are determined by the chip select signal.

一般にnビット入力のROMでに=m+nビットの入力
のXに対する平方根Y=JXを得名には2rr′個のR
OMt−翔意しにビット中の上位のmビットを用いてチ
ップセレクト信号を生成すればよい。
In general, in a ROM with n-bit input, we get the square root Y=JX for X with =m+n-bit input, and the name is 2rr' R
The chip select signal may be generated using the upper m bits of the bits.

第3図は第2図のす2に示すROMの内容全示し:υ、
(21は第1図の同一符号に相当し、 4Gはチップセ
レクト信号を生成する上位4ビツトを示す。
Figure 3 shows all the contents of the ROM shown in Figure 2, step 2: υ,
(21 corresponds to the same reference numerals in FIG. 1, and 4G indicates the upper 4 bits that generate the chip select signal.

24図は従来の回路金示すブロック図で、(3ンはデコ
ーダ、141は関数変換装置で(4−1)〜(4−16
)で示す16個のROMから構成される。各ROMは’
    11ビツト入力でその処理範囲は第2図に示す
とおりである。入力Xは2〜2の15ビツト、出力Yの
最大値は10進表示で181になるので8ビツトとし8
ビツトは必要としないROM (4−1)等においても
出力は8ビツトにそろえである。
Figure 24 is a block diagram showing a conventional circuit board (3 is a decoder, 141 is a function conversion device, and (4-1) to (4-16)
It is composed of 16 ROMs shown in ). Each ROM is '
The processing range for 11-bit input is as shown in FIG. The input
Even in ROM (4-1), etc., which do not require bits, the output is aligned to 8 bits.

入力のうち上位4ビツトはデコーダ(3)に入力されC
8I〜C816の16種類のチップセレクト信号として
出力され下位11ビットFi16個のROMに並列に入
力されるがチップセレクト信号の入力され7tROMだ
けが動作し各ROMの出力はワイヤードオアにより平方
根Yの値として取出される。友とえば入力Xがr (1
001,0OOOOIOIIIJである場合、上位4ビ
ツトr 0001 JによりROM (4−2)  が
選ばれ下位11ビツトのr 00000010111 
Jがアドレスとして入力しY = r 0010111
0 Jが出力される。
The upper 4 bits of the input are input to the decoder (3) and C
It is output as 16 types of chip select signals from 8I to C816, and is input in parallel to 16 ROMs of lower 11 bits, but only 7tROM is operated by inputting the chip select signal, and the output of each ROM is determined by wired OR to the value of the square root Y. is extracted as For example, input X is r (1
001,0OOOOIOIIIJ, the upper 4 bits r 0001 J select ROM (4-2) and the lower 11 bits r 00000010111
J is entered as address and Y = r 0010111
0 J is output.

これはlO進法で表示するとi−中46に相当する。This corresponds to i-46 when expressed in lO base.

従来の回路は上述のように構成されているので、入力値
のビット数にとROMのビット数nとの差m = k 
−nとした場合、ROMの必要数は?とな  □りmが
大きくなると必要とするROM数が指数関数的に増大す
るという欠点がある。
Since the conventional circuit is configured as described above, the difference between the number of bits of the input value and the number of bits of the ROM n is m = k
If -n, how many ROMs are required? □There is a drawback that the number of required ROMs increases exponentially as m becomes larger.

ま友第3図からも明らかなようにアドレスr 0000
0000000 Jからr 00000010110 
Jまでのnアドレス間のデータは同一内容であってRO
Mの使用効率が悪いという欠点があった。Yにgの誤差
を許容する場合、正確にはY=JXでY◆E=947−
二にえ?!:T れば、ΔX=2YE◆E” 中2YE
 と=eジ、たとえばE=±0.5でY=45とすれば
、同一のYを与えるXの範囲はX±45 (1981〜
2070)となるのにROM(4−1)〜(4−16)
  の入力はいずれもLSB=1としているからである
As is clear from Figure 3, the address r 0000
0000000 J to r 00000010110
The data between n addresses up to J has the same content and is RO
There was a drawback that M was inefficiently used. If an error of g is allowed for Y, exactly Y=JX and Y◆E=947−
Second? ! :T, then ΔX=2YE◆E” middle 2YE
For example, if E=±0.5 and Y=45, the range of X that gives the same Y is X±45 (1981~
2070), but ROM (4-1) to (4-16)
This is because all inputs are LSB=1.

この発明は上記のような従来のものの欠点を除去するた
めになされたもので、出力数値に許容される誤差に相当
する誤差の一部全入力数値に許容することによってRO
Mの所要数を大幅に削減することができ、回路規模が小
さく、構成もその制御も単純な平方根演算回路を提供す
ることを目的としている。
This invention was made in order to eliminate the drawbacks of the conventional ones as described above, and by allowing a part of the error corresponding to the error allowed in the output value for all input values, the RO
It is an object of the present invention to provide a square root calculation circuit that can significantly reduce the required number of M, has a small circuit scale, and has a simple configuration and control.

以下、図面についてこの発明の実施例をvi、央する。Embodiments of the present invention will be described below with reference to the drawings.

第5図はこの発明の一実施例を示すブロック図で、入力
Xと出力Yの数値範囲及びビット構成は第4図の場合と
同様とし、(51はデコーダ、(6)は関数変換装置で
ある。デコーダ(5)は入力Xの上位4ビツト(214
〜211ビツト)を入力し全ビットの論理がすべて「O
」のときはチップセレクト信号C8I  を出力し然ら
ざるときはチップセレクト信号C82t−出力する。(
6−1)f−1オl OROM (一般的にはオlの関
数変換装置)、(6−2)は第2のROM(一般的には
第2の関数変換装置)である。ROM(6−1)はRO
M(4−1)と同一でその内容はたとえば第1図に示す
とおりである。ROg(6−2)は入力Xを表す2進数
214〜2の15ピツト中の上位11ビツトすなわち2
〜2ビットt−アドレスとして入力しそのアドレスで指
定される位置にアドレスのLSBが2である2進数と見
做してその平方根を表す2進数をデータとして自己憶す
るROMでろってたとえば16図のように構成される。
FIG. 5 is a block diagram showing an embodiment of the present invention, where the numerical range and bit configuration of input X and output Y are the same as in FIG. 4, (51 is a decoder, (6) is a function conversion device, The decoder (5) decodes the upper 4 bits (214
~211 bits) and the logic of all bits is all “O”.
'', the chip select signal C8I is output; otherwise, the chip select signal C82t- is output. (
6-1) f-1 OL OROM (generally an OL function conversion device), (6-2) is a second ROM (generally a second function conversion device). ROM (6-1) is RO
It is the same as M(4-1), and its contents are as shown in FIG. 1, for example. ROg (6-2) is the upper 11 bits of the 15 bits of the binary number 214 to 2 representing input X, that is, 2
~ It is a ROM that inputs as a 2-bit t-address and stores as data a binary number representing the square root of the address, considering it as a binary number with the LSB of 2 at the location specified by that address.For example, in Figure 16. It is configured as follows.

16図で(lυはアドレス、(21)はデータである。In Figure 16, (lυ is an address, and (21) is data.

アドレス11υの最上部の行は第3図の4Gと(1)全
連結して(1)の下位4ビツトヲ除去したものと同じで
ある。16図の例ではXの下位4ビットt−除去したア
ドレスを用いても最上部の3行は1司−データとなり、
これかられかるように第5図の回路によっても第4図の
回路と同一精度で平方根を算出することができる。
The top row of the address 11υ is the same as 4G in FIG. 3 by (1) fully concatenating and removing the lower 4 bits of (1). In the example in Figure 16, even if the address from which the lower 4 bits of X are removed is used, the top three rows will still be data.
As will be seen, the circuit shown in FIG. 5 can also calculate the square root with the same precision as the circuit shown in FIG.

なお上記実施例ではk = 15 、 m = 4 、
 n = 11 。
Note that in the above example, k = 15, m = 4,
n = 11.

E=±0.5の数値例について説明し友が、この発明が
これら数値例によって限定されるものでないことは明ら
かである。
Although numerical examples of E=±0.5 have been described, it is clear that the present invention is not limited to these numerical examples.

以上のようにこの発明によれば、Xの平方根y = l
’E を求めるに際しYK許容される誤差に対応するX
の誤差の一部分t−Xに許容することによって、ROM
の所要数を大幅に削減して、回路構成およびROM選択
制御を単純にして、原価を低減することができるという
効果がるる。
As described above, according to the present invention, the square root of X y = l
'X corresponding to the YK allowable error when finding E
By allowing a fraction of the error t−X in the ROM
This has the effect that the required number of circuits can be significantly reduced, the circuit configuration and ROM selection control can be simplified, and the cost can be reduced.

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

第1図は平方根演算に用いられるROMの内容の一例を
示す図、第2図は複数のROMの分担す、   る入力
範囲を示す図、第3図は第2図に示すROMの一つの内
容を示す図、第4図社従来の回路の一例を示すブロック
図、第5図はこの発明の一実施例を示すブロック図、第
6図は第5図に示すROMの一つの内容を示す図である
。 (5)・・・デコード回路、(6−1)・・・第1の関
数変換回路、(6−2)・・・第2の関数変換回路。 代理人 葛 野 信 − 第1図 第2図 第3図 第4図 C5I〜C516 第5図
Figure 1 shows an example of the contents of a ROM used for square root calculations, Figure 2 shows the input range shared by multiple ROMs, and Figure 3 shows the contents of one of the ROMs shown in Figure 2. Figure 4 is a block diagram showing an example of a conventional circuit, Figure 5 is a block diagram showing an embodiment of the present invention, and Figure 6 is a diagram showing the contents of one of the ROMs shown in Figure 5. It is. (5)...decoding circuit, (6-1)...first function conversion circuit, (6-2)...second function conversion circuit. Agent Makoto Kuzuno - Figure 1 Figure 2 Figure 3 Figure 4 C5I-C516 Figure 5

Claims (1)

【特許請求の範囲】 m及びnを任意の正の整数とすると@ k =manビ
ットの2進数の平方根を算出する平方根演算回路におい
て、 入力2進数の上位mビットの論理がすべてrOJである
か否かを判定するデコーダ回路と、このデコーダ回路に
おいて上位mビットがすべて「0」であると判定された
場合、上記入力2進叙の下位nビットt−人力し、この
入力した下位nビットの2進数に対応する平方根を所定
の精度で表す2進数を出力するオlの関数変換装置と、
上記デコーダ回路において上位mビット牛歩くとも1ビ
ツトはrxJでるると判定された揚会、上記入力2進数
の上位nビラトラ入力し、この入力した上位nビットの
2進151最下位ビットが2mである2進数と見做しこ
の数値に対応する平方板金上記所定の精度で表す2進数
を出力する第2の関数変換装置とを備えたことを特徴と
する平方根演算回路。
[Claims] If m and n are arbitrary positive integers, in a square root arithmetic circuit that calculates the square root of a binary number of @k = man bits, is the logic of the upper m bits of the input binary number all rOJ? If the decoder circuit determines whether or not the upper m bits are all "0", the lower n bits of the above input binary code are manually calculated as t - the lower n bits of the input lower n bits. a function conversion device that outputs a binary number that represents the square root corresponding to the binary number with a predetermined precision;
In the above decoder circuit, when it is determined that even if the upper m bits are input, 1 bit is rxJ, the upper n bits of the input binary number are input, and the binary 151 least significant bit of the input upper n bits is 2m. A square root arithmetic circuit comprising: a second function converting device that outputs a binary number that is regarded as a certain binary number and is represented by a square sheet metal with the predetermined precision that corresponds to this number.
JP57004203A 1982-01-13 1982-01-13 Square root operating circuit Pending JPS58121449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57004203A JPS58121449A (en) 1982-01-13 1982-01-13 Square root operating circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57004203A JPS58121449A (en) 1982-01-13 1982-01-13 Square root operating circuit

Publications (1)

Publication Number Publication Date
JPS58121449A true JPS58121449A (en) 1983-07-19

Family

ID=11578088

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57004203A Pending JPS58121449A (en) 1982-01-13 1982-01-13 Square root operating circuit

Country Status (1)

Country Link
JP (1) JPS58121449A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5927331A (en) * 1982-08-09 1984-02-13 Hitachi Ltd Function generator
JPS5933523A (en) * 1982-07-21 1984-02-23 レイセオン カンパニ− Digital processor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5933523A (en) * 1982-07-21 1984-02-23 レイセオン カンパニ− Digital processor
JPH0418328B2 (en) * 1982-07-21 1992-03-27 Raytheon Co
JPS5927331A (en) * 1982-08-09 1984-02-13 Hitachi Ltd Function generator
JPH0241044B2 (en) * 1982-08-09 1990-09-14 Hitachi Ltd

Similar Documents

Publication Publication Date Title
EP0221577B1 (en) Microprogram control unit
JP3487903B2 (en) Arithmetic device and arithmetic method
JPS61237133A (en) Arithmetic circuit
JPS58121449A (en) Square root operating circuit
JPH049340B2 (en)
US4888780A (en) Method of detecting and correcting an error that has occurred in a digital computer
JP2565730B2 (en) Overflow detection circuit
US6128636A (en) Method for interfacing floating point and integer processes in a computer system
WO2023189191A1 (en) Fixed-point product-sum computing device
JP3252029B2 (en) Encoding device and encoding method
JP3567576B2 (en) Electronic computer
JP2624738B2 (en) Rounding method
JPS6168636A (en) Data processor
KR910009096B1 (en) Korean character code transformation method
JPS58166444A (en) Large/small discriminating circuit for absolute value
JPS59216247A (en) Function value arithmetic circuit
JP3278488B2 (en) Decimal arithmetic unit
JPS6374308A (en) Digital arithmetic circuit
JP2723319B2 (en) How to convert a binary number to a decimal number
JPS62171027A (en) Digital signal processor
JPH0335691B2 (en)
JPH02126317A (en) Data format converting system
JPS5875928A (en) Loop counting system
JPH07117892B2 (en) Shifter
JPS58146081A (en) Memory input-output circuit