binvis

Visualize the binary number system.


00000000

0

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1

Click each red or green number to flip its bit!

In Base 10, you would count in the powers of 10. For example,

162

ones, or 10^0: 2,
tens or 10^1: 6,
hundreds or 10^2: 1

So then, to find your number, multiply the values by the correct powers of 10:

10^2(1) + 10^1(6) + 10^0(2) = 162


It works the same in binary,

10100010

Counting in the powers of two, each bit to the left has more value.

2^0 place is 0,
2^1 place is 1
2^2 place is 0...and so on

By adding them up just like in base 10, you can convert the binary number to decimal.

2^0(0) + 2^1(1) + 2^2(0) + 2^3(0) + 2^4(0) + 2^5(1) + 2^6(0) + 2^7(1) = 162

This gives us 162, which is 10100010 represented in decimal.