Today I'd like to introduce a table to understand how to convert between decimal and binary.

ErmiteUrbain made a table to show how Amir CPS's converter THJ835-1 works.

ErmiteUrbain also rewrote Amir's converter. The new one is THJ835-2.

Thank you ErmiteUrbain for sharing your understanding!

Please post your programs or ideas to the forum thread Nominate games (or other programs) here to get featured on our Blog! (PART 3).

another method dec->bin (iterative)

start from 2^n=2^n else write 0

dec n by 1

repeat from loop: until 2^n>=1 with given result(53-32*1=21)

result sequence:

53>32= (1) 53-32=21

21>16=(1) 21-16=5

5>>> 5

5>4=(1) 5-4=1

1>>> 1

1>=1=(1) 1-1=0

so the result will be 110101(2)=32+16+4+1=53

dec2bin demo: KFW828