Computers only understand binary code as it only notices no voltage and voltage. Therefore it is written in 0s and 1s for the voltages. To convert binary to decimal you put the code underneath a number system then add up the 1s like so:

128 64 32 16 8 4 2 1

0 1 0 0 0 1 1 0 = 70

The numbers above are always used and can continue to rise if the code is bigger. If you’re converting decimal to binary you go down the list, left to right, checking if it adds in to the total given and if it does you take it away from the total and use that to continue down the list. e.g.

128 64 32 16 8 4 2 1

0 1 0 1 1 0 0 0 = 88

128 doesnt fit into 88 so it is a 0 and 64 does fit and becomes a 1. you are then left with 24 since 88-64 = 24 and use 24 to continue down the list and continue to use this system until you have the code.

### Like this:

Like Loading...

*Related*