Hi,

in the last post I wrote about converting from binary to decimal number. Today I will continue, if you want to read the basics about binary just check out the post. This is also linked to my post about counting to 1,023 on your fingers.

So lets say that we have number 137 and we want to convert it into binary.

You have seen in the previous post that there is some highest digit that has the value of 1 instead of 0 which means that it stores the information[1]. We need to find out this value.

Its easy, its the highest 2ª number smaller or equal to our original value (137).

Such a number is 128 which is 2^7 so it is going to be the 8th number since we use 2º too (and 2º is on the 1st place).

Now we subtract it having 137-128=9 (1xxxxxxx)

Now we repeat with 9. The number that is smaller or equal is 2³=8

9-8=1 and the next 1 that stores information is on the fourth position. (10001xxx)

1 is easy because 2º also equals to 1 and it is on the first place. So 137 looks like this in binary: 10001001.

Lets try 759:

759-512=247 (10th number is the first 1) =1xxxxxxxxx

247-128=119 (8th number is 1, stores the information) =101xxxxxxx119-64=55 (7th number is 1) =1011xxxxxx

55-32=23 (6th number is 1) =10111xxxxx

23-16=7 (5th number is 1) =101111xxxx

7-4=3 (3rd number is 1) =10111101xx

3-2 … 1-1 === 1011110111 (quite lucky with so many ones ;))

Hope this all makes sense, if it does not just write in the comments below.

Btw. thought you have infinitely many systems that you can use, binary is the simplest of them all. You can not store information in less symbols because with one symbol you would not be able to distinquish where one information ends and another begins. You need to use “space” or some number or something.

Dragallur

### Like this:

Like Loading...