JPH0383127A - Decimal divider - Google Patents

Decimal divider

Info

Publication number
JPH0383127A
JPH0383127A JP22092589A JP22092589A JPH0383127A JP H0383127 A JPH0383127 A JP H0383127A JP 22092589 A JP22092589 A JP 22092589A JP 22092589 A JP22092589 A JP 22092589A JP H0383127 A JPH0383127 A JP H0383127A
Authority
JP
Japan
Prior art keywords
divisor
circuit
decimal
power
output
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
JP22092589A
Other languages
Japanese (ja)
Inventor
Takaya Sawai
澤井 孝哉
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
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 filed Critical NEC Corp
Priority to JP22092589A priority Critical patent/JPH0383127A/en
Publication of JPH0383127A publication Critical patent/JPH0383127A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the number of operation cycles to one at the time of the use of the 10-th power as the divisor by providing a circuit which selects the output of a decimal dividing circuit and that of a shift circuit by the output of a 10-th power detecting circuit. CONSTITUTION:A decimal divider consists of a decimal dividing circuit 3 which calculates a quotient and a remainder in accordance with given dividend and divisor, a 10-th power detecting circuit 6 which detects that the divisor is the 10-th power, a shift circuit 4 which shifts the dividend right in response to the divisor, and a circuit 7 which selects the output of the decimal dividing circuit 3 and the output of the shift circuit 4 by the output of the 10-th detecting circuit 6. The dividend and the divisor are held in registers 1 and 2 respectively; and when the divisor is the 10-th power, the dividend is shifted in the shifter 4 by several bits and the result is held in a register 8 through the selector 7 in the next cycle. Thus, the operation cycle is shortened when the divisor is the 10-th power.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は情報処理装置の10進除算器に関し。[Detailed description of the invention] [Industrial application field] The present invention relates to a decimal divider for an information processing device.

特に除数が100幕乗である場合の10進除算器に関す
る。
In particular, it relates to a decimal divider when the divisor is a 100-act power.

〔従来の技術〕[Conventional technology]

従来、10進除算を行なう方法として第2図のフローに
示すような方法が用いられてきた。
Conventionally, a method shown in the flowchart of FIG. 2 has been used to perform decimal division.

第2図のフローを説明すると、第1ステツプとして10
進表記されている被除数(DD)および除数(DB)を
2進表記へ変換する。一般に10進演算は演算精度を要
求する場合によく用いられるため、その内部表記が2進
化10進法(BCD)等で行なわれているので、前記の
変換作業を必要とする。次ステツプ以降に関しては、基
本的に被除数(DD)から除数(Ds )を引いて、そ
の結果が除数より大きいならば減算を繰り返し、その結
果が除数よりも小さくなった時点で処理を終了し、結果
として被除数から除数を引いた回数を商として採用する
。さらに後処理としてその時点で2進表記されている値
を10進表記へと変換して、この値を商として出力する
To explain the flow in Figure 2, the first step is 10
Convert the dividend (DD) and divisor (DB) in decimal notation to binary notation. Generally, decimal arithmetic is often used when high arithmetic precision is required, and its internal notation is performed in binary coded decimal notation (BCD) or the like, so the above-mentioned conversion work is required. For the next step and subsequent steps, basically subtract the divisor (Ds) from the dividend (DD), repeat the subtraction if the result is greater than the divisor, and end the process when the result becomes smaller than the divisor. As a result, the number of times the divisor is subtracted from the dividend is used as the quotient. Furthermore, as post-processing, the value expressed in binary at that time is converted into decimal notation, and this value is output as a quotient.

以下余日 〔発明が解決しようとする課題〕 上述した方法によると、その実行サイクルは。Remaining days below [Problem to be solved by the invention] According to the method described above, its execution cycle is:

被除数や除数の大小にもよるが2前後の数値変換処理を
含めると数10サイクル以上かかってしまう。
Depending on the size of the dividend and divisor, including the numerical conversion process of around 2, it will take several tens of cycles or more.

