Number System
Download
Report
Transcript Number System
NUMBER SYSTEMS
Binary
Octal
Decimal
Hexadecimal
Base 2
Base 8
Base 10
Base 16
DECIMAL
Normally, we count things in base 10. The
base is completely arbitrary. The only
reason that people have traditionally used
base 10 is that they have 10 fingers, which
have made handy counting tools.
0 1 2 3 4 5 6 7 8 9 (Total 10)
Wonder if we had only 2 fingers?
BASE-10
DECIMAL NUMBER MEANS
The number 532.25 in decimal (base 10)
means the following:
= (5 * 102) + (3 * 101) + (2 * 100) + (2 *
10-1) + (5 * 10-2)
= 500 + 30 +
2 + 2/10 +
5/100
= 532.25
BINARY TO DECIMAL
In the binary number system (base 2),
each column represents a power of 2
instead of 10. For example, the number
101.01 means the following:
= (1 * 2^2) + (0 * 2^1) + (1 * 2^0) + (0 *
2^-1) + (1 * 2^-2)
4 +
0 + 1 +
0 + 1/4
= 5.25 Decimal
For simplicity we are NOT going to discuss Fractions
HEXADECIMAL TO DECIMAL
FF
F in Hex is 15 so
= 15 x 161 + 15 x 160
= 240 + 15
= 255
HEXADECIMAL NUMBERS!
0123456789abcdef
Check it !
OCTAL TO DECIMAL
e.g 56564
OCT is Base 8
= 5 x 84 + 6 x 83 + 5 x 82 + 6 x 81 + 4 x 80
= 5 x 4096 + 6 x 512 + 5 x 64 + 6 x 8 + 4 x 1
= 20480 + 3072 + 320 + 48 + 4
= 23924
DECIMAL TO BINARY
2
2
2
2
2
2
100
50 – 0
25 – 0
12 – 1
6– 0
3– 0
1- 1
Answer: 1100100
DECIMAL TO HEXADECIMAL
16
100
6 -
4
16 222
13(D) – 14 (E)
16
16
1000
62 – 8
3 - 14
Convert all above 9 to A B C etc
3 14 8
3E8
DECIMAL TO OCTAL
8
8
64
8-0
1–0
So answer is 100 Octal equals 64 DECIMAL
BINARY TO OCTAL
OKAY! Lets keep it very simple
– Convert Binary to Decimal
– And the Decimal to Octal