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).
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?
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?
- 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!
- The giveaway is open to any young person aged between 14 and 18 based in the UK.
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 email@example.com. 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: