Binary + Decimal Numbers

Report a question

You cannot submit an empty report. Please add some details.
0%
1 votes, 5 avg
300
Created on By red-rewards.com

Computer Science

Binary + Decimal Numbers

Can you convert binary numbers to decimal (normal) numbers and vice versa?
Tip: When converting decimal numbers to binary, use as few bits as possible
(Example: 5 = 101; NOT 0101, 00101 ….)

1 / 10

What is 100110 in decimal?

2 / 10

What is 11101 in decimal?

3 / 10

What is 47 in binary?

4 / 10

What is 51 in binary?

5 / 10

What is 54 in binary?

6 / 10

What is 111000 in decimal?

7 / 10

What is 11010 in decimal?

8 / 10

What is 23 in binary?

9 / 10

What is 21 in binary?

10 / 10

What is 48 in binary?

Your score is

The average score is 35%

0%

Useful Powers of 2

20 = 1123 = 10008
21 = 10224 = 1000016
22 = 100425 = 10000032

Quiz Guide

To help you with this quiz, I’ve created a guide explaining binary numbers.

First of all, what are decimal numbers?

Decimal numbers are the regular numbers we use on a day to day basis. Each position in a decimal number can be one of ten different digits, those being {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.
When you see the number “123”, it doesn’t represent 1 + 2 + 3 or 1 * 2 * 3, rather it means:

1 * 102 + 2 * 101 + 3 * 100

Which in words means one-hundred and twenty three. While this might seem basic, it’s key to understanding how binary numbers work.

What are binary numbers

Binary numbers are numbers that can be represented by one of two digits, those being 0 or 1.
When you see the number “1011”, it means:

1 * 23 + 0 * 22 + 1 * 21 + 1 *20

You end up with the following sum:

8 + 0 + 2 + 1 = 11

Unlike decimal numbers, where each digit represents a power of ten, each digit in a binary number represents a power of two. The far-right digit representing the smallest power of two, that being 20 = 1. In the example above, the far-left digit represents the largest power of two, in this case being 23 = 8.

As you’ve already seen, I’ve left a table of powers of 2 to help you with the quiz

Conversion examples

Now that we know the basics, let’s try converting some decimal numbers into binary and vice versa. For my examples, I’ll be using numbers smaller than 64, just like the questions in the quiz.

Convert 42 into binary

To start, let’s find out the largest power of 2, that is smaller than our number. According to our table of powers of 2 above, the largest one, that is still smaller than 42, would be 25, which is 32. Our number will look something like this:

1 * 25 + X * 24 + X * 23 + X * 22 + X * 21 + X *20

We’ll now subtract 32 from 42. 42 – 32 is 10. Now we need to go through the powers of two smaller than 25 and see if they’re smaller than 10.

Is 24 = 16 smaller than 10? Nope. Our number will look something like this:

1 * 25 + 0 * 24 + X * 23 + X * 22 + X * 21 + X *20

The next power of two is 23 = 8. Is that smaller than 10? Yes it is! Our number will look something like this:

1 * 25 + 0 * 24 + 1 * 23 + X * 22 + X * 21 + X *20

We’ll now subtract 8 from 10. 10 – 8 is 2.

Since 2 is 21, we know that that position in the number has to be 1, whilst the position for 22 has to be 0. And since 2 – 2 = 0, there are no longer any powers of 2 smaller than 0, hence we have our binary number, which is:

1 * 25 + 0 * 24 + 1 * 23 + 0 * 22 + 1 * 21 + 0 *20 = 101010

We can double check whether the number is correct:

32 + 0 + 8 + 0 + 2 + 0 = 42

Convert 10111 into decimal

Now let’s do the opposite. Since our binary number has 5 digits, it looks like this:

1 * 24 + 0 * 23 + 1 * 22 + 1 * 21 + 1 *20

Now let’s calculate this:

16 + 0 + 4 + 2 + 1 = 23

Conclusion

I really hope this guide helped you to understand what binary numbers are or were a good refresher.

Please disable your adblocker or whitelist this site!

Ads help us supply the rewards you can redeem in the shop

If our ads are too intrusive, don’t hesitate to contact us via email: support@red-rewards.com
You can also message us in our discord server: https://discord.gg/hEYJxKCrfe