- 0
- 0
- 约3.94千字
- 约 14页
- 2026-02-09 发布于山东
- 举报
2.3Codesinbinarysystem
BCDcodes:fordecimaldigit;
Graycode:fornumbersinbinarysystem;
ASCIIcode:forcharacters;
Codesinbinarysystem
Keypoint:
Usenbits,wecanmake2ndifferentwords;
Tomakencode-words,youmustuselog2n(
向上取整)bits.
BCDcodes
Binarycodesfordecimaldigits(Table2-9)
BCDcodes
Express10digit(0—9):use4ormorebits,
manydifferentwayforcoding
8421code
Naturalcode,justlake4-bit
binarynumbers;
Eachdigitisweighted;
Ithas10validcodewords
and6invalidcodewords.
BCDcodes
2421codes
Eachdigitisweighted;
Self-complementing;
UseMSBtoexpress
higher/lowerpart;
Ithas10validcodesand
6invalidcodes.
BCDcodes
Excess-3code
Itsdigitisnotweighted;
Self-complementing;
8421code+“0011”.
BCDcodes
Examples:
useBCDcodefordecimalnumbersA=19.46
8421code:A=00011001.01000110
2421code:A=00011111.01001100
Excess-3code:A=01001100.01111001
Keypoint
Eachdecimaldigitiscodedbya4-bitsstring!
BCDcodes
1-out-of-10code
原创力文档

文档评论(0)