Well I've been getting asked about binary a lot lately, so I thought I would make a small guide about it.
What you will learn in this short guide:
-What binary is.
-How to convert a decimal number to binary.
-How to convert a binary number to decimal.
-How to add binary numbers.
Ok, binary is a 2 digit system that consists of 0's and 1's. Just like decimal has 10 digits, 0-10, binary has 2, 0 and 1.
Converting numbers to binary and back isn't that hard, just time consuming. To convert decimal to binary, you divide by 2 and take the remainder (0 or 1). Keep dividing until you end up at 1.
Ex:
Convert 34 to binary:
17
2|34 Remainder 0
8
2|17 Remainder 1
4
2|8 Remainder 0
2
2|4 Remainder 0
1
2|2 Remainder 0
0
2|1 Remainder 1, Here is where we stop.
Now you must take the first remainder and put it as the last digit, and go until you take all the remainders:
0010 0010
Now to convert back to decimal, you have to make a table like this:
32|16|8|4|2|1 <--- Powers of 2 (Can go as high as you want.)
And you fill in the table with the digits:
32|16|8 |4 | 2|1
1 | 0|0|0|0|1|0
Then, everywhere this is a one, you add that number:
32 - yes
16 - no
8 - no
4 - no
2 - yes
1 - no
32 + 2 = 34
Adding binaries is simple, but can be complicated.
If there is a 1 a spot, you carry it to the next spot and make it 0.
Example:
Add 1011 and 1010 (11 and 10)
1011
+1010
10101
I might come up with a more advanced guide later if I can find time, but for now, study, learn, and use!