ABSTRACT

This chapter explains the organization of computer memory and how numbers, characters, and other data are represented with bit patterns. It covers binary numbers, modular arithmetic, US-ASCII, and Unicode character encoding. Inside a digital computer, numbers are naturally in binary, and hardware support is provided for their operations, as long as they fit in a single word. The chapter describes modular arithmetic and a mathematical concept. Octal and hex numbers are often used as a shorthand for the bit patterns representing them. Each octal digit specifies a 3-bit pattern, and each hex digit specifies a 4-bit pattern. Decimal numbers use powers of ten as place values; binary numbers powers of two; octal numbers powers of eight; and hex numbers powers of sixteen. For modern general purpose computers, the entire memory is an array of bytes, each of which can be addressed directly, hence the term random access memory.