このように、10進除算はその実行サイクルを多く要す
るという欠点を持つ。しかしその内容を検討するに、実
行サイクルが数多くなるのは除数が10の幕乗の場合で
ある。
Thus, decimal division has the disadvantage of requiring many execution cycles. However, when considering its contents, the number of execution cycles increases when the divisor is 10.

本発明は従来のもののこのような問題点を解決しようと
するもので、除数が10の冪乗の場合に演算サイクルを
短縮できる10進演算器を提供するものである。
The present invention is an attempt to solve these problems of the conventional devices, and provides a decimal arithmetic unit that can shorten the operation cycle when the divisor is a power of 10.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の10進除算器は、与えられた被除数と除数から
商及び剰余を算出する10進除算回路と、前記除数が1
0の冪乗であることを検出する100冪乗検出回路と、
前記除数に応答し。
The decimal divider of the present invention includes a decimal divider circuit that calculates a quotient and a remainder from a given dividend and a divisor, and a decimal divider circuit that calculates a quotient and a remainder from a given dividend and a divisor, and a
a 100 power detection circuit that detects that it is a power of 0;
In response to said divisor.

て前記被除数を右シフトするシフト回路と、前記10の
冪乗検出回路の出力で前記10進除算回路と前記シフト
回路との出方を選択する回路とを含んで構成される。
and a circuit that selects the output of the decimal division circuit and the shift circuit based on the output of the power of 10 detection circuit.

〔実施例〕〔Example〕

次に2本発明について図面を参照して説明する。 Next, two aspects of the present invention will be explained with reference to the drawings.

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

レジスタ1は被除数を入力し保持するレジスタである。Register 1 is a register that inputs and holds the dividend.

レジスタ2は除数を入力し保持するレジスタである。1
0進除算回路3はレジスタ1とレジスタ2からそれぞれ
1o進表現された被除数と除数とを入力し、10進除算
を行ない10進表記の商を出方する1o進除算回路であ
シ2通常その処理に数10マシンサイクルを要する。シ
フタ4はレジスタ1に保持されている被除数を入力し、
その入力値をもう一方の入力であるシフトカウント数だ
け入カ桁を右シフトした値を出力する回路である。シフ
トカウント生成回路5はレジスタ2に保持されている除
数を入力し、シフトカウントを出力する回路である。1
0の冪乗検出回路6はレジスタ2に保持されている除数
を入力し、その入力値が10の冪乗であるかどうかを判
定しその結果を出力する回路である。セレクタ7は10
進除算回路5とシフタ5からの出力金入力し、そのどち
らかを10の冪乗検出回路6の出力で切り換える機能を
持つ。レジスタ8はセレクタ7の出力を保持する。
Register 2 is a register that inputs and holds a divisor. 1
The decimal division circuit 3 is a decimal division circuit that inputs the dividend and divisor expressed in decimal notation from registers 1 and 2, respectively, performs decimal division, and outputs the quotient in decimal notation. The process requires several tens of machine cycles. Shifter 4 inputs the dividend held in register 1,
This circuit outputs the input value by shifting the input digits to the right by the shift count number of the other input. The shift count generation circuit 5 is a circuit that inputs the divisor held in the register 2 and outputs a shift count. 1
The power of 0 detection circuit 6 is a circuit that inputs the divisor held in the register 2, determines whether the input value is a power of 10, and outputs the result. selector 7 is 10
It has a function of inputting the outputs from the base/divider circuit 5 and the shifter 5 and switching between them using the output of the power of 10 detection circuit 6. Register 8 holds the output of selector 7.

