0

Converting from base-10 to base-8 is a little trickier, but still straightforward. We basically have to reverse the process from above. Let's start with an example: 150 of base-10. We first find the largest power of 8 that is smaller than our number. Here, this is 82 or 64 (83 is 512). We count how many groups of 64 we can take from 150. This is 2, so the first digit in our base-8 number is 2. We have now accounted for 128 out of 150, so we have 22 left over. The largest power of 8 that is smaller than 22 is 81 (that is, 8). How many groups of 8 can we take from 22? Two groups again, and thus our second digit is 2. Finally, we are left with 6, and can obviously take 6 groups of one from this, our final digit. We end up with 226 of base-8. In fact, we can make this process a touch clearer with math. Here are the steps:

150/82 = 2 remainder 22
22/81 = 2 remainder 6
6/80 = 6
Our final answer is then all of our non-remainder digits, or 226.
my question is same way if we want 65 of base-10 to convert to base-8 what happens ?
any help is appreciated..thanks in advance
Amit
  • 391
  • 3
  • 15
  • Is this some homework? What have you tried so solve this? – Wai Ha Lee Mar 29 '16 at 08:03
  • Thanks for your comment sir, i was trying to solve some bit manipulation problems and i just didnt get how this situation is going to work :) please help – Amit Mar 29 '16 at 08:46

0 Answers0