Social Media

« Twitter - Filtered | Main

Binary Counting - Filtered

 

The best place to learn about computers, is to understand how computers communicate compared to you and me. Right now, you are reading text on a screen; letters that you interpret into words and words into their respective meanings. Computers do not communicate this way (or at least in the sense of written text on a screen)

So how do computers communicate? The answer is simple, but how that relates to you and me, may not be. But the simple way that computers communicate is... Binary.

What Is Binary & What Do We Count With?

Simply put binary is the same as you and I count, but instead of counting to 10 (Base 10), in binary you count to 2 (Base 2). The best way to visualize this form of counting is to imagine yourself back in elementary school math class. Your teacher would put something like this on the board

Thousands (1000's)     Hundreds (100's)    Tens (10's)   Ones (1's)


The teacher then would give you a number like 1,024 and ask you to indicate how many of each type you had in that number. The logic that followed was you taking the number of 1000's in 1024 (1) and putting a '1' under the thousands spot. Leaving you with 024. You would then follow similar logic with the 0, 2, and 4 placing them under their corresponding sections, until you finished and noted how many of each you had. This is Base 10 counting. (See you knew more than you thought!)

So in Base 10 counting you would count; 0,1,2,3,4,5,6,7,8,9, and upon reaching 9 (9 1's) you would have to reset the 1's and increment the Tens by 1 giving you 10, or 1 Ten, and 0 One's. This progression of counting would continue soon reaching hundreds, thousands, and so on. So how does this Binary work? Exactly the same.

All That's Different Is The Same

So wait, if we count in Base 10, how can Binary (Base 2) be the same thing? Well it is the same in that you count the same way you did in grade school, it's just that the buckets that hold the Thousands, Hundreds, Tens, and Ones get a lot smaller. Meaning, in Base 10, your bucket could hold 10 numbers (0-9) before it overflowed into the next bucket up, but in Base 2, your bucket can only hold 2 numbers (0-1) before it overflows. Lets take a look at how Binary buckets look.

128's  64's  32's  16's  8's  4's  2's  1's

Looks fairly daunting doesn't it? Well its no more so than 1000's, 100's, 10's, and 1's, it's just that you're not used to it. So if you think of normal Base 10, each bucket is 10 times bigger than the bucket before it. 10's is ten times 1, 100 is ten times 10, 1000 is ten times 100, and so on. Base 2 is the same idea, but each bucket is two times the bucket before; 2's is two times 1's, 4's is two times 2's, 8's is two times 4's, etc. So really it's the same idea.

So how do we count with these new smaller buckets? The same way you did with the bigger ones, just with many more of those buckets!

Counting is fairly easy in Binary (Base 2), you start with 0 then count to 1, just like you would count from 0-9. Well since each bucket only holds 2 numbers (0 or 1) you have filled up your first bucket and need to spill into the next bucket (2's). So you count to 1 in the 2's area giving you, 10 (Not ten, One and Zero). Just like when you count to 10, you start filling the 1's group again, same in Binary. 2 + 1 is 3, but since this is Base 2, there is no 3 only 1's and 0's. You have the 2's group filled with a one, so you now add a one to the 1's grouping giving you 11 (one, one, not 3). So now to count to 4 you would like normal add 1 to 3, but notice how you have two full buckets 1&1, same idea as before, you add 1 to the 1's bucket, it overflows into the 2's bucket, and it overflows into the 4's bucket giving you 100. And the process continues like this, so 5 would be 101 or one 4, and one 1. 6 is one 4, and one 2.

Breaking down a number like we did in our first example is similar although it requires a little math. So if we used the example of 124, much like what we did above, you need to determine how many of each Base 2 number you have. so you would write out your base 2 counting

128's 64's 32's 16's 8's 4's 2's 1's

and follow a path of logic similar to this; "I have 124, so I don't have any 128's but 1 64 could fit into 124" So you would put a "1" in the 64's area. So now with 64 of the 124 accounted for, you now have 60 to deal with. Next you would say "Well there is one 32 in 64 so now I write "11" to represent those 2 numbers." This now leaves you with 124-64-32 or 8. So you notice now that there are no 16's in 8, so you place a 0 where the 16's would go, giving you 110. Now you know there is 1 8 in 8 so you place a 1 for the 8's giving you 1101. Now since you have no more numbers to allocate you have to fill 0's in to the 1's place just like you would do with normal numbers. so 124 in binary = 110100. Congratulations, you have counted in binary!

So That's How Computers Talk?

Well in short yes, computers talk in Binary. In simple terms every letter you see on your screen is represented in Binary numbers. For example 'A' in binary is represented by 0100001 or "65". So in computer speak, the letter A is one Byte or 8 binary numbers each of which is called a Bit. Each binary 1 or 0 is a Bit and every 8 binary bits is a Byte. Simply put, every letter, comma, and period on this page is made up of multiple Bytes and 8 times as many bits.

Let's Filter the Filter

Remember, it took you a decent amount of school to learn how to count in Base 10, don't expect to learn Base 2 overnight, it takes some practice to train your mind, but to recap;

  1. Think of Buckets that each hold a set amount of numbers, Base 10's buckets hold 10 numbers (0-9) and Base 2 (Binary) hold 2 (0-1)
  2. Just like in normal counting, when you fill a bucket up, you increment the bucket to the left of it.

Really that's all there is to it. It may look just like 1's and 0's but when lined up you can count just as far as you could going 0-9.

There are other number systems, like Base 8 (Octal), and Base 16 (Hexadecimal), but we can save that for another article.

 

Further Reading (Remove the Filter)

Wikipedia article on Binary, it gets rather geeky, but it is a good write-up

Youtube video of binary counting - There are a ton of great videos that demonstrate binary counting.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>