ここで動作の説明の前に、まずシフトカウント生成回路
5と10の冪乗検出回路6の説明を行なう。第3図(1
)はシフトカウント生成回路5の入力と出力の値の関係
を示している。ここでは入力(除数)が10の冪乗かど
うかにかかわらず出力として入力の下位桁からの10進
表記された”ONの個数を出力としている。第3図(2
)ldlOの幕乗検出回路乙の入力と出力の値の関係を
示している。ここでは入力(除数)が10の幕柔か否か
ヲ判定しその結果を出力している。
Before explaining the operation, the shift count generation circuit 5 and the power of 10 detection circuit 6 will be explained first. Figure 3 (1
) shows the relationship between the input and output values of the shift count generation circuit 5. Here, regardless of whether the input (divisor) is a power of 10 or not, the output is the number of "ONs" expressed in decimal from the lower digits of the input.
) It shows the relationship between the input and output values of the curtain riding detection circuit B of ldlO. Here, it is determined whether the input (divisor) is equal to or less than 10, and the result is output.

次に2全体の動作について説明する。Next, the overall operation of 2 will be explained.

まず、レジスタ1とレジスタ2にそれぞれ被除数、除数
が保持される。ここで、除数が10の軍乗であった場合
は、被除数をシフタ4で数ビツトシフトを行った結果が
次のサイクルでセレクタ7を通してレジスタ8に保持さ
れる。−方、除数が10の幕乗でない場合は、従来の手
法による10進除算回路5の演算結果がセレクタ7を通
してレジスタ8に、数十サイクル後に保持されることに
なる。これらの場合の入力。
First, a dividend and a divisor are held in register 1 and register 2, respectively. If the divisor is a power of 10, the shifter 4 shifts the dividend by several bits and the result is held in the register 8 through the selector 7 in the next cycle. On the other hand, if the divisor is not a multiplication of 10, the result of the operation of the decimal division circuit 5 according to the conventional method is stored in the register 8 through the selector 7 after several tens of cycles. Input for these cases.

出カバターンを第4図(すべて10進表記)に示す。The output pattern is shown in Figure 4 (all in decimal notation).

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

本発明は以上説明したように、10進除算回路のほかに
、除数が10の冪乗であることを検出する10の幕乗検
出回路と、前記除数に応答して前記被除数を右シフトす
るシフト回路と。
As described above, the present invention includes, in addition to the decimal division circuit, a 10 curtain multiplication detection circuit that detects that the divisor is a power of 10, and a shifter that shifts the dividend to the right in response to the divisor. with the circuit.

前記10の幕乗検出回路の出力で前記10進除算回路と
前記シフト回路との出力を選択する回路とを設けること
により、除数が10の幕乗の場合に、演算サイクルを1
サイクルに短縮できるという効果がある。
By providing a circuit that selects the output of the decimal division circuit and the shift circuit based on the output of the 10 curtain multiplication detection circuit, when the divisor is a curtain multiplication of 10, the calculation cycle can be reduced to 1.
This has the effect of shortening the cycle.

以下余0remainder 0

【図面の簡単な説明】 第1図は本発明の一実施例の構成図、第2図は従来の方
法の一例を示すフローチャート、第3図は第1図中のシ
フトカウント生成回路および10の幕乗検出回路の入出
力関係の説明図。 第4図は第1図の構成を用いた場合の動作説明図である
。 記号の説明二1,2・・・レジスタ、3・・・10進除
算回路、4・・・シフタ、5・・・シフトカウント生成
回路、6・・・10の幕乗検出回路、7・・・セレクタ
、8・・・レジスタ。 第1 図 第2図 第3図 (1) (2)
[BRIEF DESCRIPTION OF THE DRAWINGS] FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a flowchart showing an example of a conventional method, and FIG. 3 shows the shift count generation circuit and 10 in FIG. FIG. 3 is an explanatory diagram of the input/output relationship of the curtain riding detection circuit. FIG. 4 is an explanatory diagram of the operation when the configuration of FIG. 1 is used. Explanation of symbols 21, 2...Register, 3...Decimal division circuit, 4...Shifter, 5...Shift count generation circuit, 6...10 curtain multiplication detection circuit, 7...・Selector, 8...Register. Figure 1 Figure 2 Figure 3 (1) (2)

Claims (1)

