444 Computer Architecture and Organization
A.5 OCTAL NUMBERS
In this case, the base is eight and the symbols in octal number system are 0, 1, 2, 3, 4, 5, 6 and 7. As
usual, every digit represented in octal system to be multiplied by power of 8 and the power is dependent
upon the place of that octal digit. The Eq. A.1, in this case, may be rewritten as
WXYZ
8
= W × 8
3
+ X × 8
2
+ Y × 8
1
+ Z × 8
0
[A.7]
Therefore, 64 in octal system may be expanded as
6 4
8
= 6 × 8
1
+ 4 × 8
0
[A.8]
This leads to 48 + 4, i.e., 52 in decimal. The reader’s attention is drawn to the difference between
Eqs. A.6 and A.8.
A.6 CONVERSION TECHNIQUES
Number systems, discussed above, need conversions from one system to another for various reasons.
Table A.1 presents converted representations of decimal numbers from one to twenty in three other
systems, discussed above.
Decimal Binary Hexadecimal Octal Remarks
0 0000 0000 00 00
1 0000 0001 01 01 Till this, single digit in binary
2 0000 0010 02 02
3 0000 0011 03 03
4 0000 0100 04 04
5 0000 0101 05 05
6 0000 0110 06 06
7 0000 0111 07 07 Till this, single digit in octal
8 0000 1000 08 10
9 0000 1001 09 11 Till this, single digit in decimal
10 0000 1010 0A 12
Interested readers may try to generate similar number systems with its base value as 3, 4,
5, 6 or 7. A tabular representation of all these number systems would yield some interesting
patterns.
F
O
O
D
F
O
R
T
H
O
U
G
H
T
(Continued)
Z01_GHOS1557_01_SE_C16_App_A.indd 444Z01_GHOS1557_01_SE_C16_App_A.indd 444 4/29/11 5:39 PM4/29/11 5:39 PM
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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.139.224