NUMBER SYSTEMS

advertisement
NUMBER SYSTEMS
In principle a number system may be developed from any number of digits. The
modern construction of a number system employs a base or radix which defines
the number of digits which can be used to construct numbers.
Consider the decimal (Radix = 10, digits 0  9) system as an example. All
numbers are constructed from the digits 0  9 and successive powers of 10. eg.
364 = 3 x 102 + 6 x 101 + 4 x 100 = 300 + 60 + 4.
To write the same number in the binary system (Radix = 2) we may only employ
2 digits (0 and 1) and must use powers of 2 rather than powers of 10, therefore
364dec = 101101100bin .
101101100 = 1 x 28 + 0 x 27 + 1 x 26 + 1 x 25
+ 0 24 + 1 x 23 + 1 x 22 + 0 x 21 + 0 x 20
= 256 + 0 + 64 + 32 + 0 + 8 + 4 + 0 + 0 = 364
For comparison consider 364 in the octal (Radix = 8) system.
364dec
= 554oct = 5 x 82 + 5 x 81 + 4 x 80
= 320 + 40 + 4 = 364dec
The principles for conversion from system to system are quite simple:
1.
The radix defines the number of allowed digits and the base to be
used in the expansion.
2.
Convert from system to system by expanding the desired number in
the new system (according to point 1).
Example: Convert 210dec to binary and to hexadecimal (Radix 16).
210dec
= 1 x 2 7 + 1 x 26 + 0 x 25 + 1 x 2 4 + 0 x 23 + 0 x 22
+ 1 x 2 1 + 0 x 20
= 128 + 64 + 0 + 16 + 0 + 0 + 1 + 0
= 11010010bin
210dec = 13 x 161 + 2 x 160
= 208 + 2 = 210 = D2hex
(note: digits in hex  0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
Download