The lowercase characters are assigned a different set of numbers: ???a??™ = 97 (1100001), ???b??™ = 98 (1100010),
???c??™ = 99 (1100011), etc. In addition, many special characters are defined: ???$??™ = 36 (0100100), ???+??™ = 43
(0101011), ???>??™ = 62 (01111110), etc.
A number of ???control characters??? are also defined in ASCII. Control characters do not print, but can be used
in streams of characters to control devices. For example, ???line feed??™ = 10 (0001010), ???tab??™ = 11 (0001011),
???backspace??™ = 8 (0001000), etc.
For output, to send the string ???Dog??? followed by a linefeed, the following sequence of bytes would be sent
(the msb is the parity bit, and in this example parity is being ignored, and the parity bit set to 0):
01000100 01101111 01100111 00001010
D o g lf (line feed)
Likewise for input, if a program is reading from a keyboard, the keyboard will send a sequence of integer
values that correspond to the letters being typed.
How does a program know whether to interpret a series of bits as an integer, a character, or a floating-point
number? Bits are bits, and there is no label on a memory location saying this location holds an integer/character/real.
The answer is that the program will interpret the bits based on its expectation.
Pages:
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101