<<< Binary to Decimal Conversion     Index     Decimal to Binary Conversion Summary >>>

12. Decimal to Binary Conversion


  1. 105 a positive, odd number.

     

  2. Our task is to find values of bits a7 through a0 as follows:

  3. a7 is zero, because 105 is positive:

        position: 76543210
           value: 0???????
    

     

  4. a0 is one, because 105 is odd:

        position: 76543210
           value: 0??????1
    

     

  5. Subtracting one from 105 yields 104:

  6. Dividing both sides of the equation by 2 yields

  7. Since 52 is even, so a1 equals to zero:

        position: 76543210
           value: 0?????01
    

     

  8. Next, we can iterate back to

  9. Dividing both sides by 2 yields

  10. Subtracting one from both sides yields

  11. Dividing both sides by 2 yields

  12. Dividing both sides by 2 yields

  13. And, finally,

<<< Binary to Decimal Conversion     Index     Decimal to Binary Conversion Summary >>>