Decimal Number to Octal

229 Views Asked by At

I have the number $9243$ In Decimal (Base 10), I'm trying to convert it to octal and then Binary.

What I've done is (r IS THE REMAINDER)

$4096 | 9243| 2$

$ R = 1051$

$512|1051| 2$

$r = 27$

$8|27|3$

$R = 3$

$0|3|3$

SO I got a value of $2233$ In Octal

But the answer is 22033, where did I go Wrong? And how would I go about converting the correct answer to binary?

1

There are 1 best solutions below

1
On BEST ANSWER

I really don't understand what you mean by the "p|q|" notation but this is how I would do the problem: 8 divides into 9243 1155 times with remainder 3 so 9243= (1155)8+ 3. 8 divides into 1155 144 times with remainder 3 so 1155= (144)8+ 3 and 9243= ((144)(8)+ 3)(8)+ 3= 144(8^2)+ 3(8)+ 3. 8 divides into 144 exactly 18 times with 0 remainder: 144= (18)(8) so 9243= (18)(8)(8^2)+ 3(8)+ 3= (18)(8^3)+ 3(8)+ 3. 8 divides into 18 twice with remainder 2: 18= 2(8)+ 2 so 9243= (2(8)+ 2)(8^3)+ 3(8)+ 3= 2(8^4)+ 2(8^3)+ 3(8)+ 3. Notice that there is no "8^2" term so we should write this as 2(8^4)+ 2(8^3)+ 0(8^2)+ 3(8)+ 3 so we are sure we haven't skipped a place. I suspect that was your error. In base 8, 9243 would be written as 22033. (You could have checked you answer by "expanding". 2233 in base 8 is 2(8^3)+ 2(8^2)+ 3(8)+ 3= 1179, not 9243.)

Now, 3= 2+ 1, and 8= 2^3 so 9423= 2(8^4)+ 2(8^3)+ 0(8^2)+3(8)+ 3= 2(2^12)+ 2(2^9)+ (2+ 1)(2^3)+ 2+ 1= 2^(13)+ 2^10+ 2^4+ 2^3+ 2+ 1. So in base 2, 9243 would be 10010000011011. Again, we have to put in 0s for the missing powers of 2.

(As you can see, I tried to use "comment" three times but couldn't get it to work!)