Number Systems 445
Decimal Binary Hexadecimal Octal Remarks
11 0000 1011 0B 13
12 0000 1100 0C 14
13 0000 1101 0D 15
14 0000 1110 0E 16
15 0000 1111 0F 17 Till this, single digit in hexadecimal
16 0001 0000 10 20
17 0001 0001 11 21
18 0001 0010 12 22
19 0001 0011 13 23
20 0001 0100 14 24
Table A.1 Conversion of decimal to binary, hexadecimal and octal
Although similar tables may be prepared and used for conversion from one system to another, there
exist other methods for this conversion, as discussed below.
A.6.1 Decimal to Binary
Successive division by 2 is a simple method to convert any decimal number to its binary equivalent.
The remainders at each step of division are to be carefully arranged to get the nal binary equivalent.
Taking the example of converting decimal 19 into its binary equivalent, we may proceed through the
following steps ( Figure A.1 ).
First, we divide 19 by two to get 9 as the quotient and 1 as remainder. This remainder, 1, forms the
last or right-most digit of the binary conversion. Note that 19 is an odd number and any binary number
ending with 1 is also odd.
Figure A.1 Conversion of decimal 19 to its binary equivalent
2
2
2
2
19
9
4
2
1
1
110011
0
0
Next, we take the quotient 9, and divide by 2, which generates next quotient 4 and the remainder 1.
This 1 becomes the next digit (at the left of previous digit, 1) of our converted value. Therefore, the last
two digits of our decimal to binary conversion so far would be 11.
Taking the now available quotient 4, we again divide it by 2 to get 2 as the quotient and 0 as the
remainder. This remainder, 0, becomes the third binary digit in our conversion procedure. If we take the
latest stock of our binary conversion, it would be 011.
Taking the latest quotient 2, we again perform the division by 2, to get 1 as the quotient and 0 as the
remainder. This 0 forms the fourth (from right) converted binary digit, making it 0011.
Z01_GHOS1557_01_SE_C16_App_A.indd 445Z01_GHOS1557_01_SE_C16_App_A.indd 445 4/29/11 5:39 PM4/29/11 5:39 PM