In: Computer Science
Convert the following to Octal, hexadecimal and binary (long method (multiply and Divide by methods))
2647.95 (10)
Given decimal number: 2647.95
Decimal to Octal:
converting integer part to octal
Result | Remainder | |
8 | 2647 | |
8 | 330 | 7 |
8 | 41 | 2 |
8 | 5 | 1 |
8 | 0 | 5 |
(2647)10 = (5127)8
converting fractional part to octal
product | product | integer part | |
8 | 0.95 | 8*0.95 = 7.6 | 7 |
8 | 0.6 | 8*0.6 = 4.8 | 4 |
8 | 0.8 | 8*0.8 = 6.4 | 6 |
8 | 0.4 | 8*0.4 = 3.2 | 3 |
8 | 0.2 | 8*0.2 = 1.6 | 1 |
8 | 0.6 | 8*0.6 = 4.8 | 4 |
8 | 0.8 | 8*0.8 = 6.4 | 6 |
8 | 0.4 | 8*0.4 = 3.2 | 3 |
8 | 0.2 | 8*0.2 = 1.6 | 1 |
the same will repeat endless
(0.95)10 = (0.7463146314631463)8
so (2647.95)10 = (5127.74631463146314631463)8
Decimal to Hexadecimal:
converting integer part to hexadecimal
Result | Remainder | Remainder in hex | |
16 | 2647 | ||
16 | 165 | 7 | 7 |
16 | 10 | 5 | 5 |
0 | 10 | A |
(2647)10 = (A57)16
converting fractional part to hexadecimal
product | product | integer part | hex number | |
16 | 0.95 | 16*0.95 = 15.2 | 15 | F |
16 | 0.2 | 16*0.2 = 3.2 | 3 | 3 |
16 | 0.2 | 16*0.2 = 3.2 | 3 | 3 |
16 | 0.2 | 16*0.2 = 3.2 | 3 | 3 |
the same will repeat endless
(0.95)10 = (0.F333333)16
so (2647.95)10 = (A57.F3333333333)16
Decimal to Binary:
converting integer part to binary
Result | Remainder | |
2 | 2647 | |
2 | 1323 | 1 |
2 | 661 | 1 |
2 | 330 | 1 |
2 | 165 | 0 |
2 | 82 | 1 |
2 | 41 | 0 |
2 | 20 | 1 |
2 | 10 | 0 |
2 | 5 | 0 |
2 | 2 | 1 |
2 | 1 | 0 |
(2647)10 = (101001010111)2
convert fractional part to binary:
product | product | integer part | |
2 | 0.95 | 2*0.95 = 1.9 | 1 |
2 | 0.9 | 2*0.9 = 1.8 | 1 |
2 | 0.8 | 2*0.8 = 1.6 | 1 |
2 | 0.6 | 2*0.6 = 1.2 | 1 |
2 | 0.2 | 2*0.2 = 0.4 | 0 |
2 | 0.4 | 2*0.4 = 0.8 | 0 |
2 | 0.8 | 2*0.8 = 1.6 | 1 |
2 | 0.6 | 2*0.6 = 1.2 | 1 |
2 | 0.2 | 2*0.2 = 0.4 | 0 |
2 | 0.4 | 2*0.4 = 0.8 | 0 |
2 | 0.8 | 2*0.8 = 1.6 | 1 |
2 | 0.6 | 2*0.6 = 1.2 | 1 |
the same will repeat endless
(0.95)10 = (0.111100110011)2
so (2647.95)10 = (101001010111.111100110011)2