Professional Documents
Culture Documents
Numbering
System
92
Example, lets assume 278 is a base-10 number then how do we get the
value 278?
Solution: N = 278, b = 10 (base 10) => decimal numbers, symbols: 0, 1, 2,
3, 4, 5, 6, 7, 8, 9 (10 different symbols). N = 278 => n = 2;a2 = 2; a1 = 7; a0
=8
Thus, 27810 = (2 x 102) + (7 x 101) + (8 x 100).
4.2. Number System
4.2.1.
Binary Numbers
Binary numbers is a base-2 number system. By the name you might have
guessed that this number system only works with two digits. And youll be
right if you have done so. The two numbers that are used in this system are
0 and 1. For example, 101102. Now it also works with the same formula and
the counting system that we use for decimal.There is no 2,3,4,5,6,7,8 or 9 in
Binary!How do we Count using Binary?
0
We start at 0
1
Then 1
???
But then there is no symbol for 2 ... what do we do?
In Decimal Systeml how do we count?
0
Start at 0
...
Count 1,2,3,4,5,6,7,8, and then...
9
This is the last digit in Decimal
10
So we start back at 0 again, but add 1 on the left
The same thing is done in Binary
0
Start at 0
1
Then 1
10
Now start back at 0 again, but add 1 on the left
11
1 more
???
But NOW what ... ?
What happens in Decimal?
99
When we run out of digits, we ...
94
100
4.2.3.
Octal Numbers
0 1 2 3 4 5 6 7 10 11
12
17 20
30
77 100
Decima
l
0 1 2 3 4 5 6 7 8
10
15 16
24
63 64
Just like how we used powers of ten in decimal and powers of two in binary,
to determine the value of a number we will use powers of 8 since this is Base
Eight. Example of Octal numbers 36238, 2578etc.
4.2.4.
Hexadecimal Numbers
95
10101008
35608
75710
12316
m.
n.
o. 4.3. Conversion
p. It is important to know that 364 8 is not equal to the 36410. This is
just like how a 102 is certainly not 1010. 102is equal to 210. 108is
96
1.
2.
3.
1.
2.
3.
aq.
=> 1 / 2 = 0 remainder 1
ar. =101002
as.And 0.25
at. => 0.25 x 2 = 0.50 taking 0
au.
=> 0.50 x 2 = 1.00 taking 1
av.=0.012
aw.
Thus, 20.2510 = 10100.012
ax.
ay. Exercises:
az.Convert the following numbers to Binary, Octal and Hexadecimal
1. 10.2510
5. 89.9110
9. 45.5510
2. 4.6910
6. 756.1210
10.
87.7910
3. 1008.2410
7. 11.1310
4. 51.3610
8. 48.8310
11.
12.
13.
14.
15.
4.3.2. Any Number to Decimal
16.
In order to convert any number you have to use the formula we
have discussed in Understanding the Base. For the convenience
here is the example for you,
17.
N = anbn + an-1bn-1 + + a1b1 + a0b0
18.
Where:
19.
N: Decimal Equivalent
20.
b: base
21.
ai: i-th digit
22.
so, 100012= 1x24 + 0x23 + 0x22 + 0x21 + 1x20 = 16 + 0 + 0 + 0
+ 1 = 1710
23.
16A16 = 1x162 + 6x161 + A(10)x160 = 256 + 96 + 10 = 36210
24.
7218 = 7x82 + 2x81 + 1x80 = 448 + 16 + 1 = 46510
25.
26.
Exercises:
27.
Convert the following number to Decimal
1. 17816
5. FAF16
9. 1101010102
2. 11011012
6. DEF16
10.
111118
3. 3328
7. 77916
11.
1010.112
4. FFA16
8. 3148
12.
FF.FF16
13.
14.
15.
16.
4.3.3. Binary and Octal
98
17.
Theorem: If base R1 is the integer power of other base, R 2, i.e. R1
d
= R2 e.g.8 = 23. Every group of d digits in R2 (e.g. 3 digits)is equivalent
to 1 digit in the R1 base.
18.
From the theorem, assume thatR1 = 8 (base-8) octal and R 2 = 2
(base-2) binaryfrom the theorem above, R1 = R2d as 8 = 23. So, 3 digits
in base-2 (binary) is equivalent to 1 digit in base-8 (octal).So, in order
to use it in full notion the following table can be created
19.
20.
Binary
21.
l
Octa
22.
000
23.
24.
001
25.
26.
010
27.
28.
011
29.
30.
100
31.
32.
101
33.
34.
110
35.
36.
111
37.
38.
39.
Converting 101112 is like
1. At first make group of three digits starting from the right. If in last the
digits cant be rounded up to three add 0 to the left.
2. Replace each group accordingly with the help of the table
3. Sequence the numbers as the groups are created
40.
So, there will be two groups
41.
010111 replacing each group with their designated value from
table we get 2 7
42.
Thus, 101112 = 278
43.
44.
In the same way if we want to convert 278 then
1. Replace each digit with its equivalent three digits
2. After joining the numbers if any 0s are left at the leftmost erase them
45.
So, 2 is replaced by 010 and 7 is replaced by 111
46.
Thus the number becomes 010111 and removing the leftmost
zero as it bears no value the answer becomes 101112.
47.
48.
Exercise:
99
i. 101.1102
j. 111.1101
02
i. 9.1348
j. 7.1138
s. Hex
adec
imal
t. 0000
u. 0
v. 0001
w. 1
x. 0010
y. 2
z. 0011
aa.
3
ab.
100
ac.4
ad.
101
ae.
5
af. 0110
ag.
100
6
ah.
111
2.
3.
1.
2.
ai. 7
aj. 1000
ak.
8
al. 1001
am.
9
an.
010
ao.
A
ap.
011
aq.
B
ar. 1100
as.C
at. 1101
au.
D
av.1110
aw.
E
ax.
111
1.
ay. F
az.
ba.
Converting 10011112 is like
At first make group of four digits starting from the right. If in last the
digits cant be rounded up to three add 0 to the left.
Replace each group accordingly with the help of the table
Sequence the numbers as the groups are created
bb.
So, there will be two groups
bc.
01001111 replacing each group with their designated
value from table we get 4 F
bd.
Thus, 10011112 = 4F16
be.
bf. In the same way if we want to convert 4F16 then
Replace each digit with its equivalent three digits
After joining the numbers if any 0s are left at the leftmost erase them
bg.
So, 4 is replaced by 0100 and F is replaced by 1111
bh.
Thus the number becomes 01001111 and removing the
leftmost zero as it bears no value the answer becomes 10011112.
bi.
101
bj. Exercise:
1. Convert the following numbers to Octal
a. 101112
e. 11112
b. 10101002
f. 11010102
c. 11001012
g. 11111002
d. 111112
h. 10101012
2. Convert the following numbers to Binary
a. 1AF16
e. 14516
b. ABC16
f. 7816
c. DF1216
g. 91516
d. FFF16
h. 1EF3816
i. 101.1102
j. 111.1101
02
i. AF.FFF16
j. 11.BCD16
102
k.
l.