Chapter2 2.6
Chapter2 2.6
6
Character Codes
2.6 Character Codes
2
2.6.1 Binary-Coded Decimal
For many applications decimal digits
need to be exactly represented, e.g.
financial applications.
What is the binary equivalent of R 5.10?
Disadvantage of BCD:
Many bits go to waste (1010 to 1011 not used)
Advantage of BCD:
Can represent decimal numbers accurately.
4
2.6.1 Binary Coded Decimal
5
2.6.2 EBCDIC
6
2.6.2 EBCDIC
7
2.6.3 ASCII
Other computer
manufacturers chose
the 7-bit ASCII
(American Standard
Code for Information
Interchange).
Until recently, ASCII
was the dominant
character code
outside the IBM
mainframe world.
The 8th bit was
intended to be used
for parity.
8
2.6.3 ASCII
Parity: the most basic of all error-detection schemes.
A parity bit is 1 or 0 depending on whether the sum of the other bits is
odd or even.
E.g. ASCII A is 6510 or 100 0001, so the bit string transmitted would be
0100 0001 (Using even parity).
Parity can be used to detect only single-bit errors.
9
2.6.4 Unicode
10