Digital-electronics 简明教程
Decimal to BCD Converter
十进制到 BCD(二进制编码十进制)转换器是一种将十进制数转换为其等效的 4 位二进制代码(称为 BCD 代码)的代码转换器类型。
A decimal-to-BCD (Binary Coded Decimal) converter is a type of code convert that converts a decimal number into its equivalent 4-bit binary code, called BCD code.
十进制到二进制编码十进制 (BCD) 转换器的真值表如下所示。
The truth table of the decimal to binary-coded decimal (BCD) converter is shown below.
Decimal |
BCD Code |
B3 |
|
B2 |
B1 |
B0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
2 |
0 |
0 |
1 |
0 |
3 |
0 |
0 |
1 |
1 |
4 |
0 |
1 |
0 |
0 |
5 |
0 |
1 |
0 |
1 |
6 |
0 |
1 |
1 |
0 |
7 |
0 |
1 |
1 |
1 |
8 |
1 |
0 |
0 |
0 |
9 |
1 |
0 |
0 |
从十进制转换为 BCD 的布尔表达式如下所述 −
The Boolean expressions for converting decimal to BCD are given below −
\mathrm{B_{0} \: = \: D_{1} \: + \: D_{3} \: + \: D_{5} \: + \: D_{7} \: + \: D_{9}}
\mathrm{B_{1} \: = \: D_{2} \: + \: D_{3} \: + \: D_{6} \: + \: D_{7}}
\mathrm{B_{2} \: = \: D_{4} \: + \: D_{5} \: + \: D_{6} \: + \: D_{7}}
\mathrm{B_{3} \: = \: D_{8} \: + \: D_{9}}
将十进制转换为 BCD 转换器的逻辑电路实现如下图所示。
The logic circuit implementation of the decimal to BCD converter is shown in the following figure.

这个逻辑电路可以执行给定十进制数字转换成二进制编码十进制数或 BCD 代码。
This logic circuit can perform the conversion of a given decimal number into a binary-coded decimal or BCD code.