## Binary System

Have you ever wondered what the series of 1s and 0s are when you turn on the computer? Well, the 1s and 0s are the two components of the Binary System, the number system that your computer uses!

I'm sure that you all know how to count to ten, how to add two numbers, subtract two numbers, and even multiply and divide two numbers. Well, when we count, we count "0, 1,2,3,4,5,6,7,8,9,10,11…" and so on. This is the Decimal System. In the decimal system, we write numbers in a base 10- that is, every number represents a polynomial in powers of ten.

In other words, let's take a look at the number 1,394. As you know, 1,394 is the same as:

1,000 + 300 + 90 + 4

which is the same as:

1 x (10)^3 + 3 x (10)^2 + 9 X (10)^1 + 4 x (10)^0

As you can see, you multiply each digit by 10 to a certain power, then add up all of the results. Well, you can learn to count in a different base by using this technique. For example, let's say you have the number 3,142 in base 5. It would be written as:

3 x (5)^3 + 1 x (5)^2 + 4 x (5)^1 + 2 x (5)^0

This is the same as the number 422 in base 10.

Similarly, you can write numbers in base 3, base 6, or even base 22!

The binary system is when numbers are written in base 2. Thus, the number 11001 would be:

1 x (2)^4 + 1 x (2)^3 + 0 x (2)^2 + 0 X (2)^1 + 1 x (2)^0

Keep in mind that when you use different bases, you cannot use digits that are equal to or higher than the value of the base. For example, if you were writing in base 6, you could only use the digits 0, 1, 2, 3, 4, and 5. You could not use 6, 7, 8, or 9. Thus, in base 2, you could only use the digits 0 and 1. Each digit in the binary system (either a 1 or a 0) is called a binary digit, or a bit, for short. When 8 bits are used in conjunction in a computer system, they can represent a single character-like a letter in the alphabet, a punctuation mark, or any other special character! The combination of 8 bits is called a byte. Bytes can be stringed together to create words, sentences, and paragraphs! These tell the computer what to do! Sometimes, you might hear that your computer has 64 megabytes of memory. One megabyte is equal to one million bytes (1 kilobyte = 1,000 bytes, and 1 gigabyte = 1 billion bytes), so your computer would be able to store 64 million bytes, or 64 million characters!

Well, why does a computer use the binary system instead of the decimal system? Well, the binary system can be very practical, especially in digital devices. In a nutshell, computers can easily use electrical currents to represent 1s or 0s. If there is a current, then a 1 is read by the computer. However, if there is no current, then a 0 would be read. However, if computers were to use the Decimal System, they'd have to come up with all sorts of confusing ways to represent each of the digits-maybe they'd have to have an electrical current ½ full, etc. See how easy it is to represent two digits, versus 10?

In addition, the binary system is very precise and specific, which is exactly what computers need. There are only two values, 1 or 0. There are no vague values in between-no .3545, no 1.27.

Now, learn about Boolean Logic- the concept of using logic gates to write all sorts of things used by your computer in terms of binary digits, or bits!