A single bit which can only be ‘off’ or ‘on’ cannot be used to represent the decimal digit 0-9, nor can single bit represent the letters of the alphabets or special characters. For a computer memory to be useful, it must be able to store numbers, letters of the alphabets and special characters. To accomplish such a task, computer designers utilize a series of bits. Codes are assigned to the various combinations, which can be obtained from the series of bits being ‘on’ or ‘off’. The various combinations represent letters of the alphabet, numbers, and special characters as shown in Table 2.5.
Many computers use a combination of eight bits as a unit for storing data. These eight bits are called a byte. Thus, byte is a location in the main computer memory consisting of eight adjacent bits.
Character BCD EBCDIC ASCII-8
0 00 0000 1111 0000 0011 0000
1 00 0001 1111 0001 0011 0001
2 00 0010 1111 0010 0011 0010
3 00 0011 1111 0011 0011 0011
4 00 0100 1111 0100 0011 0100
5 00 0101 1111 0101 0011 0101
6 00 0110 1111 0110 0011 0110
7 00 0111 1111 0111 0011 0111
8 00 1000 1111 1000 0011 1000
9 00 1001 1111 1001 0011 1001
A 11 0001 1100 0001 0100 0001
B 11 0010 1100 0010 0100 0010
C 11 0011 1100 0100 0100 0100
D 11 0100 1100 0101 0100 0101
E 11 0101 1100 0101 0100 0101
F 11 0110 11 00 0110 01 00 0110
G 11 0111 11 00 0111 01 00 0111
H 11 1000 1100 1000 0100 1000
I 11 1001 1100 1001 0100 1001
J 10 0001 1101 0001 0100 1010
K 10 0010 1101 0010 0100 1011
L 10 0011 1101 0011 0100 1100
M 10 0100 1101 0100 0100 1101
N 10 0101 1101 0101 0100 1110
O 10 0110 1101 0111 0101 1111
P 10 0111 1101 0111 0101 0000
Q 10 1000 1101 1000 0101 0001
R 10 1001 1101 1001 0101 0010
S 01 0010 1110 0010 0101 0011
T 01 0011 1110 0011 0101 0100
U 01 0100 1110 0100 0101 0101
V 01 0101 1110 0101 0101 0110
W 01 0110 1110 0110 0101 0111
X 01 0111 1110 0111 0101 1000
Y 01 1000 1110 1000 0101 1001
Z 01 1001 1110 1001 0101 1010