JPS6155690B2 - - Google Patents

Info

Publication number
JPS6155690B2
JPS6155690B2 JP56104831A JP10483181A JPS6155690B2 JP S6155690 B2 JPS6155690 B2 JP S6155690B2 JP 56104831 A JP56104831 A JP 56104831A JP 10483181 A JP10483181 A JP 10483181A JP S6155690 B2 JPS6155690 B2 JP S6155690B2
Authority
JP
Japan
Prior art keywords
circuit
code
binary coded
decimal number
decimal
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.)
Expired
Application number
JP56104831A
Other languages
Japanese (ja)
Other versions
JPS585842A (en
Inventor
Keiichi Suzuki
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
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP56104831A priority Critical patent/JPS585842A/en
Publication of JPS585842A publication Critical patent/JPS585842A/en
Publication of JPS6155690B2 publication Critical patent/JPS6155690B2/ja
Granted 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/491Computations with decimal numbers radix 12 or 20.
    • G06F7/4915Multiplying; Dividing

Landscapes

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

Description

【発明の詳細な説明】 本発明はデータ処理装置における10進演算装置
に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a decimal arithmetic device in a data processing device.

従来、10進演算で特に10進乗除算および10進2
進変換、2進10進変換では10進数の倍数を作成す
るために、10進加算減算のできる演算器を何度か
通したり、限られた倍数発生回路を通したものを
演算器の入力としていた。したがつて目的とする
演算結果を得るまで多くの処理ステツプを必要と
するという欠点があつた。
Traditionally, decimal operations, especially decimal multiplication and division and decimal 2
In decimal conversion and binary/decimal conversion, in order to create multiples of a decimal number, the number is passed through an arithmetic unit that can perform decimal addition and subtraction several times, or the result that is passed through a limited multiple generation circuit is used as input to the arithmetic unit. there was. Therefore, it has the disadvantage that many processing steps are required until the desired calculation result is obtained.

本発明の目的は高速に動作する10進演算装置を
提供することにある。
An object of the present invention is to provide a decimal arithmetic device that operates at high speed.

前記目的を達成するために、本発明による10進
演算装置は、2進化10進数を8421コードから5421
コードに変換した後、左へ1ビツトシフトするこ
とにより2進化10進数を2倍にする2進化10進数
2倍回路を複数段縦続接続した回路、また2進化
10進数を右へシフトした後、5421コードから8421
コードへ変換することにより2進化10進数を1/2
倍にする2進化10進数1/2倍回路を複数段縦続接
続した回路のいずれかまたは前記2進化10進数2
倍回路および2進化10進数1/2倍回路それぞれの
複数段縦続回路双方を備えた回路と、前記2進化
10進数2倍回路または2進化10進数1/2倍回路の
各段の2±n倍出力を入力とし、倍数指定情報に
より前記2±n倍出力のいずれかを選択して出力
する倍数選択回路とから構成してある。
In order to achieve the above object, a decimal arithmetic device according to the present invention converts a binary coded decimal number from 8421 code to 5421 code.
A circuit in which multiple stages of binary coded decimal doubling circuits are connected in cascade, which doubles the binary coded decimal number by shifting it one bit to the left after converting it to a code, or a binary coded decimal number doubling circuit.
After shifting the decimal number to the right, the 5421 code becomes 8421
1/2 binary coded decimal number by converting it to code
Any of the circuits in which multiple stages of binary coded decimal number 1/2 times circuits are connected in cascade, or the binary coded decimal number 2 that doubles the number
A circuit equipped with both multi-stage cascade circuits of a doubler circuit and a binary coded decimal 1/2 doubler circuit, and
A multiple selection circuit that takes as input the 2 ±n times the output of each stage of the decimal number doubler circuit or the binary coded decimal number 1/2 times circuit, and selects and outputs either of the above 2 ±n times the output based on the multiple specification information. It is composed of.

前記構成によれば本発明の目的は完全に達成で
きる。
According to the above structure, the object of the present invention can be completely achieved.

以下、図面を参照して本発明をさらに詳しく説
明する。
Hereinafter, the present invention will be explained in more detail with reference to the drawings.

第1図に本発明の基本となる回路の実施例を示
す。第1図aは10進数1桁に対し8421コードから
5421コードにコード変換し左1ビツトシフトした
10進2倍回路を表わし、第1図bは右1ビツトシ
フトした後、5421コードから8421コードにコード
変換した10進1/2倍回路を表わしている、第1図
cは8421コードと5421コードの変換表、下式はそ
の論理式である。
FIG. 1 shows an embodiment of a circuit that is the basis of the present invention. Figure 1 a is from 8421 code for 1 decimal digit
Code converted to 5421 code and shifted 1 bit to the left.
Figure 1b shows a decimal 1/2 circuit that has been shifted one bit to the right and converted the code from 5421 code to 8421 code. Figure 1c shows the 8421 code and 5421 code. The conversion table and the formula below are its logical formulas.

b0=a0+a1a2+a1a3 b1=a0a3+a1 b2=a2a3+a0 1a2 b3 1a3+a1a2 +a0 a0=b0b1+b0b2b3 a10b1+b0 +b0b2 a20b2+b0 2b3+b2 a3=b0 0b3 入力する10進数は0〜9までであるので、10以
上の8421コードに対する5421コードは使用しな
い。したがつて論理式は10進数0〜9までに対し
て成立する。第1図cで示されるように、8421コ
ードで入力した2進化10進数は、前述の論理式で
構成した変換回路を通り、5421コードに変換され
る。
b 0 = a 0 + a 1 a 2 + a 1 a 3 b 1 = a 0 a 3 + a 1 2 3 b 2 = a 2 a 3 + a 0 3 + 1 a 2 b 3 = 0 1 a 3 + a 1 a 2 3 +a 0 3 a 0 =b 0 b 1 +b 0 b 2 b 3 a 1 = 0 b 1 +b 0 1 2 +b 0 b 2 3 a 2 = 0 b 2 +b 0 2 b 3 +b 2 3 a 3 = b 0 3 + 0 b 3 Since the decimal numbers to be input are from 0 to 9, 5421 codes for 8421 codes of 10 or more are not used. Therefore, the logical formula holds true for decimal numbers 0 to 9. As shown in FIG. 1c, a binary coded decimal number input in 8421 code passes through a conversion circuit constructed using the above-mentioned logical formula and is converted into 5421 code.

この8421コードと5421コードは次のような特徴
がある。
The 8421 code and 5421 code have the following characteristics.

第1に5421コードの最上位ビツトb0は、入力の
2進化10進数(8421コード)を2倍したときの上
位の桁への桁上がりが正しく発生できる。
First, the most significant bit b0 of the 5421 code can be correctly carried to a higher digit when the input binary coded decimal number (8421 code) is doubled.

第2の5421コードの下位ビツトb1,b2,b3はそ
のまま1ビツト左シフトしたとき、入力の2進化
10進数(8421コード)の2倍した値が発生でき
る。
When the lower bits b 1 , b 2 , b 3 of the second 5421 code are shifted to the left by 1 bit, the input binary code is
A value that is twice the decimal number (8421 code) can be generated.

第3に左1ビツトシフトしたとき、5421コード
のb3のさらに下位の1ビツトシフトはシフトによ
り空白になる。
Thirdly, when shifting 1 bit to the left, the lower 1 bit shift of b3 of the 5421 code becomes blank due to the shift.

通常この位置に下位桁からの桁上がりが挿入さ
れる。下位桁が存在しない場合0に固定しておけ
ばよい。
Normally, a carry from the lower digit is inserted at this position. If there is no lower digit, it may be fixed to 0.

第4に上位桁への桁上りおよび下位桁からの桁
上りは最大でも1であるから1ビツト左シフトで
よい。以上の特徴から、この2倍回路を複数段接
続することにより、各段での出力が始めに入力し
た2進化10進数の2n倍となつてあらわれる。
Fourth, since the carry to the upper digit and the carry from the lower digit are at most 1, a 1-bit left shift is sufficient. From the above characteristics, by connecting multiple stages of this doubling circuit, the output at each stage will appear as 2 n times the binary coded decimal number input at the beginning.

以上2倍回路に関して述べたが1/2倍回路も同
様で、2倍回路時の構成を全く逆転した場合と考
えられる。
The above description was about the double circuit, but the same applies to the 1/2 circuit, and it can be considered that the configuration of the double circuit is completely reversed.

第2図は前記2倍回路1および1/2倍回路2を
基に倍数発生を行なう回路の実施例である。それ
ぞれ4段積み上げ、×1、×2、×4、×8、×16、×
1/2、×1/4、×1/8、×1/16を発生している各倍数
は、倍数選択回路3で外部からの指定で選択され
出力される。各段で1ビツトシフトにより外から
入力する端子および外に出力する端子があるがこ
れは10進数複数桁の処理を行なうときに隣接する
桁に接続するものである。第3図は10進数3桁の
場合の接続した構成を表わしている。
FIG. 2 shows an embodiment of a circuit that generates multiples based on the doubling circuit 1 and the 1/2 multiplying circuit 2. Stacked in 4 layers each, ×1, ×2, ×4, ×8, ×16, ×
The multiples generating 1/2, ×1/4, ×1/8, and ×1/16 are selected and output by the multiple selection circuit 3 according to external specifications. Each stage has a terminal for inputting from the outside and a terminal for outputting to the outside by a 1-bit shift, and these are connected to adjacent digits when processing multiple decimal digits. FIG. 3 shows a connected configuration for a three-digit decimal number.

次に第2図を基に動作を順を追つて説明する。
倍数を発生した10進数1桁が入力されると2倍回
路1で8421コードから5421コードに変換され、左
1ビツトシフトすることにより、10進数で2倍さ
れる。さらに2段目出力で4倍、3段目出力で8
倍、4段目出力で16倍される。
Next, the operation will be explained step by step based on FIG.
When a 1-digit decimal number that generates a multiple is input, it is converted from an 8421 code to a 5421 code in the doubling circuit 1, and by shifting the code 1 bit to the left, the decimal number is doubled. Furthermore, the second stage output is 4 times, and the third stage output is 8 times
It is multiplied by 16 at the 4th stage output.

一方、前記の倍数を発生したい10進数1桁を1
ビツト右シフトした後、1/2倍回路2で5421コー
ドから8421コードにコード変換することにより、
10進数で1/2倍された値が出力される。2段目出
力で1/4倍、3段目出力で1/8倍、4段目出力で1/
16倍された値が発生する。各倍数で発生された値
は、倍数選択回路3に集められ、外部からの倍数
指示により希望する倍数を発生する、第3図は、
第2図の回路を3個、桁方向に並べ接続した場合
の10進数3桁の倍数発生回路である。さらに大き
な複数桁の倍数発生回路を構成するには同様に桁
方向に拡張することにより可能である。
On the other hand, add 1 digit of the decimal number for which you want to generate the above multiple.
After shifting the bits to the right, 1/2 circuit 2 converts the code from 5421 code to 8421 code.
The value multiplied by 1/2 in decimal is output. 1/4 times the 2nd stage output, 1/8 times the 3rd stage output, 1/4 times the 4th stage output
A value multiplied by 16 is generated. The values generated by each multiple are collected in the multiple selection circuit 3, and the desired multiple is generated according to an external multiple instruction.
This is a multiple generation circuit for a three-digit decimal number when three of the circuits shown in FIG. 2 are connected in the digit direction. An even larger multi-digit multiple generation circuit can be constructed by expanding in the digit direction.

本実施例では倍数は16倍、および1/16倍である
が、さらに、10進2倍回路、および10進1/2倍回
路を積み重ねることにより、多くの倍数発生が可
能である。
In this embodiment, the multiples are 16 times and 1/16 times, but many multiples can be generated by stacking decimal 2x circuits and decimal 1/2x circuits.

以上、詳しく説明したように本発明によれば10
進数の倍数発生を10進2倍回路および1/2倍回路
を複数個積み上げ、複数通りの倍数を発生し、外
部からの指示で選択することにより、10進演算の
高速化が可能となる。
As explained in detail above, according to the present invention, 10
Decimal calculation speed can be increased by stacking multiple decimal double circuits and 1/2 double circuits to generate multiples of decimal numbers, generate multiples, and select based on external instructions.

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

第1図aは10進2倍回路の回路図、同図bは10
進1/2倍回路の回路図、同図cは8421コードから
5421コードへの変換表を示す図、第2図は本発明
による10進演算装置の一実施例を示す回路図で10
進数1桁に対して倍数発生を行なう場合の例であ
る。第3図は本発明の他の実施例を示す回路図
で、10進数3桁に対して倍数発生を行なう場合の
例である。 1……10進2倍回路、2……10進1/2倍回路、
3……倍数選択回路。
Figure 1a is a circuit diagram of a decimal doubler circuit, and Figure 1b is a circuit diagram of a decimal doubler circuit.
Schematic diagram of hex 1/2 circuit, figure c is from 8421 code
Figure 2 is a circuit diagram showing an embodiment of the decimal arithmetic device according to the present invention.
This is an example of generating multiples for a single digit of a base number. FIG. 3 is a circuit diagram showing another embodiment of the present invention, in which multiples are generated for a three-digit decimal number. 1...Decimal double circuit, 2...Decimal 1/2 times circuit,
3...Multiple selection circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 2進化10進数を8421コードから5421コードに
変換した後、左へ1ビツトシフトすることにより
2進化10進数を2倍にする2進化10進数2倍回路
を複数段縦続接続した回路、または2進化10進数
を右へシフトした後、5421コードから8421コード
へ変換することにより2進化10進数を1/2倍にす
る2進化10進数1/2倍回路を複数段縦続接続した
回路のいずれかまたは前記2進化10進数2倍回路
および2進化10進数1/2倍回路それぞれの複数段
縦続回路双方を備えた回路と、前記2進化10進数
2倍回路または2進化10進数1/2倍回路の各段の
±n倍出力を入力とし、倍数指定情報により前
記2±n倍出力のいずれかを選択して出力する倍
数選択回路とから構成したことを特徴とする10進
演算装置。
1 A circuit in which multiple stages of binary coded decimal number doubling circuits are connected in cascade, or a binary coded decimal number doubling circuit that doubles the binary coded decimal number by converting the binary coded decimal number from 8421 code to 5421 code and then shifting it one bit to the left. Either one of the circuits in which multiple stages of binary coded decimal 1/2 times circuits are connected in cascade, which doubles the binary coded decimal number by 1/2 by shifting the decimal number to the right and converting it from 5421 code to 8421 code. A circuit comprising both multi-stage cascade circuits of the binary coded decimal number double circuit and the binary coded decimal number 1/2 time circuit, and the binary coded decimal number double circuit or the binary coded decimal number 1/2 time circuit. 1. A decimal arithmetic device comprising: a multiple selection circuit which receives the 2 ±n times the output of each stage as input and selects and outputs one of the 2 ±n times the output based on multiple designation information.
JP56104831A 1981-07-03 1981-07-03 Decimal operation unit Granted JPS585842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56104831A JPS585842A (en) 1981-07-03 1981-07-03 Decimal operation unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56104831A JPS585842A (en) 1981-07-03 1981-07-03 Decimal operation unit

Publications (2)

Publication Number Publication Date
JPS585842A JPS585842A (en) 1983-01-13
JPS6155690B2 true JPS6155690B2 (en) 1986-11-28

Family

ID=14391317

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56104831A Granted JPS585842A (en) 1981-07-03 1981-07-03 Decimal operation unit

Country Status (1)

Country Link
JP (1) JPS585842A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60189375A (en) * 1984-03-08 1985-09-26 Sony Corp Video signal processing method
CN110169200B (en) 2017-01-10 2021-10-19 松下电器产业株式会社 Electromagnetic field distribution adjusting device and microwave heating device

Also Published As

Publication number Publication date
JPS585842A (en) 1983-01-13

Similar Documents

Publication Publication Date Title
JPH04245712A (en) Digital filter
JPH0370411B2 (en)
JPS6155690B2 (en)
US4325056A (en) BCD To binary converter
JPS5841532B2 (en) Sekiwa Keisan Cairo
US3943350A (en) Radix converter utilizing automata
JPS6218931B2 (en)
JPS592935B2 (en) multiplication circuit
JP3230354B2 (en) High-speed decimal multiplier
JP2524035Y2 (en) Multiplier for convolution arithmetic circuit
JP3433487B2 (en) Binary to decimal converter
JPH01116826A (en) Decimal multiplier
JP3241642B2 (en) Binary-decimal conversion circuit
JPH04263317A (en) Arithmetic device
JP2003060617A (en) Code generator
JP2928027B2 (en) Decimal-binary conversion circuit
JPH0720047B2 (en) Digital Filter
SU1418731A1 (en) Device for rearrangement of natural number series and zero
JPS58119047A (en) Decimal multiplier and divider
JP2004295345A (en) Arithmetic unit and multiplying unit
JPS61105123A (en) Decoding operation circuit of error correction code
JP2002222078A (en) Binary-decimal conversion circuit and its method
JPH0331015B2 (en)
JPH05324274A (en) Binary/decimal converter
JPS59177645A (en) Binary-decimal converting system