If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Computers and the Internet

Course: Computers and the Internet>Unit 1

Lesson 2: Binary numbers

Patterns in binary numbers

Explore patterns in binary numbers, and learn to recognize odd and even numbers or to intuit the largest value that can be represented by a certain number of bits. Odd binary numbers always end in 1, and binary numbers with all 1 digits represent a power of 2 minus 1. Created by Pamela Fox.

Want to join the conversation?

• Why we write 0 in front of the numbers just like
Binary of 3- 0011.
• Lots of people type binary in groups of 4/8 with smaller numbers.
• Can you make orange juice with a tangerine
• this was 5 mins and it felt like hrs
• How will this affect LeBron's legacy?
• octopi, octo-why
• what is the meaning of this binary text?
01001011 01101001 01110011 01101000 01101111 01110010 01100101
• The quick brown 🦊 jumps over 13 lazy 🐶.
(1 vote)
• Can some one explain this question to me. I am confused about the equation for solving it.
A bunch of computer scientists take over an island and start their own country. They want the license plates to use binary numbers. There's space for 7 digits on each license plate and the first plate starts at \[0000000\].
How many unique license plates can their country support?
• 7 spots, each with 2 possible answers. 7 to the second power is 49. This is how I solve these problems. I may be wrong, but I think 49 in correct. If anybody else has a different answer, I'll listen.
• hm whgats the one
• Why do you write 0 in front of the numbers?!?!
(1 vote)
• binary numbers use positional notation just like decimal numbers so the number does not have to start with 0. The numbers you have seen have probably shown a fixed number of significant digits with leading zeroes to fill out the significant digits.
• Why do they write 1,2,4,8,12 and not 1,2,3,4,5?
I am sorry js confused.
(1 vote)
• In the decimal number system, each place represents a power of 10 (starting from the rightmost digit). For example, the number 514 is:

4 (the rightmost digit) * 10^0 = 4 * 1 = 4
+ 1 * 10^1 = 10
+ 5 * 10^2 = 500
--------------------------------------------------
514

The binary number system follows a similar structure, but each place represents a power of 2. Using the same example, 514 in the binary number system is 1000000010. In a similar fashion, we start from the rightmost digit and multiply by incremental powers of 2.

0 (the rightmost digit) * 2^0 = 0 * 1 = 0
+ 1 * 2^1 = 2
+ 0 * 2^2 = 0
+ 0 * 2^3 = 0
+ 0 * 2^4 = 0
+ 0 * 2^5 = 0
+ 0 * 2^6 = 0
+ 0 * 2^7 = 0
+ 0 * 2^8 = 0
+ 1 * 2^9 = 512
--------------------------------------------------
514 (in the decimal number system)

Since each place represents a power of 2 in the binary number system, the video uses 1, 2, 4, 8, ...etc. to show what we will multiply the binary digit by when converting to decimal.

You can reference the two earlier videos within this lesson ("Decimal system refresher" and "The binary number system") for additional clarity on these topics.