Denary to Binary

Convert denary to binary:

Reminder of column headings / place values for the binary number system: 128  64  32  16  8  4  2  1

Convert the denary number 83 to binary:


      128   64    32    16    8    4    2    1
             1     0     1    0    0    1    1               64 + 16 + 2 + 1 = 83
    

The binary number system uses column headings of 1, 2, 4, 8, 16, 32, 64, 128..., multiplying by 2 each time as the number system is base 2.

Whereas the denary number system, what we use normally, uses column headings of 1, 10, 100, 1000, 10000..., multiplying by 10 each time as the number system is base 10.

Example

To convert a denary number into binary, work from the right-hand end of the place values placing a 1 in any columns that are needed to make up the original number.

Place values / column headings = 128 64 32 16 8 4 2 1

Convert 45 to binary:

  • 128 and 64 are not need to make 45. We can write a 0 underneath those 2 column headings.
    
              128   64    32    16    8    4    2    1
                0    0
            
  • 32 goes into 45, therefore we write 1 underneath 32.
    45 - 32 = 13 remaining
    
              128   64    32    16    8    4    2    1
                0    0     1
            
  • 16 does not go into 13. We can write a 0 underneath that column heading.
    
              128   64    32    16    8    4    2    1
                0    0     1     0
            
  • 8 goes into 13, therefore we write 1 underneath 8.
    13 - 8 = 5 remaining
    
              128   64    32    16    8    4    2    1
                0    0     1     0    1
            
  • 4 goes into 5, therefore we write 1 underneath 4.
    5 - 4 = 1 remaining
    
              128   64    32    16    8    4    2    1
                0    0     1     0    1    1
            
  • 2 does not go into 1. We can write a 0 underneath that column heading.
    
              128   64    32    16    8    4    2    1
                0    0     1     0    1    1    0
            
  • 1 goes into 1, therefore we write 1 underneath 1.
    1 - 1 = 0 finished!
    
              128   64    32    16    8    4    2    1
                0    0     1     0    1    1    0    1
            
    Final answer is 00101101, written as a byte. The two leading zeros are not required, unless you are asked to give your answer in 8 bits / a byte.

References: