Decimal Number System to Other Base
System(s)
Q: Convert (29)10 into
Binary Number System
Thus, (0.75)10 = (0.11)2
Q: Convert (0.75)10
into Octal Number System
Thus, (0.75)10 = (0.6)8
Thus, (11101.11)2 = (29.75)10
Steps
- Step 1 - Divide the decimal number by
the value of the new base.
- Step 2 – Write the remainder at the
right-most position.
- Step 3 – Repeat the process of
dividing, until the quotient is 0, and keep writing the remainder after
each step of division.
- Step 4 – Write the remainder(s) in
reverse order.
Binary
Number System has base 2
Operation
|
Quotient
|
Remainder
|
29 / 2
|
14
|
1
|
14 / 2
|
7
|
0
|
7 / 2
|
3
|
1
|
3 / 2
|
1
|
1
|
1 / 2
|
0
|
1
|
Thus, (29)10 = (11101)2
Q: Convert (29)10 into Octal
Number System
Binary
Number System has base 8
Operation
|
Quotient
|
Remainder
|
29 / 8
|
3
|
5
|
3 / 8
|
0
|
3
|
Thus, (29)10 = (35)8
Q: Convert (29)10 into Hexadecimal
Number System
Binary Number
System has base 16
Operation
|
Quotient
|
Remainder
|
29 / 16
|
1
|
13 (D)
|
1 / 16
|
0
|
1
|
Thus, (29)10 = (1D)16
For Fractions
Steps
- Step 1 – Multiply the decimal
fraction by the value of new base.
- Step 2 – If a non-zero integer is
generated, record the non-zero integer otherwise record 0.
- Step 3 – Remove the non-zero integer
and repeat the above steps till the fraction value becomes 0.
- Step 4 – Write down the number according to occurrence.
Q: Convert (0.75)10
into Binary Number System
Binary
Number System has base 2
Operation
|
Value
|
Non-fractional Part
|
0.75 * 2
|
1.50
|
1
|
0.5 * 2
|
1.00
|
1
|
Binary
Number System has base 8
Operation
|
Value
|
Non-fractional Part
|
0.75 * 8
|
6.00
|
6
|
Q: Convert (0.75)10
into Hexadecimal Number System
Binary
Number System has base 16
Operation
|
Value
|
Non-fractional Part
|
0.75 * 16
|
12.00
|
12 (C)
|
Thus, (0.75)10 = (0.C)16
Other Base System(s) to Decimal
Number System
Steps
- Step 1 – Write the weight of each
bit.
- Step 2 – Get the weighted value by
multiplying the weighted position with the respective bit.
- Step 3 – Add all the weighted value
to get the decimal number.
Q: Convert (11101.11)2
into Decimal Number System
(11101.11)2
|
((1
x 24) + (1 x 23) + (1 x 22) + (0 x 21)
+ (1 x 20) + (1 x 2 -1) + (1 x 2 -2))10
|
(16
+ 8 + 4 + 0 + 1 + 0.5 + 0.25)10
|
|
(29.75)10
|
Q: Convert (35.6)8 into
Decimal Number System
(35.6)8
|
((3
x 81) + (5 x 80) + (6 x 8 -1) )10
|
(24
+ 5 0.75)10
|
|
(29.75)10
|
Thus, (35.6)8 = (29.75)10
Q: Convert (1D.C)16
into Decimal Number System
(1D.C)16
|
((1
x 161) + (13 x 160) + (12 x 16 -1) )10
|
(16
+ 13 + 0.75)10
|
|
(29.75)10
|
Thus, (1D.C)16 = (29.75)10
***Other Base System to Non-Decimal
System
Steps
- Step
1
- Convert the original number to a decimal number (base 10).
- Step
2
- Convert the decimal number so obtained to the new base number.
SHORTCUT METHODS
Binary to other systems and
vice-versa
a)
Binary to Octal
1. Break the
number into 3-bit sections starting from LSB to MSB (in case of fractions, from
MSB to LSB).
2. If we do
not have sufficient bits in grouping of 3-bits, we add zeros to the left of MSB
so that all the groups have proper 3-bit number (in case of fractions, we add
trailing zeros in LSB).
3. Write the
3-bit binary number to its octal equivalent.
e.g. (010 110 001 . 101 011)2 = (261.53)8
And for
converting from octal to binary,
simply convert each octal digit into 3-bit binary equivalent.
e.g. (740.6)8 = (111 100 000 . 110)2
b)
Binary to Hexadecimal
Here, we
form the group of 4-bits.
e.g. (0011
0000 0110 . 1101)2 = (306.D)16
And for converting
from hexadecimal to binary, simply
convert each hexadecimal digit to its 4-bit binary equivalent.
e.g. (2C6B.F2)16 = (0010 1100 0110 1011 .
1111 0010)2
Octal to Hexadecimal
1.
Convert each octal digit to 3-bit binary form.
2.
Group them in 4-bit binary form by starting from LSB
to MSB.
3.
Convert these 4-bit blocks into their hexadecimal
symbols.
e.g. (55)8 = (101101)2 = (2D)16
Hexadecimal to Octal
1.
Convert each hexadecimal digit into binary form.
2.
Group them into 3-bit form.
3.
Convert the 3-bit block in octal.
e.g. (2D)16
= (00101101)2 = (55)8
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.