Section 6.2: Binary numbers (Frame 4)                     [prev][home][next]

As an example, let's convert 54000 to binary. Looking at the table, we see that 54000 lies between 32768 and 65536, so we can start at 32768. With each subtraction decision, we mark whether we could subtract with a 0 or 1, as shown below:

     54000     Starting number to convert
    -32768     Can subtract 32768                1
 ---------
     21232     After subtraction
    -16384     Can subtract next lower power     1
 ---------
      4848     After subtraction
     -8192     Can't subtract                    0
 ---------
      4848     Leave the number alone
     -4096     Can subtract next lower power     1
 ---------
       752     After subtraction
     -2048     Can't subtract                    0
 ---------
       752     Leave the  number alone
     -1024     Can't subtract                    0
 ---------
       752     Leave the number alone
      -512     Can subtract 512                  1
 ---------
       240     After subtraction
      -256     Can't subtract                    0
 ---------
       240     Leave the number alone
      -128     Can subtract 128                  1
 ---------
       112     After subtraction
       -64     Can subtract 64                   1
 ---------
        48     After subtraction
       -32     Can subtract                      1
 ---------
        16     After subtraction
       -16     Can subtract 16                   1
 ---------
         0     After subtraction
        -8     Can't subtract                    0
 ---------
         0
        -4     Can't subtract                    0
 ---------
         0
        -2     Can't subtract                    0
 ---------
         0
        -1     Can't subtract                    0
 ---------
         0

This entire tedious process is carried out in detail as an example. The final binary numeral can be read off by lining up the 1s and 0s, starting from the top:

1101001011110000