In number systems, we use remainders for conversion and how actually this thing work out?

130 Views Asked by At
Like for example, 

**PART 1**
while converting a decimal number to octal number, we divide given decimal 
number by '8' until we get quotient equal to '0' and write remainders in 
reverse order to get corresponding octal number.

consider,
163(decimal)--> 163/8  -->  quotient=20(decimal), remainder=3(decimal)
20(decimal) -->  20/8  -->  quotient=2(decimal),  remainder=4(decimal)
2(decimal)  -->   2/8  -->  quotient=0(decimal),  remainder=2(decimal)
thus,
163(decimal)=243(octal).

**PART 2**
Also,lets check whether above conversion result is right or not!
consider,
243(octal)=[2*8^2](decimal)+[4*8^1](decimal)+[3*8^0](decimal)
          =128(decimal)+32(decimal)+3(decimal)
          =163(decimal)
,which proves we have done right decimal to octal coversion in **PART 1**

Now, what I don't understand is, how writing remainders as digits works out automatically!
 
1

There are 1 best solutions below

0
On BEST ANSWER

I am going to try to break this down using your specific example of converting $163$ (decimal) to base eight (octal). The point is, one keeps grouping according to the base, with the remainder at each step becoming the next rightmost digit.

$$\begin{array}{rcl} 163 & =& 8\cdot 20 + 3 \\ &=& 8\cdot(8\cdot 2 + 4) + 3 \\ &=& 8^2\cdot 2 + 8\cdot 4 + 3 \end{array}$$ The last line gives you the octal representation of $163_\rm{ten} = 243_\rm{eight}$ (Two groups of $8^2$, four groups of $8$, and $3$ units).