Binary to Decimal Challenge

Binary to Decimal Challenge

Welcome to the Binary Code-Cracking Challenge!

Ever wondered how computers understand everything? They use a secret language made of just two symbols: 0s and 1s! This is called binary code. In this quiz, you'll become a pro at translating these binary messages into numbers we understand every day (called decimal or denary numbers).

This is a super important skill in Computer Science, helping you understand how data is stored, processed, and transmitted inside any digital device, from your smartphone to a supercomputer!

Ready to Ace It? Here’s How:

Let's Learn How to Convert Binary!

Before you dive into the quiz, let's go through a step-by-step example. This will help you understand the trick to changing binary numbers into decimal numbers.

Example Question: Convert the binary number 10110101 to decimal.

Walkthrough:

Think of each digit in a binary number as a special "switch" that is either ON (1) or OFF (0). Each switch is connected to a light bulb, and each light bulb has a unique value.

  1. Identify Place Values:

    Starting from the rightmost digit (the very end of the binary number), each position has a specific value that doubles as you move left:

    • Rightmost digit: 1s place (which is 2 to the power of 0, or 20)
    • Second from right: 2s place (2 to the power of 1, or 21)
    • Third from right: 4s place (2 to the power of 2, or 22)
    • And so on... 8s place, 16s place, 32s place, 64s place, and for an 8-digit binary number, the leftmost is the 128s place (2 to the power of 7, or 27).
  2. Match Binary Digits to Place Values:

    For each position in the binary number, look at the digit ('1' or '0') and its place value:

    For our example, 10110101:

    • The first '1' on the far left (8th digit) is at the 128s place. So, 1 × 128 = 128.
    • The '0' (7th digit) is at the 64s place. So, 0 × 64 = 0.
    • The '1' (6th digit) is at the 32s place. So, 1 × 32 = 32.
    • The '1' (5th digit) is at the 16s place. So, 1 × 16 = 16.
    • The '0' (4th digit) is at the 8s place. So, 0 × 8 = 0.
    • The '1' (3rd digit) is at the 4s place. So, 1 × 4 = 4.
    • The '0' (2nd digit) is at the 2s place. So, 0 × 2 = 0.
    • The '1' on the far right (1st digit) is at the 1s place. So, 1 × 1 = 1.
  3. Add the "ON" Values:

    Finally, add up all the values from the positions where the binary digit was a '1' (the "ON" switches):

    128 + 0 + 32 + 16 + 0 + 4 + 0 + 1 = 181.

    So, 10110101 in binary is 181 in decimal!