JPS59177645A - Binary-decimal converting system - Google Patents
Binary-decimal converting systemInfo
- Publication number
- JPS59177645A JPS59177645A JP5294783A JP5294783A JPS59177645A JP S59177645 A JPS59177645 A JP S59177645A JP 5294783 A JP5294783 A JP 5294783A JP 5294783 A JP5294783 A JP 5294783A JP S59177645 A JPS59177645 A JP S59177645A
- Authority
- JP
- Japan
- Prior art keywords
- data
- decimal
- binary
- bit
- register
- 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
Links
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M7/00—Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
- H03M7/02—Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word
- H03M7/06—Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word the radix thereof being a positive integer different from two
- H03M7/08—Conversion to or from weighted codes, i.e. the weight given to a digit depending on the position of the digit within the block or code word the radix thereof being a positive integer different from two the radix being ten, i.e. pure decimal code
Abstract
Description
【発明の詳細な説明】
本発明はマイクロプログラム制御データ処理装置により
2進形態データ(以下2進テータと称す)を2進化10
進形態データ(以下10進データと称す)に変換する2
進10進変換方式に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention converts binary form data (hereinafter referred to as binary data) into binary code 10 by using a microprogram controlled data processing device.
Convert to decimal format data (hereinafter referred to as decimal data) 2
Regarding the base-decimal conversion method.
従来の2進10進変換は、2進データの各ビットを検査
することにより行なっている。すなわち、最初に、2進
データの最上位ビットの内容を2倍してレジスタ等の適
轟な記憶手段に格納し、次に1最上位ビットの次のビラ
トラ前記記憶手段の内容) 進データが得られる。Conventional binary-to-decimal conversion is performed by examining each bit of binary data. That is, first, the content of the most significant bit of the binary data is doubled and stored in a suitable storage means such as a register, and then the content of the storage means next to the most significant bit is doubled. can get.
しかしながら、このような従来の変換方式は、2進デー
タがn(正整数)ビットとすると、n回の乗算および加
算動作が演算装置に徴求される。However, in such a conventional conversion method, if the binary data is n (positive integer) bits, an arithmetic unit is required to perform n multiplication and addition operations.
このため、変換動作を制御するためのマイクロプログラ
ムのステップ数が多くなり、演算速度および処理時間の
低下金招くという欠点がある。Therefore, the number of steps in the microprogram for controlling the conversion operation increases, resulting in a decrease in calculation speed and processing time.
本発明の目的に2、上述の欠点を除去した2進10進変
換方式を提供することにある。The second object of the present invention is to provide a binary-to-decimal conversion method that eliminates the above-mentioned drawbacks.
本発明の方式は、2進形態データから2進化10進形態
データに変換する2進10進変換方式において、予め定
めたビット数をそれぞれ有する複数のビット部分を持つ
2進形態データを格納する第1の格納手段と、前記2進
形態データ内の複数のビット部分のうちの一つを選択す
る選択手段と、この選択されたビット部分が前記2進形
態データ内のどの部分かを示すビット部分位置表示手段
と、前記選択きれたビット部分を前記表示手段の茨示に
基づいて2進化10進形態データに変換する艮換手段と
、10進の加請を行なう加算手段とを倫え、前記各ビッ
ト部分毎に10進形態データへの変換を行ない各変換結
果を加算することにより2進形態テータへの変換を行な
う。The system of the present invention is a binary-to-decimal conversion method for converting binary format data into binary coded decimal format data. 1 storage means, selection means for selecting one of a plurality of bit parts within the binary data, and a bit part indicating which part of the binary data the selected bit part is. a position display means, a conversion means for converting the selected bit portion into binary coded decimal format data based on the indication of the display means, and an addition means for adding decimal data, Each bit portion is converted into decimal form data and the conversion results are added to perform conversion into binary form data.
次に本発明に・りいて図面を参照して詳細に説明する。Next, the present invention will be explained in detail with reference to the drawings.
第1図は本発明の一実施例を示す図である。ここでは、
−例として、16ビツトの2進データを10進データに
変換する場合について説明する。FIG. 1 is a diagram showing an embodiment of the present invention. here,
- As an example, a case will be explained in which 16-bit binary data is converted to decimal data.
2進データが16ビツトであるため、これを10進数に
変換すると最大5桁となる。1o進データにおいては、
10進数の1桁が4ビツトで表現されるので、4(ビッ
ト)×5(桁)=20ビットが必要となる。ここでは、
20ビツトにて処理できるよう各内部バスを20ビツト
構成としCいる。Since the binary data is 16 bits, converting it to a decimal number results in a maximum of 5 digits. In 1o base data,
Since one decimal digit is represented by 4 bits, 4 (bits) x 5 (digits) = 20 bits are required. here,
Each internal bus has a 20-bit configuration so that 20-bit processing can be performed.
10進加算器17の一方の入力には、選択回路16を介
して変換回路13の出力が与えられる。複数の20ビツ
トのレジスタを持つレジスタファイル14および15は
マイクロプログラムにより、そのレジスタのアドレス指
定、読出しおよび書込みの制御が行なわれる。シフタ1
8は、本実施例では、4ビット単位でのビットシフトを
行なう。カウンタ10およびカウンタ10を制御するカ
ウンタ制御回路11はマイクロプログラムにより制御さ
れ、カウンタ10の下位2ビツトが変換回路13に入力
される。レジスタファイル14には変換すべき16ビツ
ト2進データが予め格納されている。The output of the conversion circuit 13 is applied to one input of the decimal adder 17 via the selection circuit 16. Register files 14 and 15 having a plurality of 20-bit registers are controlled by a microprogram for addressing, reading and writing of the registers. shifter 1
8 performs bit shift in units of 4 bits in this embodiment. A counter 10 and a counter control circuit 11 that controls the counter 10 are controlled by a microprogram, and the lower two bits of the counter 10 are input to a conversion circuit 13. The register file 14 stores in advance 16-bit binary data to be converted.
変換回路13rl:耽出し専用メモリ(ROM)で構成
され、その内容の概要を第2図に示す。Conversion circuit 13rl: Consists of a memory only for entertainment (ROM), and an outline of its contents is shown in FIG.
第2図において、■欄はカウンタ10からの2ビツト入
力(C欄)とラッチ回路12からの4ビツト入力(Pa
:16進数表示しである)とにより表現されるアドレス
を示す。またO欄はROMの各アドレスの内容を示す。In FIG. 2, the ■ column shows the 2-bit input from the counter 10 (C column) and the 4-bit input from the latch circuit 12 (Pa
: indicates an address expressed in hexadecimal notation). Further, column O shows the contents of each address of the ROM.
0欄は説明の便宜上、4ビツト毎に5つに分割し゛C内
容を10進で表現しである。ROMの各アドレスの内容
は次のようにして決めCある。ここで、P欄の内容vi
(1゜進表現したもの)、D掴の内容をDi(10進表
現したもの)とする。For convenience of explanation, the 0 column is divided into 5 parts every 4 bits and the contents of C are expressed in decimal notation. The contents of each address in the ROM are determined as follows. Here, the contents of column P vi
(expressed in decimal notation), and the content of the D grab is Di (expressed in decimal notation).
■欄の内容が(oooooo)〜(001111)の場
合:Di=i
■欄の内容が(010000)〜(011111)の場
合:Di=iX16
■欄の内容が(1ooooo)〜(101111)の場
合:Di=iX162
■欄の内容が(110000)〜(111111)の場
合:Di=iX163
タフアイル14に格納されCいる2進データを選択回路
16および10進加算回路17を介してシフタ18に転
送する。次に、7フタ18内の最下位ビットから4ビツ
トをラッチ回路12に転送する。さらに、(2)部分和
を格納するためのレジスタファイル15内のレジスタの
内容eQにする。次に、(3)ラッチ回路12およびカ
ウンタ10の内容によ!lll変換回路13内の対応す
るアドレスをアクセスし、その内容とレジスタファイル
15の内容とを加算器17により10進加算し、加算結
果を7フタ18を介してレジスタファイル15に格納す
るとともにカウンタ10をカウントアツプする。■If the contents of the column are (oooooo) to (001111): Di=i ■If the contents of the column are (010000) to (011111): Di=iX16 If the contents of the ■ column are (1ooooo) to (101111) :Di=iX162 When the contents of the ■ column are (110000) to (111111): Di=iX163 Transfer the binary data C stored in the tough aisle 14 to the shifter 18 via the selection circuit 16 and the decimal addition circuit 17. . Next, four bits starting from the least significant bit in the seven-folder 18 are transferred to the latch circuit 12. Furthermore, (2) the contents eQ of the register in the register file 15 for storing the partial sum are set. Next, (3) depending on the contents of the latch circuit 12 and counter 10! The corresponding address in the llll conversion circuit 13 is accessed, the contents thereof and the contents of the register file 15 are added in decimal form by the adder 17, and the addition result is stored in the register file 15 via the 7-cap 18, and the counter 10 count up.
次に、(4)同じ2進データをレジスタファイル14か
らシフタ18に査度転送し、(5)シフタ18内で最下
位ビット方向に4ビツトシフトしたあと、(6)最下位
ビットから4ビツトをラッチ回路12に転送する。さら
に、(7)ラッテ回路12およびカウンタlOの内容に
より変換回路13内の対応するアドレスをアクセスし、
その内容とレジスタファイル15の内容とを加算器17
により10進加鏝、し、加賀−結果をシフタ18を介し
゛Cレジスタファイル15に格納するとともにカウンタ
10金カウントアンプする。次に、(7)前記(4)の
動作を行ったあとシック18内で最下位ビットカ向に8
ビツトシフトシ、前記(6)および(7)の動作を行う
。さらに、(8)前記(4)の動作を行ったあとシフタ
18内で最″下位ビット方向に12ビツトシフトし、前
記(6)および(7)の動作を行う。Next, (4) the same binary data is transferred from the register file 14 to the shifter 18, (5) it is shifted 4 bits in the direction of the least significant bit in the shifter 18, and (6) the 4 bits are shifted from the least significant bit. The data is transferred to the latch circuit 12. Furthermore, (7) access the corresponding address in the conversion circuit 13 according to the contents of the latte circuit 12 and the counter IO,
Adder 17 adds the contents and the contents of register file 15.
Then, the result is stored in the C register file 15 via the shifter 18, and the counter amplifies the decimal count. (7) After performing the operation in (4) above, move 8 to the least significant bit in thick 18.
The bit shifter performs the operations (6) and (7) above. Furthermore, (8) after performing the operation in (4) above, the shifter 18 shifts 12 bits in the direction of the least significant bit, and performs the operations in (6) and (7) above.
以上の動作を完了すると、レジスタファイル15内に2
進データを10進データに変換した値が得られる。After completing the above operations, 2 files will be created in the register file 15.
A value obtained by converting decimal data into decimal data is obtained.
なお、本芙施例においては、10進加q−をイテう毎に
レジスタファイル14内から2進テータをシック18に
転送したが、シフタ18とは別に他のシックを設けて、
10進加算毎の2進データの転送を省略できるよう構成
してもよい。In this embodiment, the binary data is transferred from the register file 14 to the chic 18 every time the decimal addition q- is iterated, but another chic is provided separately from the shifter 18.
It may be configured such that the transfer of binary data for each decimal addition can be omitted.
以上、本発明には、nビットの2進テ一クfmビット卑
位に分割しこれを10進データに変換することにより、
従来必要としたn回の演算か蚕回で可能となり、演算速
度の向上?:達成できるという効果がある。As described above, in the present invention, by dividing n-bit binary tech into fm bits low-order and converting this into decimal data,
Is it possible to improve the calculation speed by performing the n-time calculations that were previously required? : It has the effect of being achievable.
第1図は本発明の一実施例を示すブロック図および第2
図は変換回路13の内容を示す表である。
図において、10・・・・・・カウンタ、11・・・・
・・カウンタコントロール、12・・・・・・ラッチ回
路、13・・・19.変換回路、1.4.15・・・・
・・レジスタファイル、16・・・・・・選択回路、1
7・・・・・・10進加算器、18°°°°゛シフタ。
手続補正書(方式)
1.事件の表示 昭和58年 特 許願第5294
7号2、発明の名称 2進10進変換方式3、補正を
する者
事件との関係 出 願 人東京都港区芝五
J−1”l 33番1号(423) 日本電気株式
会社
代表者 関本忠弘
4、代理人
〒108 東京都港区芝五丁I工137番8号 住友
三Fllビル1」本電気株式会社内
(6591) 弁理士 内 原 晋□電話 東京
(03) 456−31.1.1 (大代表)゛・(連
絡先 11本電気株式会社i1・計部)6、補正の対象
明細書の「図面の簡単な説明」の欄
L 補正の内容
1図面の簡単な説明」の欄
第8頁第6行目の記載1表である」を「図である」と訂
正します。FIG. 1 is a block diagram showing one embodiment of the present invention, and FIG.
The figure is a table showing the contents of the conversion circuit 13. In the figure, 10...counter, 11...
...Counter control, 12...Latch circuit, 13...19. Conversion circuit, 1.4.15...
...Register file, 16...Selection circuit, 1
7... Decimal adder, 18°°°° shifter. Procedural amendment (formality) 1. Display of incident 1982 Patent Application No. 5294
No. 7 No. 2, Title of the invention Binary-decimal conversion method 3, Relationship with the case of the person making the amendment Applicant No. 33-1 (423) Shibago J-1”l, Minato-ku, Tokyo Representative of NEC Corporation Tadahiro Sekimoto 4, Agent Address: 137-8 Shiba 5-chome I-Ko, Minato-ku, Tokyo 108 Sumitomo 3F Building 1, Hondenki Co., Ltd. (6591) Patent Attorney Susumu Uchihara Telephone: Tokyo (03) 456-31. 1.1 (Main representative) ゛・(Contact information: 11 Hondenki Co., Ltd. i1・Kaitobu) 6. Column L of “Brief explanation of drawings” in the specification subject to amendment Contents of amendment 1 Brief explanation of drawings” In column 8, page 8, line 6, the statement ``It is a table'' is corrected to ``It is a diagram.''
Claims (1)
2進10進変換方式において、予め定めたビット数をそ
れぞれ有する複数のビット部分を持つ2進形態データを
格納する格納手段と、前記2進形態データ内の複数のビ
ット部分のうちの一つを選択する選択手段と、この選択
されたビット部分が前記2進形態データ内のどの部分か
を示すビット部分位置表示手段と、前記選択されたビッ
ト部分を前記表示手段の表示に基づいて2進化1(進形
態データに変換する変換手段と、10進の加算を行なう
加算手段と全備え、前記各ビット部分毎に2進化10進
形態データへの変換を行ない各変候結朱を加算すること
により2進形態データから2進化lO進形態データへの
変換を行うことを%徴とする2進10進変換方式。In a binary-decimal conversion method for converting binary format data into binary coded decimal format data, a storage means for storing binary format data having a plurality of bit parts each having a predetermined number of bits; a selection means for selecting one of a plurality of bit parts in the form data; a bit part position display means for indicating which part in the binary form data the selected bit part is; It is equipped with a conversion means for converting the bit part into binary coded 1 (decimal form data) based on the display of the display means, and an addition means for performing decimal addition, and converts each bit part into binary coded decimal form data. A binary-decimal conversion method whose % characteristic is to convert binary form data to binary 1O-adic form data by performing the conversion and adding each variable resultant red.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5294783A JPS59177645A (en) | 1983-03-29 | 1983-03-29 | Binary-decimal converting system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5294783A JPS59177645A (en) | 1983-03-29 | 1983-03-29 | Binary-decimal converting system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS59177645A true JPS59177645A (en) | 1984-10-08 |
Family
ID=12929063
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5294783A Pending JPS59177645A (en) | 1983-03-29 | 1983-03-29 | Binary-decimal converting system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS59177645A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5378133A (en) * | 1976-12-22 | 1978-07-11 | Fujitsu Ltd | Processing method for binary data conversion |
JPS5720330A (en) * | 1980-07-10 | 1982-02-02 | Sekisui Plastics Co Ltd | Production of double-layer vessel such as container or the like |
JPS5761333A (en) * | 1980-09-30 | 1982-04-13 | Toshiba Corp | Binary and decimal system conversion device |
JPS57123734A (en) * | 1981-01-23 | 1982-08-02 | Fujitsu Ltd | Binary-to-decimal conversion system |
-
1983
- 1983-03-29 JP JP5294783A patent/JPS59177645A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5378133A (en) * | 1976-12-22 | 1978-07-11 | Fujitsu Ltd | Processing method for binary data conversion |
JPS5720330A (en) * | 1980-07-10 | 1982-02-02 | Sekisui Plastics Co Ltd | Production of double-layer vessel such as container or the like |
JPS5761333A (en) * | 1980-09-30 | 1982-04-13 | Toshiba Corp | Binary and decimal system conversion device |
JPS57123734A (en) * | 1981-01-23 | 1982-08-02 | Fujitsu Ltd | Binary-to-decimal conversion system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0644714B2 (en) | Code conversion device | |
JPH0713741A (en) | Alpha resultant conputing element | |
US3524976A (en) | Binary coded decimal to binary conversion | |
US3882483A (en) | Code converter system and method | |
US4241410A (en) | Binary number generation | |
JPS59177645A (en) | Binary-decimal converting system | |
US3229078A (en) | Code converter | |
EP0874492A2 (en) | Deinterleaver | |
US3890496A (en) | Variable 8421 BCD multiplier | |
JPH076024A (en) | Decimal number multiplier | |
US4325056A (en) | BCD To binary converter | |
JPS59177646A (en) | Decimal-binary converting system | |
JPS6218931B2 (en) | ||
JPS592935B2 (en) | multiplication circuit | |
US4141077A (en) | Method for dividing two numbers and device for effecting same | |
SU1116427A1 (en) | Multiplying device | |
JPS60134938A (en) | Register file reading system | |
JP2830075B2 (en) | Binary to decimal converter | |
JPH021650A (en) | Data transmission system | |
JPS6155690B2 (en) | ||
JPH03228434A (en) | Code converting circuit | |
JPH04263317A (en) | Arithmetic device | |
SU750478A1 (en) | Converter of integer binary-decimal numbers into binary | |
JPS6136653B2 (en) | ||
SU1008731A1 (en) | Computing device |