bcd码二进制转十进制_二进制编码的十进制(BCD码)及其加法

bcd码二进制转十进制

Prerequisite: Number systems

先决条件: 数字系统

BCD Code (8421 Code): In BCD 8421 code, each decimal digit is represented using a 4-bit binary number. The 4-bit binary numbers have their weights attached as 8, 4, 2, 1 from MSB to LSB side. Since the weights are attached to it comes in the category of weighted codes and is also sequential.

BCD代码(8421代码) :在BCD 8421代码中 ,每个十进制数字均使用4位二进制数表示。 从MSB到LSB,4位二进制数的权重分别为8、4、2、1。 由于权重是附加的,因此它属于加权代码类别,并且是顺序的

In a digital system that accepts only binary numbers in form of 0 and 1, the only way to interpret decimal numbers is its conversion from decimal to binary and vice-versa which is a slow process and it also requires a huge electronic circuitry. So, we use BCD numbers. Also, the sequential nature of BCD numbers makes it advantageous for performing arithmetic operations.

在仅接受0和1形式的二进制数字的数字系统中,解释十进制数字的唯一方法是将其从十进制转换为二进制,反之亦然,这是一个缓慢的过程,并且还需要庞大的电子电路。 因此,我们使用BCD号码。 而且,BCD编号的顺序性质使其在执行算术运算时具有优势。

Although, there are many advantages there are some disadvantages too such as:

尽管有很多优点,但也有一些缺点,例如:

BCD codes are more inefficient than usual binary codes. Usually, in binary numbers, we represent (13)10 = (1101)2 i.e., we require 4-bits but in BCD notation (13)10 is represented as (0001 0011). Here, we require 8-bits to represent the same 13.

BCD代码比普通的二进制代码效率低。 通常,在二进

  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值