Binary DilemmasBinary Logic 101

Numbers in Binary

What's up with 01101001?

Are you having trouble with a binary string that looks like gibberish? Let us break it down for you.

01101001 can be decoded as: 0b01101001, or 0b01101000, or 0b01101000.

Which one do you think it is?

Learn More

Why does 10101 equal 21 in base 10?

Don't be a 0b-ject, we'll walk you through it.

To convert binary to decimal, you need to multiply each digit by 2 raised to the power of the digit's position, counting from right to left.

So, 10101 equals 1*2^4 + 0*2^3 + 1*2^2 + 0*2^1 + 1*2^0 = 1*16 + 0*8 + 1*4 + 0*2 + 1*1 = 21

Binary Math Hacks

How do I convert 1001 to decimal?

Don't worry, we won't leave you in the dark.

Just remember: 1*2^3 + 0*2^2 + 0*2^1 + 1*2^0 = 1*8 + 0*4 + 0*2 + 1*1 = 9

More Binary to Decimal Conversions

Still stuck? Check out our Binary for Dummies guide.