1 Answers
Best Answer
You obtain the binary expansion of an integer by consecutively dividing the integer by 2 until you obtain 0.
321=2*160+1
160=2*80+0
80=2*40+0
40=2*20+0
20=2*10+0
10=2*5+0
5=2*2+1
2=2*1+0
1=2*0+1
The successive remainders of each division represents the binary expansion from right to left.
101000001
321=2*160+1
160=2*80+0
80=2*40+0
40=2*20+0
20=2*10+0
10=2*5+0
5=2*2+1
2=2*1+0
1=2*0+1
The successive remainders of each division represents the binary expansion from right to left.
101000001