Professional Documents
Culture Documents
Office R.N. 1109, AB-I (First Floor) Ph: 231 (internal) Mail: ashudwi@
Number Representation
Any numbering system will consist of a number of symbols with each symbol representing specific elementary (face) values. The Arabic system that we commonly use consists of exactly ten symbols: 0 1 2 3 4 5 6 7 8 9
The exact value of a symbol is determined by the position (place) it occupies. This is the basis of a positional numbering system.
The total value of a number is then the sum of face values multiplied by their place values.
2
103 1000
102 100 2 4 8
101 10 3 1 6
100 1 1 3 0
Computer Representation
Binary System
At the hardware level computers must store numbers using either the presence or absence of a voltage. Then there are only two states (symbols) available for number representation. So base 2 (binary) is a suitable system for computers. 26 64 25 32 24 16 23 8 22 4 21 2 20 1 basepowers place values
84
83
82
64
81
80
80
1
basepowers
place values
4096 512
Hexadecimal representation
It is Base 16 representation(0,1,2.9,A,B,C,D,E,F)
Successive Division
a) b) Divide the decimal number by 2; the remainder is the LSB of the binary number. If the quotation is zero, the conversion is complete. Otherwise repeat step (a) using the quotation as the decimal number. The new remainder is the next most significant bit of the binary number.
r 6 LSB r 3 r 1 MSB
9410 = 1368
To get back the decimal number from octal form Multiply each bit of the Octal Number by its corresponding bitweighting factor (i.e., Bit080=1; Bit-181=8; Bit282=64; etc.). Sum each to get decimal value
r E LSB r 5 MSB
9410 = 5E16
from octal form Multiply each bit of the hexadecimal number by its corresponding bit-weighting factor (i.e., Bit-0160=1; Bit1161=16; Bit-2162=256; etc.). Sum each to get decimal value
1 0 1 1 0 1 0 2 = 132 8 = 5A H
To convert directly between binary and octal, group the binary bits into sets of 3 (because 23 = 8). You may need to pad with leading zeros.
0 0 1 0 1 1 0 1 0 2= 1
1 3 2
28
To convert directly between binary and hexadecimal number systems, group the binary bits into sets of 4 (because 24 = 16). You may need to pad with leading zeros.
0 1 0 1 1 0 1 0 2= 5
10
A 16
10
0101 1 010