ENCODING SYSTEMS: COMBINING BITS TO FORM BYTES
Computers do not speak to one other in English, Spanish, or French. They have their own languages, which are better suited to electronic communication. In these languages, hits are combined according to an encoding system to represent letters (alpha characters), numbers (numeric characters), and special characters (such as *, $, +, and &). For example, in the seven-bit ASCII encoding system (American Standard Code for Information interchange-pronounced AS key ), a B and a 3 arc represented by 1000010 and 0110011, respectively. There is also an eight-bit version of ASCII called ASCII-8.
Letters, numbers, and special characters are collectively referred to as alphanumeric characters. Alphanumeric characters are encoded into a bit configuration on input so that the computer can interpret them. When you press the letter B on a PC keyboard. the B is transmitted to the processor as a coded string of binary digits (for example, 1000010 in ASCII). The characters are decoded on output so we can interpret them. For example, a monitor’s device controller will interpret an ASCII 0110011 as a 3 and display a 3 on the screen. This coding, based on a particular encoding system, equates a unique series of bits and no-bits with a specific character. Just as the words mother and father are arbitrary English-language character strings that refer to our parents. 1011010 is an arbitrary ASCI1 code that refers to the letter Z The combination of bits used to represent a character is called a byte (pronounced bile). Figure 1 shows the binary value (the actual bit configuration) and the decimal equivalent of commonly used characters in ASCII.
The seven-bit ASCII code can represent up to 128 characters (27). Although the English language has considerably fewer than 128 printable characters, the extra bit configurations are needed to represent ;1 variety of common and not-so-common special characters (such as – [hyphen]; @ [at]; │ [a broken vertical bar]: and ͂ [tilde]) and to signal a variety of activities to the computer (such as ringing a bell or telling the computer 10 accept a piece of datum) .
ASCII is a seven-bit code. hut the microcomputer byte can store eight bits. There are 256 (28) possible bit configurations in an eight-bit byte. Hard ware and software vendors use the extra 128 bit configurations to represent control characters or noncharacrer images to complement their hardware or software product. For example, the IBM-PC version of extended ASCII contains the characters of many foreign languages (such as ӓ
FIGURE 1 ASCII Codes this figure contains the binary and decimal values for commonly used ASCII characters .
[umlaut] and é [acute] and a wide variety of graphic Images that can he combined on a text screen 10 produce larger images (for example. the box around a window on a display screen).
Various encoding systems are used to represent colors inside a computer. A 4-bit code can represent up to 16 colors. Very high resolution monitors that can display more than 16 million different colors need 24-bit codes .
Figure 2 A Hexadecimal Dump Each of lines contains a hexadecimal representation of the contents of primary storage . the column of numbers farthest to the left consists of storage addresses . Each pair of hexadecimal digits represents the eight hits of a byte .the address of the first byte (29) in the memory dump is 0038C070 in hexadecimal ( or 00000000001110001100000001110000 in binary ) .
You can see how much space is saved by displaying dumps in “hex” rather than binary .