Please scroll down to get to the study materials.
It consists of :
Conversion of binary to decimal (base 2 to base 10):
The rules for conversion from binary to decimal are given below:
Note: A power of 2 is 0 for a left bit of binary point (or for a right most bit for the number that does not contain fractional part) and increase the power by one for each bit towards left and decrease power by one towards the right of binary point.
Example 1: convert (110011)_{2} to decimal.
Solution:
(110011)_{2 }= 1×2^{5} + 1×2^{4} + 0×2^{3} + 0×2^{2} + 1×2^{1} + 1×2^{0}
= 32 + 16 + 0 + 0 + 2 +1
= (51)_{10}
Example 2: convert (1011.101)_{2} into decimal.
(1011.101)_{2 }= 1×2^{3} + 0×2^{2} + 1×2^{1} + 1×2^{0} + 1×2^{-1} + 0×2^{-2} + 1×2^{-3}
= 8 + 0 + 2 + 1 +0.5+ 0 +0.125
= 11 + 0.5 + 0.125
= (11.625)_{10}
The rules for conversion from binary to decimal are given below:
Example: convert (10110101)_{2 }into octal.
Solution:
Dividing the given binary number (10110101)_{2} into groups of 3 bits from right to left, and appending 0’s at leading position, we have,
The rules for conversion from binary to hexadecimal are as given below:
Example: convert (10101011101)_{2} into hexadecimal
Solution:
Dividing the given binary number (10101011101)_{2} into groups of 4 bits from binary point to left and binary point right and appending 0’s at leading or at trailing position to make each group of four bits, we have,
It consists of conversion from decimal to binary, octal and hexadecimal number system which are described below:
The rules for conversion from decimal to binary are as given below:
Example: convert (51)_{10 }into binary
Solution:
51÷2=25 | remainder | = 1 |
25÷ 2=12 | remainder | = 1 |
12÷ 2=6 | remainder | = 0 |
6÷ 2=3 | remainder | = 0 |
3÷ 2=1 | remainder | = 1 |
1÷ 2=0 | remainder | = 1 |
Therefore, (51)_{10 }= (110011)_{2}
The rules for conversion from decimal to binary are as given below:
Example: convert (177)_{10} into octal
Solution:
177÷ 8 =22 | remainder | = 1 |
22÷ 8 = 2 | remainder | = 6 |
2÷ 8 = 0 | remainder | = 2 |
Therefore, (177)_{10} = (261)_{8}
Conversion of decimal to hexadecimal (base 10 to base 16):
Example: convert (77)_{10 }into hexadecimal
Solution:
77÷ 16=4 | remainder | = 13 which means D |
4÷ 16 =0 | remainder | = 4 |
Therefore, (77)_{10 }= (4D)_{16}
It consists of conversion from octal to decimal, binary and hexadecimal number system which are described below:
Conversion of octal to decimal (base 8 to base 10):
Multiply the each octal digit by corresponding power of 8 and sum each product term to get decimal equivalent.
Example: convert (632)_{8} to decimal.
Solution:
(632)_{8} = 6×8^{2} + 3×8^{1} + 2×8^{0}
= 384 + 24 + 2
= 410
Therefore, (632)_{8} = (410)_{10}
Conversion from octal to binary (base 8 to base 2):
Substitute each octal digit by equivalent 3 bit binary from table and collect bits for each digit to get binary equivalent numbers.
Example: convert (741)_{8} into binary.
Conversion from octal to hexadecimal (base 8 to base 16):
Actually, there is no direct method for converting from octal to hexadecimal so first, convert octal into binary or decimal and then convert binary or decimal to hexadecimal.
It consists of conversion from hexadecimal to decimal, binary and octal number system which are described below:
Conversion of hexadecimal to decimal (base 16 to base 10):
The rules for conversion from hexadecimal to decimal are as given below:
Example: convert (F4C)_{16} into decimal.
Solution:
(F4C)_{16 }= F×16^{2} + 4×16^{1} + C×16^{0}
= 15×256 + 4×16 + 12×1
= 3840 + 64 + 12
= 3916
Therefore, (F4C)_{16 }= (3916)_{10}
Conversion of hexadecimal to binary (base 16 to base 2):
Substitute each hexadecimal symbol by equivalent 4 bit binary from table and collect bits for each digit to get binary equivalent numbers.
Conversion of hexadecimal to octal (base 16 to base 8):
There is no direct method for converting from hexadecimal to octal, so first convert hexadecimal into binary or decimal and then convert binary or decimal to octal.
(Dilli , 2015,218-222)
Bibliography
Dilli , S. P., Singh, k. E., Khadka , D., Bhatta, K. D., Baral, N., Saud, R. S., . . . Dangi, R. (2015). Fundamental of Computer Science. Kathmandu: KEC publication and Distribution.
Gurung,Juddha Bahadur et.al.,Computer Science-XI,Bhundipuran Prakashan,Ktm
You must login to reply
bijay
There is only one example of no. Having decimal give some examples of no. Having decimals of octal and hexa decimal
Jan 14, 2017
0 Replies
Successfully Posted ...
Please Wait...