Banki
02-23-2009, 03:16 AM
Guide written by me - I assure you; you can learn the basics of binary in just a few minutes. I did.
Introduction
If you're reading this tutorial, you probably know binary only by a bunch of ones and zeros you don't understand. We all thought this. But, these bunch of ones and zeros may hide a message, number, etc. I'm going to show you how to convert binary to plain text. (you will also learn how to convert plain text to binary)
Base
If you ever learn (or try to learn) binary, you will come across the 'base' or 'core' of the system. You must memorize this simple sequence in which the code is written to convert it.
1.
You will, and will always, read and write binary from right to left. No questions asked.
2.
Think of each number holding a place value.
For example, the standard number - 146 - the 1 would hold the place value of 100, 4 holds 10 and 6 holds 1.
The first place value of Binary (when read from right to left) is 1. The place value will multiply itself by 2 for each number to the left.
For example, a sequence of zeros: 00000 (when read from right to left) will have place values of: 1, 2, 4, 8, 16 and so on.
When you understand, you will remember it.
3.
A zero means it will ignore the place value it is at. A one will use it. (more info in next section)
Numbers in Binary
If you remember the base of binary, this will be easy. Basically, you're adding up the 'place values' from the binary code (remember: right to left!).
For example, 3 in binary is written as 11. This is because the first place value is 1, and the second is 2. Therefore, 11=1+2=3.
If a zero is used in the binary code, it will ignore its current place value.
For example, 5 in binary is 101. We want the first place value since its value is one so we use a 1, we don't want the second place value one since it has a place value of 2 so we use a 0 and we want the third place value which is 4, so we use another 1. Remember: RIGHT TO LEFT, NOT LEFT TO RIGHT!
Therefore, 101=1+0+4
Basically, think of a 0 as a 0, and a 1 as its place value.
Also note: No matter how many zeros you have after (remember, when read right to left) the last 1, it will have the same value. (eg. 000101 still = 5)
Examples:
1=1
10=2
100=4
1000=8
10000=16
11=3
111=7
1111=15
1001=1+0+0+8=9
001001=1+0+0+8+0+0=9
0110110=0+2+4+0+16+32+0=54
Letters/words in Binary
Simple. When binary includes letters/words - it is very long. Therefore, the first step to reading it is to separate it into sets of 8. (eg. 0110000101100001 to 01100001 01100001)
All you have to do after this is convert it to numbers like we previously did (each set has its own number). So, there were two sets of 8 - the first one had a place value of 97, and so did the second one. All you need now is to know ASCII - or find an ASCII chart (there are plenty over the web). Convert the ASCII number you just got from the binary code to a letter.
In this case, 97 in ASCII (dec) is a lowercase A. So the binary code I just showed you = aa.
Examples:
01100001=97=a
01100010=98=b
0110000101100010=98 97=ab (01100001 01100010)
01100011=99=c
01100100=100=d
0110001101100100=100 99=cd (01100011 01100100)
0110100001100101011011000110110001101111=111 108 108 101 104=hello (01101000 01100101 01101100 01101100 01101111)
Ending
You should now know how to read binary. Although it may take some time getting use to ASCII and number conversion, you can now do it, no matter how long it takes.
Introduction
If you're reading this tutorial, you probably know binary only by a bunch of ones and zeros you don't understand. We all thought this. But, these bunch of ones and zeros may hide a message, number, etc. I'm going to show you how to convert binary to plain text. (you will also learn how to convert plain text to binary)
Base
If you ever learn (or try to learn) binary, you will come across the 'base' or 'core' of the system. You must memorize this simple sequence in which the code is written to convert it.
1.
You will, and will always, read and write binary from right to left. No questions asked.
2.
Think of each number holding a place value.
For example, the standard number - 146 - the 1 would hold the place value of 100, 4 holds 10 and 6 holds 1.
The first place value of Binary (when read from right to left) is 1. The place value will multiply itself by 2 for each number to the left.
For example, a sequence of zeros: 00000 (when read from right to left) will have place values of: 1, 2, 4, 8, 16 and so on.
When you understand, you will remember it.
3.
A zero means it will ignore the place value it is at. A one will use it. (more info in next section)
Numbers in Binary
If you remember the base of binary, this will be easy. Basically, you're adding up the 'place values' from the binary code (remember: right to left!).
For example, 3 in binary is written as 11. This is because the first place value is 1, and the second is 2. Therefore, 11=1+2=3.
If a zero is used in the binary code, it will ignore its current place value.
For example, 5 in binary is 101. We want the first place value since its value is one so we use a 1, we don't want the second place value one since it has a place value of 2 so we use a 0 and we want the third place value which is 4, so we use another 1. Remember: RIGHT TO LEFT, NOT LEFT TO RIGHT!
Therefore, 101=1+0+4
Basically, think of a 0 as a 0, and a 1 as its place value.
Also note: No matter how many zeros you have after (remember, when read right to left) the last 1, it will have the same value. (eg. 000101 still = 5)
Examples:
1=1
10=2
100=4
1000=8
10000=16
11=3
111=7
1111=15
1001=1+0+0+8=9
001001=1+0+0+8+0+0=9
0110110=0+2+4+0+16+32+0=54
Letters/words in Binary
Simple. When binary includes letters/words - it is very long. Therefore, the first step to reading it is to separate it into sets of 8. (eg. 0110000101100001 to 01100001 01100001)
All you have to do after this is convert it to numbers like we previously did (each set has its own number). So, there were two sets of 8 - the first one had a place value of 97, and so did the second one. All you need now is to know ASCII - or find an ASCII chart (there are plenty over the web). Convert the ASCII number you just got from the binary code to a letter.
In this case, 97 in ASCII (dec) is a lowercase A. So the binary code I just showed you = aa.
Examples:
01100001=97=a
01100010=98=b
0110000101100010=98 97=ab (01100001 01100010)
01100011=99=c
01100100=100=d
0110001101100100=100 99=cd (01100011 01100100)
0110100001100101011011000110110001101111=111 108 108 101 104=hello (01101000 01100101 01101100 01101100 01101111)
Ending
You should now know how to read binary. Although it may take some time getting use to ASCII and number conversion, you can now do it, no matter how long it takes.