Board Thread:General Discussion/@comment-27557697-20150305123406

Just for fun, I decided to come up with the easiest tutorial for how to count in Binary which may or may not be useful to you at all. Being a Grade 10 student wanting to go into the engineering field, I have needed this and been tested on it before. It sometimes seems confusing at first but with a tiny bit of practice you can really never forget.

What is Binary?

Binary is the most basic of things when it comes to programming. In essence it is the raw 0's and 1's that the computer receives. 0's being an "off" state and 1's being an "on" state. Each of these 0's and 1's form a "bit". 8 "bits" together form a "byte". When we are talking about storage space on your phone, you are usually talking about binary in large quantities or more so to pertain to gigabytes. 1024 bytes are in a kilobyte, 1024 kilobytes to a megabyte. 1024 megabytes to a gigabyte. If your phone has 32 Gigabytes of data, that is a lot of 0's and 1's. But how would we count in this system?

Simple.

In Decimal (which is what people use when they count temperature, distance etc.) we have 10 digits ranging from 0 to 9. We would have a number like this:

Tens digit > 5 7 <-- Ones Digit

In binary things work very similarily. We have 2 digits ranging from 0 to 1. And because we only have 2 digits, we don't use "tens" digits whereas we instead use powers of 2. Here's an example

Twos Digit >  1 0 <--- Ones Digit

When we are counting in binary, whenever we see a digit has a 1, we would count that number in decimal. A whole byte would look something like this:

1 0 0 1 0 0 1 1

Counting from right to left we see the place value digits in this order: 1, 2, 4, 8, 16, 32, 64, 128. This byte contains 1's in the 128, 16, 2, and 1's digits. Therefore 128 + 16 + 2 + 1 = 147 and we know that the byte is 147 in decimal.

So we know how to convert out of binary. How would we convert into it? Simply reversing the procedure. FInd the highest place value and indicate that as a 1. Find the next and so on until the decimal value becomes 0.

Whether this has helped you or not, I hope you had a good read at least. 