What is Binary?



WHAT IS BINARY?

Pertaining to a number system that has just two unique digits. For most purposes, we use the decimal number system, which has ten unique digits, 0 through 9. All other numbers are then formed by combining these ten digits.Computers are based on the binary numbering system, which consists of just two unique numbers, 0 and 1. All operations that are possible in the decimal system (addition, subtraction, multiplication, division) are equally possible in the binary system.
We use the decimal system in everyday life because it seems more natural (we have ten fingers and ten toes). For the computer, the binary system is more natural because of its electrical nature (charged versus uncharged).
In the decimal system, each digit position represents a value of 10 to the position's power. For example, the number 345 means:
3 three 100s (10 to the 2nd power)
plus
4 four 10s (10 to the first power)
plus
5 five 1s (10 to the zeroth power)
In the binary system, each digit position represents a value of 2. For example, the binary number 1011 equals:
1 one 8 (2 to the 3rd power)
plus
0 zero 4s (2 to the 2nd power)
plus
1 one 2 (2 to the first power)
plus
1 one 1 (2 to the zeroth power)
So a binary 1011 equals a decimal 11.
Because computers use the binary number system, powers of 2 play an important role. This is why everything in computers seems to come in 8s (2 to the 3rd power), 64s (2 to the 6th power), 128s (2 to the 7th power), and 256s (2 to the 8th power).
Programmers also use the octal (8 numbers) and hexadecimal (16 numbers) number systems because they map nicely onto the binary system. Each octal digit represents exactly three binary digits, and each hexadecimal digit represents four binary digits.


When you learn most types of computer programming, you will touch upon the subject of binary numbers. Although this is a simple concept once explained, it is not always obvious how to read them. To understand binary numbers, let's first look at our normal system of base 10 numbers.
Let's take the number 345 for example. This is a three digit number. We know that the farthest right number, 5, represents the 1's column, and there are 5 ones. The next number from the right, the 4, represents the 10's column. There are 4 clicks in the 10s column, which we interpret as forty. Finally, the third column that contains the 3 represents the 100s column, and we know it to be three hundred.
Binary works in the same way. Each column represents a value, and when you have enough you move to the next column. The difference is that in our base 10 system we need to have 10 before we move to the next column. We can have any value 0-9, but once it goes above that, we add a column. In base two, you can only have 0 or 1 before moving on to the next column.
The number one is represented as 1 in both base ten and binary, so let's move on to the number two. In base ten this is represented as a 2, however in binary we can only have a 0 or a 1 before moving on to the next column. The number 2 is written as 10. This means 1 in the 2s column and 0 in the 1s column.
Let's take a look at the number three. Obviously in base ten it is written as 3. In base two (binary) it is written as 11. This means a 1 in the 2s column and a 1 in the 1s column. 2+1 = 3.
Each slot represents a value that is double the last value. The chart on this page helps to demonstrate this. The values of slots, starting on the right are 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, etc.
Now that we know how binary works, reading it is simply a matter of doing some simple math. Let's try a few:
1001
Since we know the value's each of these slots represent, then we know this number represents 8 + 0 + 0 + 1. In base ten this would be the number 9.
11011
Again we can calculate what this is in base ten by adding the values of each slot. In this case it would be 16 + 8 + 0 + 2 + 1. This would be the number 27.









WATCH THIS VIDEO



TYPE TEXT TO CONVERT IN BINARY:

BINARY CODE GOES HERE: