Binary is a number system that can be used to count. For each digit you have 2 possible numbers: 0 & 1. This is why we refer to binary as Base 2.

Alternately, in decimal( what we commonly use ), for each digit we have 10 possible numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. We call this Base 10.

We’re used to counting in decimal because we have 10 fingers(and we’re taught that way), but computers are made up of wires and switches that turn off and on(really quickly), so computers use binary.

Counting in binary works exactly like counting in decimal(even though you might not think so at first), but that’s probably just because we might not necessarily think about how exactly it is we’ve been counting for so long.

Most computers generally measure in bytes. 1 byte = 8 bits, or 8 digits in binary, so in a computer, the data being stored would look something like this:

00000100 10001001 11001000 10110010

Above is 4 bytes, which is a pretty commonly used standard size for storing a number in a computer. This 4-byte binary value(if it’s being used as a signed number) has a range of –2,147,483,648 to 2,147,483,647.(signed meaning positive or negative)

So how does the computer interpret binary as a number? Let’s do something simpler.

The following are 4 bit numbers and their decimal equivalents.

1110 : 14

0001 : 1

1000 : 8

1100 : 12

1111 : 15

Are you seeing the pattern yet?

Just like when we count in decimal, we start with 1 digit and count to 9; then we go to ten right? Yes, kind-of… What we’re really doing when counting to 9 is counting the number of ones and every time we start over with counting the number of ones, we count the number of tens. When we count past 9 tens and 9 ones, we count to 1 hundred, 0 tens, and 0 ones. That’s 100 right? Each digit has a name in Base 10, we start at the right with ones, then we have tens, then hundreds, thousands, and so on. Each one of these places is a “power” ( symbol: ^ ) of 10. To make 100 for instance, we would say that’s 1 to the power of a hundred.

Now take a bigger number like 1,263: it can be counted as follows:

3 times 10^0 + 6 times 10^1 + 2 times 10^2 + 1 times 10^3 = 1,263

It’s exactly the same with binary, only the number of digits grows considerably faster.

So counting in binary looks like this:

0000 : 0

0001 : 1

0010 : 2

0011 : 3

0100 : 4

0101 : 5

0110 : 6

0111 : 7

1000 : 8

Lets look at the 4-byte number again, if we start at the very right( and ignore multiplying by 0 ),

00000100 10001001 11001000 10110010

1 times 2^1 + 1 times 2^5 + 1 times 2^6 + 1 times 2^8 +

1 times 2^12 + 1 times 2^15 + 1 times 2^16 +

1 times 2^17 + 1 times 2^20 + 1 times 2^24 +

1 times 2^27 = 76,138,674

And that’s how you count in binary.