Back

Converting from denary to binary

When converting numbers into or out of binary, always jot down the 'worth' of each bit position. It will really help you avoid mistakes.
Usually, jotting down the bit positons for a single byte is sufficient, but you could add even more bit positions if you needed to.

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
128 64 32 16 8 4 2 1

Example 1
Convert 9 into binary.
  

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
128 64 32 16 8 4 2 1
        1 0 0 1

Look for the biggest number that will go into 9.

     16 won't go into 9.
     8 will go into 9 so we need one 8.
     That leaves us with a remainder 1.
     4 won't go into 1.
     2 won't go into 1.
     1 goes into 1 once.

That means our answer is 1001. We can also show the answer as a whole byte, so the answer is 0000 1001. They are the same answer because leading zeros don't actually change a number. For example, using denary, 045 is the same as 45.

Example 2
Convert 49 into binary.
 

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
128 64 32 16 8 4 2 1
     1  1 0 0 0 1

Look for the biggest number that will go into 49.

     64 won't go into 49.
     32 will go into 49 so we need one 32.
     That leaves us with a remainder 17.
     16 will go into 17 so we need one 16.
     That leaves us with a remainder of 1.
     8 won't go into 1. 
     4 won't go into 1. 
     2 won't go into 1.
     1 goes into 1 once.

That means our answer is 110001. We could also show the answer as a whole byte, so the answer is 0011 0001. 

Example 3
Convert 134 into binary.
 

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
128 64 32 16 8 4 2 1
 1  0  0 0 1 1 0

Look for the biggest number that will go into 134.

     128 will go into 134.
     That leaves a remainder of 6.
     64 won't go into 6.
     32 won't go into 6.
     16 won't go into 6. 
     8 won't go into 6. 
     4 will go into 6 and that leaves a remainder of 2. 
     2 will go into 2 with no remainder.
     1 won't go into 0.

That means our answer is 1000 0110.

Work out the answers to the following questions without a calculatorWhen you have done as many as you can, check your answers against the answers of someone sitting next to you. Then check your answers using a calculator or an onine converter.

Q1. Convert 3 into a binary number. Show your answer as a nibble.
Q2. Convert 3 into a binary number. Show your answer as a byte.
Q3. Convert 12 into a binary number. Show your answer as a nibble.
Q4. Convert 12 into a binary number. Show your answer as a byte.
Q5. Convert 15 into a binary number. Show your answer as a nibble.
Q6. Convert 15 into a binary number. Show your answer as a byte.
Q7. Convert 0 into a binary number. Show your answer as a nibble.
Q8. Convert 26 into a binary number. Show your answer as a byte.
Q9. Convert 36 into a binary number. Show your answer as a byte.
Q10. Convert 37 into a binary number. Show your answer as a byte.
Q11. Convert 64 into a binary number. Show your answer as a byte.
Q12. Convert 79 into a binary number. Show your answer as a byte.
Q13. Convert 97 into a binary number. Show your answer as a byte.
Q14. Convert 107 into a binary number. Show your answer as a byte.
Q15. Convert 122 into a binary number. Show your answer as a byte.
Q16. Convert 130 into a binary number. Show your answer as a byte.
Q17. Convert 165 into a binary number. Show your answer as a byte.
Q18. Convert 189 into a binary number. Show your answer as a byte.
Q19. Convert 243 into a binary number. Show your answer as a byte.
Q20. Convert 255 into a binary number. Show your answer as a byte.

Extension questions
You will need to work out the worth of each bit position for two-byte numbers before you tackle these.
Q21. Convert 260 into a binary number. Show your answer using two bytes.
Q22. Convert 288 into a binary number. Show your answer using two bytes.
Q23. Convert 500 into a binary number. Show your answer using two bytes.
Q24. Convert 14634 into a binary number. Show your answer using two bytes.
Q25. Convert 55003 into a binary number. Show your answer using two bytes.

Back