This preview shows page 1. Sign up to view the full content.
Unformatted text preview: of 0s and Is are possible and from Figure 3.1 it may be seen that a 3-bit number
can have one of the 8 values in the range 0 to 7. In fact, it can be shown that any decimal
number in the range 0 to 2""1 can be represented in the binary form as an n-bit number.
7 Figure 3.1. 3-bit numbers with their decimal values.
Every computer stores numbers, letters, and other special characters in binary form.
There are several occasions when computer professionals have to know the raw data
contained in a computer's memory. A common way of looking at the contents of a
computer's memory is to print out the memory contents on a line printer. This printout is
called a memory dump. If memory dumps were to be printed using binary numbers, the
computer professionals would be confronted with many pages of 0s and Is. Working with
these numbers would be very difficult and error prone.
Because of the quantity of printout that would be required in a memory dump of binary
digits and the lack of digit variety (0s and Is only), two number systems, octal and
hexadecimal, are used as shortcut notations for binary. These number systems and their
relationship with the binary number system are explained below.
Octal Number System
In the octal number system the base is 8. So in this system there are only eight symbols or
digits: 0, 1,2, 3, 4, 5, 6, and 7 (8 and 9 do not exist in this system). Here also the largest
single digit is 7 (one less than the base). Again, each position in an octal number
represents a power of the base (8). Thus the decimal equivalent of the octal number 2057
(written as 20578) is:
(2 x 83) + (0 x 82) + (5 x 81) + (7 x 8°), or
1024 + 0 + 40 + 7, or
Hence, 20578= 107110 Observe that since there are only 8 digits in the octal number system, 3 bits (2 3 = 8) are
sufficient to represent any octal number in binary (see Figure 3.1).
Hexadecimal Number System
The hexadecimal number system is one with a base of 16. The base of 16 suggests
View Full Document
- Spring '14