来源:‣(数字逻辑与数字电路 → 数字)
迁移说明:从正式 Notes 对应小节迁入,正文与数学表达式依原笔记保留;原图片和附件仍请查看来源。内容尚待校对。
插图请查看原 Notes 页面。
插图请查看原 Notes 页面。
异或: $A\overline B + \overline A B$
同或: $AB + \overline {A}\,\overline B$
符号数
反码——符号位,1表示 $-2^{MSB}$,还原成最后的数要加1。
补码——符号位,直接还原即可。
8421,数字对应位上的权重后相加表示十进制数,但是不超过9。
超过9后要加6.
$10_{bcd}=0001\ 0000_b=16_d$ $11_{bcd}=0001\ 0001_b=17_d$ $12_{bcd}=0001\ 0010_b=18_d$ $13_{bcd}=0001\ 0011_b=19_d$ $14_{bcd}=0001\ 0100_b=20_d$ $...$ As you see, the discrepancy is always $6$. A carry from a BCD digit to the next converts ten units to a single tenth, but a BCD tenth has weight $16$ instead of $10_d$, hence the correction $6$.
图片请查看原 Notes 页面。