Micro Challenge #35 – Converting from binary into denary

24 June 2020 - 3 minute read

Welcome to the thirty-fifth of Altitude Foundation’s #MicroChallenges2020

Today’s challenge will help you create a tool to convert binary to decimal numbers

What’s a Micro Challenge?

These challenges are short activities to help you develop, revise or refresh your coding skills, posted every Monday, Wednesday and Friday.

Micro Challenge #35

Binary is a form of ‘base notation’, which means that it uses numbers and their location to indicate information. You can learn more about it in our previous challenge. Denary is another name for decimal base notation (the standard number system used around the world).

The Challenge:

Your challenge today is to convert Binary Numbers into Denary Numbers – and create a tree diagram to help you!

First, if you’re already familiar with this conversion, can you convert the following binary numbers into denary without checking a conversion chart?

  • 0
  • 101
  • 11011
  • 10110

One way to convert the binary numbers is to create a conversion tree. This might look like this:

The branching is determined by the final digit in the binary number – if it is 0, it belongs on the left branch, if the digit is 1, it belongs on the right branch. Could you create a binary tree which goes up to 14?

Review it:

  • Can you go higher than 14? How might the conversion tree help you with larger binary numbers?


  • Could you translate the conversion tree into pseudocode for a programme? 
    • Tip: think about what number you start with in the conversion tree!

Win a micro:bit!

Don’t forget: If you submit your response to Challenge #32 via the Share It options below before the 30th of June, you will be entered into a prize draw for one of 5 micro:bits.

  • The giveaway is open to any young person aged between 14 and 18 based in the UK. 

Share it

We would love to see what you have created! Please send any pictures, videos, or files of your activities to us – either via Facebook, Twitter or Instagram  using #MicroChallenges2020 or to challenges@altitudefoundation.org. If you are emailing them to us, please let us know if you are happy for us to share your stuff on our social media platforms (with credit, of course). 

Sign-up here to receive a weekly email with Micro Challenges top tips and solutions:

Leave a comment

Leave a Reply