Converting Decimals Into Binary (Base 10 to Base 2) - CCNA


This is going to be a very quick update to yesterday. I taught you how to change whole number in the base of 10 into binary (base 2) using 2 different methods yesterday, and now I am going to quickly show you how to change decimals into binary using a table.

If you read my previous post, you should be familiar with this table, but here I added something new. There is now a decimal point and there is 1/2, 1/4 etc. As you may already know, the half left of the decimal is 2n while as the right of the decimal is 1/2n. Like we did for whole numbers in base of 10, we are just going to add up to the number by using 2, something like 10 would be 8 and 2, and we are just going to add a 1 over the numbers we use and a 0 over the ones we don't.


For this example, we are going to look for the binary number of 13.25. Just like for the whole numbers we are just going to add everything up. 8+4+1= 13, so a one is placed on top of those, and since 2 was not used we are going to add a 0. That will give us 1101 (base of 2) = 13 (base of 10). For the decimal part it is the exact same thing. We know that 0.25 can't go into 1/2 because 1/2 is too big, so we add a 0 over that. However, 0.25 goes into 1/4 which means we place a 1 over that. Since, 0.25 goes into 1/4 perfectly, we don't need to add anything else together. Thus, 0.25 (base of 10) = 0.01 (base of 2). To finish this up, all you need to do is add binary 13 to binary 0.25, and you are left with 1101.01. Of course, you don't need to divide 13 and 0.25 up in the future, that was merely to clearly explain both halves.



There you go! You found out how to convert decimals in the base of 10 to binary. Just like I said in my last post, I plan on posting about octals, and hexadecimals, but I also want to finish binary up one day with positives and negatives.

Hope you all liked this!

Comments

Popular Posts