Post by [ℙ][✓] P1kachu on Oct 30, 2015 2:09:57 GMT -5
Check my previous thread: How to Hexadecimal!
In this tutorial I will show you how to read and write binary!
Look at this pattern closely:
1 = 1
2 = 10
3 = 11
4 = 100
5 = 101
6 = 110
7 = 111
8 = 1000
9 = 1001
10 = 1010...
Did you notice something?
This is how you add 1 to each number:
If last digit is 0, change it to 1.
If last digit is 1, change it to 0 and add 1 to the next digit...
For example, 100111 + 1 = 101000
And it goes on, understand? Good.
YOU LEARNED HOW TO COUNT IN BINARY!
Next, is to turn Binary to Decimal...
It is very simple actually...
You know what is standard form is?
It is splitting a number to it's sums.
For example, the standard form of 1234 is 1000 + 200 + 30 + 4
Now express each term in this standard form in to powers of 10...
1234 = 1×103 + 2×102 + 3×101 + 4×100
This is also what you are going to do in converting Binary to Decimal.
Let's have for example, 1000101.
We can express it into:
1000101 = 1×106 + 0×105 + 0×104 + 0×103 + 1×102 + 0×101 + 1×100
or...
1000101 = 106 + 102 + 100
Now, we replace every "10" with 2 such that:
106 + 102 + 100 → 26 + 22 + 20
Now solve.
26 + 22 + 20 = 64 + 4 + 1 = 69
YOU LEARNED HOW TO CONVERT BINARY TO DECIMAL!
To convert Decimal to Binary, you express the number in powers of 2. Which is the reverse of the above.
For example:
42 = 25 + 23 + 21
Now change each "2" to 10.
25 + 23 + 21 → 105 + 103 + 101
Now solve.
105 + 103 + 101 = 101010
YOU LEARNED HOW TO CONVERT DECIMAL TO BINARY!
Now for the slightly confusing part,
Just remember that "010" stand for uppercase, and "011" stand for lowercase.
You will need that later.
First, each "byte" is composed of 8-bits or 8-digits.
So to convert a letter to binary, just simply do the following steps:
For example your letter is M.
M is the 13th letter of the alphabet.
Now convert 13 to binary, which is 1101.
Since this binary expansion has only 4 digits...
You must add 0 before it to get 5 digits, which is 01101.
It is because you will combine it to "010" or "011" later which has 3 digits, to get to 8 digits.
Since you want uppercase, you combine it "010".
Therefore, the uppercase "M" is 01001101.
If you want lowercase, do the same but with "011".
Therefore, lowercase "m" is 01101101.
YOU LEARNED HOW TO CONVERT LETTERS TO BINARY!
How about this: 01010000
Simple, just look at the first 3 letters which is "010".
Since "010" stand for uppercase, it will be easy now.
The last 5 digits are 10000, convert to decimal you get 16.
The 16th letter is P.
Therefore, 01010000 stand for an uppercase "P".
YOU LEARNED HOW TO CONVERT BINARY TO LETTERS!
How about symbols, numbers, etc?
Simple. To convert numbers, it always begins with "0011".
Therefore, digit 9 stands for 00111001, digit 5 stands for 00110101...
Symbols, you just have to memorize them...
Space = 00100000
"!" = 00100001
"." = 00101110
"?" = 00111111
There are a lot more symbols... but these are the commonly used.
Finally, how to convert words.
Ez pz, just combine them.
For example P1kachu:
P = 01010000
1 = 00110001
k = 01101011
a = 01100001
c = 01100011
h = 01101000
u = 01110101
Then combine.
P1kachu = 01010000001100010110101101100001011000110110100001110101
To convert a string of binary to ASCII, you divide by each "byte" or by 8 digits, and convert each byte.
YOU MASTERED BINARY!
It's a bit complicated but you'll understand
Up next: How to read QR codes
In this tutorial I will show you how to read and write binary!
Look at this pattern closely:
1 = 1
2 = 10
3 = 11
4 = 100
5 = 101
6 = 110
7 = 111
8 = 1000
9 = 1001
10 = 1010...
Did you notice something?
This is how you add 1 to each number:
If last digit is 0, change it to 1.
If last digit is 1, change it to 0 and add 1 to the next digit...
For example, 100111 + 1 = 101000
And it goes on, understand? Good.
YOU LEARNED HOW TO COUNT IN BINARY!
Next, is to turn Binary to Decimal...
It is very simple actually...
You know what is standard form is?
It is splitting a number to it's sums.
For example, the standard form of 1234 is 1000 + 200 + 30 + 4
Now express each term in this standard form in to powers of 10...
1234 = 1×103 + 2×102 + 3×101 + 4×100
This is also what you are going to do in converting Binary to Decimal.
Let's have for example, 1000101.
We can express it into:
1000101 = 1×106 + 0×105 + 0×104 + 0×103 + 1×102 + 0×101 + 1×100
or...
1000101 = 106 + 102 + 100
Now, we replace every "10" with 2 such that:
106 + 102 + 100 → 26 + 22 + 20
Now solve.
26 + 22 + 20 = 64 + 4 + 1 = 69
YOU LEARNED HOW TO CONVERT BINARY TO DECIMAL!
To convert Decimal to Binary, you express the number in powers of 2. Which is the reverse of the above.
For example:
42 = 25 + 23 + 21
Now change each "2" to 10.
25 + 23 + 21 → 105 + 103 + 101
Now solve.
105 + 103 + 101 = 101010
YOU LEARNED HOW TO CONVERT DECIMAL TO BINARY!
Now for the slightly confusing part,
Just remember that "010" stand for uppercase, and "011" stand for lowercase.
You will need that later.
First, each "byte" is composed of 8-bits or 8-digits.
So to convert a letter to binary, just simply do the following steps:
For example your letter is M.
M is the 13th letter of the alphabet.
Now convert 13 to binary, which is 1101.
Since this binary expansion has only 4 digits...
You must add 0 before it to get 5 digits, which is 01101.
It is because you will combine it to "010" or "011" later which has 3 digits, to get to 8 digits.
Since you want uppercase, you combine it "010".
Therefore, the uppercase "M" is 01001101.
If you want lowercase, do the same but with "011".
Therefore, lowercase "m" is 01101101.
YOU LEARNED HOW TO CONVERT LETTERS TO BINARY!
How about this: 01010000
Simple, just look at the first 3 letters which is "010".
Since "010" stand for uppercase, it will be easy now.
The last 5 digits are 10000, convert to decimal you get 16.
The 16th letter is P.
Therefore, 01010000 stand for an uppercase "P".
YOU LEARNED HOW TO CONVERT BINARY TO LETTERS!
How about symbols, numbers, etc?
Simple. To convert numbers, it always begins with "0011".
Therefore, digit 9 stands for 00111001, digit 5 stands for 00110101...
Symbols, you just have to memorize them...
Space = 00100000
"!" = 00100001
"." = 00101110
"?" = 00111111
There are a lot more symbols... but these are the commonly used.
Finally, how to convert words.
Ez pz, just combine them.
For example P1kachu:
P = 01010000
1 = 00110001
k = 01101011
a = 01100001
c = 01100011
h = 01101000
u = 01110101
Then combine.
P1kachu = 01010000001100010110101101100001011000110110100001110101
To convert a string of binary to ASCII, you divide by each "byte" or by 8 digits, and convert each byte.
YOU MASTERED BINARY!
It's a bit complicated but you'll understand
Up next: How to read QR codes