【特許請求の範囲】[Claims] 1、10進除算命令を有する情報処理装置において、与
えられた被除数と除数から商及び剰余を算出する10進
除算回路と、前記除数が10の冪乗であることを検出す
る10の冪乗検出回路と、前記除数に応答して前記被除
数を右シフトするシフト回路と、前記10の冪乗検出回
路の出力で前記10進除算回路と前記シフト回路との出
力を選択する回路とを含むことを特徴とする10進除算
器。
1. In an information processing device having a decimal division instruction, a decimal division circuit that calculates a quotient and a remainder from a given dividend and divisor, and a power of 10 detection that detects that the divisor is a power of 10. a shift circuit that shifts the dividend to the right in response to the divisor, and a circuit that selects the output of the decimal division circuit and the shift circuit based on the output of the power of 10 detection circuit. Characteristic decimal divider.
JP22092589A 1989-08-28 1989-08-28 Decimal divider Pending JPH0383127A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22092589A JPH0383127A (en) 1989-08-28 1989-08-28 Decimal divider

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22092589A JPH0383127A (en) 1989-08-28 1989-08-28 Decimal divider

Publications (1)

Publication Number Publication Date
JPH0383127A true JPH0383127A (en) 1991-04-09

Family

ID=16758703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22092589A Pending JPH0383127A (en) 1989-08-28 1989-08-28 Decimal divider

Country Status (1)

Country Link
JP (1) JPH0383127A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10127015B2 (en) 2016-09-30 2018-11-13 International Business Machines Corporation Decimal multiply and shift instruction
US10235137B2 (en) 2016-09-30 2019-03-19 International Business Machines Corporation Decimal shift and divide instruction
US10385171B2 (en) 2014-09-09 2019-08-20 Toyo Seikan Group Holdings, Ltd. Powder comprising hydrolyzable resin particles
US11669304B2 (en) 2021-02-08 2023-06-06 Kioxia Corporation Arithmetic device and arithmetic circuit for performing multiplication and division

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10385171B2 (en) 2014-09-09 2019-08-20 Toyo Seikan Group Holdings, Ltd. Powder comprising hydrolyzable resin particles
US10127015B2 (en) 2016-09-30 2018-11-13 International Business Machines Corporation Decimal multiply and shift instruction
US10235137B2 (en) 2016-09-30 2019-03-19 International Business Machines Corporation Decimal shift and divide instruction
US10241757B2 (en) 2016-09-30 2019-03-26 International Business Machines Corporation Decimal shift and divide instruction
US10331408B2 (en) 2016-09-30 2019-06-25 International Business Machines Corporation Decimal multiply and shift instruction
US11669304B2 (en) 2021-02-08 2023-06-06 Kioxia Corporation Arithmetic device and arithmetic circuit for performing multiplication and division

Similar Documents

Publication Publication Date Title
US7236995B2 (en) Data processing apparatus and method for converting a number between fixed-point and floating-point representations
KR950006580B1 (en) Divisional operation system
JP2502836B2 (en) Preprocessing device for division circuit
JPH0383127A (en) Decimal divider
JPH0346024A (en) Floating point computing element
JPH07239774A (en) Method and device for division
JPS58132837A (en) Divider
JPH0315942A (en) Divider
CA1173164A (en) Fraction calculator
KR100918815B1 (en) Arithmetic apparatus of micro processor
KR100198783B1 (en) Driving method of serial operating divider
JP2664750B2 (en) Arithmetic device and arithmetic processing method
JPS61224036A (en) Arithmetic unit
JPH04160533A (en) Microprocessor
JP2591250B2 (en) Data processing device
KR100251547B1 (en) Digital signal processor
JPH11110213A (en) Computing unit
JPH02252023A (en) Divider for executing division by subtracting method or retracting method algorism
JPS5941122B2 (en) Inch/millimeter data conversion method
JPH0553759A (en) Fixed decimal point arithmetic unit
JPH04148231A (en) Arithmetic circuit
JPH025128A (en) Dividing circuit
JPH01237831A (en) Divider
JPS60186933A (en) Binary-coded decimal multiplication system
JPH03188523A (en) Multiplying circuit