NUMBERING SYSTEMS AND COMPUTERS

NUMBERING SYSTEMS AND COMPUTERS

We humans use a decimal, or base-10, numbering system, presumably because people have 10 fingers. if we had three fingers and a thumb all each hand, as does the Extra Terrestrial (E,T,) from the popular movie. then in all probability we would be using the octal numbering system. which has a base of 8.

Early computers were designed around the decimal numbering sys­tem. This approach made the creation of computer logic capabilities un­necessarily complex and did not make efficient use of resources, (For ex­ample, ten vacuum tubes were needed to represent one decimal digit.) In 1945, as computer pioneers were struggling to improve this cumbersome approach, John von Neumann suggested that the numbering system used by computers should take advantage of the physical characteristics of elec­tronic circuitry. To deal with the basic electronic states of on and off, von Neumann suggested using the binary numbering system. His insight has vastly simplified The way computers handle data.

Computers operate in binary and communicate to us in decimal. A special program translates decimal into binary on input, and binary into decimal on output. Under normal circumstances, a programmer would see only decimal input and output. On occasion, though, he or she must deal with long and confusing strings of 1s and 0s in the form of a memory dump. A memory dump is like a snapshot of the contents of primary stor­age (on-bits and off-bits ) at a given moment in time. To reduce at least part of the confusion of seeing only 1s and 0s on the output, the hexa­decimal (base-16) numbering system is used as a shorthand to display the binary contents of both primary and secondary storage (see Figure 2).

Inside the computer-6_07

The decimal equivalents for binary, decimal, and hexadecimal num­bers are shown in Figure 3, we know that in decimal, any number greater than 9 is represented by a sequence of digits. When you count in decimal, you "carry" to the next position in groups of 10. As you examine Figure 3, notice that you carry in groups of 2 in binary and in groups of 16 in hexadecimal. Also note that any combination of four binary digits can be represented by one "hex" digit. The hexadecimal numbering sys­tem is used only for the convenience of the programmer when reading and reviewing the binary output of a dump (see Figure 2) or the binary representation of an instruction or error message. Computers do not oper­ate or process in hex.

The Appendix, "Working with Numbering Systems," presents the prin­ciples of numbering systems, discusses numbering-system arithmetic, and illustrates how to convert a value in one numbering system into its equiva­lent in another.

Leave a comment

Your email address will not be published. Required fields are marked *