【FPGA】Verilog:BCD 加法器的实现 | BCD 运算 | Single-level 16 bit 超前进位加法器 | 2-level 16-bit 超前进位加法器


0x00 BCD 运算

在 BCD 中,使用4位值作为操作数,但由于只表示 0 到 9 的数字,因此只使用 0000 到 1001 的二进制数,而不使用 1010 到 1111 的二进制数(don't care)。

因此,不能使用常规的 2'complement 运算来计算,需要额外的处理:如果 4 位二进制数的运算结果在 1010 到 1111 的范围内,需要将 6 (即 0110),添加到运算结果中。

BCD 运算例子

0x01 BCD 加法器的实现

猜你喜欢

转载自blog.csdn.net/weixin_50502862/article/details/134880375