Page 30 - DCAP101_BASIC_COMPUTER_SKILLS
P. 30
Unit 2: Introduction to Data Representations
Notes
Figure 2.1: Bit Numbers with Their Decimal Values
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Every computer stores numbers, letters, and other special characters in binary form. There
are several occasions when computer professionals need to know the raw data contained in
a computer’s memory. A commonly used way of doing this is to print memory contents on
a printer. This printout is called a memory dump. Memory dumps, which are in binary
numbers, would have many pages of 0s and 1s. Working with these numbers would be very
difficult and error prone for computer professionals. Hence, two number systems—octal and
hexadecimal, are often used as shortcut notations for binary. These number systems and their
relationship with binary number system are explained below.
2.1.2 Octal Number System
In octal number system, the base is 8. Hence, 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). The largest single digit is 7 (one less
than the base 8). Each position in an octal number represents a power of the base (8).
Therefore, decimal equivalent of octal number 2057 (written as 2057 ), is:
8
3
1
0
2
(2 x 8 ) + (0 x 8 ) + (5 x 8 ) + (7 x 8 ) =1024 + 0 + 40 + 7=1071 Hence, 2057 = 1071
8 10
3
Observe that since there are only 8 digits in octal number system, 3 bits (2 = 8) are sufficient
to represent any octal number in binary (see Figure 1.3).
2.1.3 Hexadecimal Number System
In hexadecimal number system, the base is 16. Hence, there are 16 symbols or digits. The
first 10 digits are the same digits of decimal number system - 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
The remaining six digits are denoted by the symbols A, B, C, D, E, and F, representing
decimal values 10, 11, 12, 13, 14, and 15, respectively. Hence, the largest single digit is F or
15 (one less than the base 16). Each position in hexadecimal number system represents a
power of the base (16). Therefore, decimal equivalent of hexadecimal number lAF (written
0
2-
1
as (1AF ) is: 23 (1 x 16 ) + (A x 16 ) + (F x 16 ) = (1 x 256) + (10 x 16) + (15 x 1)=256 + 160
16
+15 = 431 Hence, IAF = 431
16 10
4
Observe that since there are only 16 digits in hexadecimal number system, 4 bits (2 = 16)
are sufficient to represent any hexadecimal number in binary.
In our day-to-day life, we use the decimal number system. In this system,
base is equal to 10 because there are altogether ten symbols or digits (0,
1, 2, 3, 4, 5, 6, 7, 8, and 9).
LOVELY PROFESSIONAL UNIVERSITY 23