NUMBER CONVERSION
NUMBER CONVERSION
Decimal to Binary: At first we need to
divide the given decimal number by two and remind the retain. The step as
below.
Ex:
if the given number is (146)10, then
156/2
= 78 and retain = 0
78/2 = 39 and retain = 0
39/2 = 18 and retain = 1
19/2 = 9
and retain = 1
9/2 = 4 and retain = 1
4/2 = 2 and retain = 0
2/2 = 1 and retain = 0
So,
the Binary Number is (10011100)2
Octal to Binary:
Octal to Binary |
- At first separate the octal number if it is more
than one digit.
Ex: 7
6 3 1
- Find the binary number for each digit of octal
number. Add “0” to the left if binary number is shorter than 3 bits.
Ex: 7 6 3 1
111 110
011 001
- Writ the all groups binary number together,
maintaining the same group order provides the binary for given octal
number.
Ex: 111110011001
Result: (7631)8 = (111110011001)2
Hexadecimal
to Binary: If the given number is more than one digit, then
Ex: (3AB2)16
- Separate the
Hexadecimal number individual
Ex: 3 A B 2
- Write Binary
number for each digit of hexadecimal number.
Ex:
Hexadecimal to Binary |
- So the result
is (3AB2)16 = (11101010110010)2
Binary to Decimal:
If the given number is (101011)2, then
=1 x 25 + 0 x 24 + 1 x 23 +
0 x 22 + 1 x 21 + 1 x 20
= 32 + 0 + 8 + 0 + 2 + 1
=42
So the result is (42)10
Octal to Decimal:
If the given number is (5011)8, then
=5 x 83 + 0 x 82 + 1 x 11 +
1 x 20
= 2560 + 0 + 1 + 1
= 2562
So the result is (2562)10
Hexadecimal to
Decimal:
If the given number is (1E1C12)2, then
=1 x 165 + E x 164 + 1 x 163
+ C x 162 + 1 x 161 + 2 x 160
= 2038832
So the result is (2038832)10
No comments