September 21st, 2004, 10:11 PM
Decimal to binary and back
Decimal to Binary conversions
Most people when they start learning about computers hear of binary and hex but never learn about them this tutorial will change that it will teach you a little bit about them and it will teach you how to convert them.
*Before I say any thing about binary just remember that you read it backwards from right to left*
First off all I hope every one know the decimal system 0-9 well if you donít this tutorial is not for you. Ok binary is a base 2 number system witch just means that it only has two numbers in it 0 and 1 un like hex witch has 16 but we will get into that much later. Binary is 8 bits or 8 1s and 0s the lowest number with hex you can represent is 0 and the highest number is 255 with the 8 bits.
When you see binary it will look like this 00000001 this number is 1. How you would read it is by looking at the 1s only you donít look at the 0s the right most spot in the 8 digits is represented as 1 and then the next is 2 then 4 then 8 and so on so it will look like this
and now say you wanted to make the number 129 in binary what you would do is just make the 0s to 1s in the correct places by making the first one witch will represent 1 and the 8 1 witch is 128 and it makes 129
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0
Now before I said that the biggest number you can represent with binary 8 bits was 255 right well numbers donít end at 255 so if you wanted to make a bigger number what you have to do is add more bits to it by adding 0s and 1s to the end of the number ( remember you read it right to left so the end of the number is the left side not the right) so what you would do is just add what you need now if you see the pattern in binary 1, 2, 4, 8, 16, 32, 64, 128 but if you needed a bigger number you just double 128 to 256 then 512, 1024, 2048. So now the new line up would be
128 64 32 16 8 4 2 1
1 0 0 0 0 0 0 1 this = 129.
then all you do is the same thing it is just you have bigger numbers. All you are doing is adding bits to the back of the list why you can do this is because back in the 80s the processors wear 8 bit so binary was limited to 8 bits but now most are 32 bit processors but the 8 bit standard stayed with binary but because we have 32 bit we can add numbers to the back of it this will come in to play in hexadecimal when you have more then 2 hex symbols.
2048 1024 512 256 128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0 0 0 0 0
If you have any other questions or if you have trouble reading this PM me and I will help you out because I donít know how good I was at explaining it.