Binary Math and Translation
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
A |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
B |
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
Each
# multiplied |
128 |
64 |
0 |
0 |
0 |
0 |
0 |
0 |
Active Bits to Sum |
What you currently see above you is known as binary or base2
number formation. Binary is originally designed
for electronics which simply dictate simple switches such as 0=OFF and 1=ON. So for every
active bit in the binary number is multiplied. For example, this
bit, 10000000 is 1x2
7 just keep it simple,
remove the exponent first like in high school. You'll get 1x128.
Anything x1 is itself... Or if you prefer the long way,
2x2x2x2x2x2x2 which comes to 128 either way you slice it. Now
01000000 is 1x2
6 which
comes to 1x64 or just 64. That wasn't too difficult was it? Well
if that was hard... see this... here's the hardest part.
Ready!?!?
128+64= ??? Simply adding the 2 active bits after translating
them gives 192.
You could cheat if you have a scientific calculator like
Microsoft
® Calculator or even Linux
Calculator does it too. Enable the scientific mode, click the
button for Bin or Binary. Type in 11000000. Then click on
Decimal... calculation Done in give or take 2-5 Seconds time
real time to enter the data into the calculator and click
buttons.
How ever, keep in mind that when you are using binary to decimal
translation, you start from right to left. Anything afterwards
is pointless or irrelevant. Which is why you can shortcut by
removing the excess zero's from the left side. Here's a perfect example!!
0 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
A |
27 |
26 |
25 |
24 |
23 |
22 |
21 |
20 |
B |
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
Each
# multiplied |
0 |
0 |
0 |
16 |
0 |
4 |
0 |
1 |
Active Bits to Sum |
We have 00010101 up above, you can just as easily as well put
10101. They are the same value clean and dry because you start
from right side to left side. So in this example start with the
easy stuff. 1x2
0 so hopefully
you had some decent instructors/teachers that explained to you
any number to the power of 0 = 1. So our first bit active on the
right is equal to 1. The 1x2
2
is simply 4, 2x2 is a no brainer, and 1x2
4
is simply 16 since we have our shortcut listed and I assume you
get the point by now. So add them up 16+4+1 and you will have
21.
10101 = 21.
Now as far as sources are concerned... well if this is new to
you and you are absolutely not sure... Well Binary is a basic
principal of digital communication between all components of a
PC and Networks alike... If that doesn't work for you then you
can if you wish pay for the documentation on base2/binary and
what its design was for with the Institute of Electrical &
Electronics Engineering or search other reliable sources on the
internet.
Here are some practice binary translations for you...
1) 11100111
2) 10101011
3) 10010111
4) 110
5) 00111111
If you did them correctly you should have these numbers.
1) 231
2) 171
3) 151
4) 6
5) 63
Here's a shortcut on some binary numbers. Note the pattern that
arrived on #5, if you didn't notice the pattern, remember that
01000000 is 64. So all active binary digits before 01000000 came
to a sum of 63. The same applies to all numbers. like 01111111 =
127 without a calculator or pen and paper. Why do I know that
without calculation? Because I know the 8th bit to the left is
equal to 128. So not all occasions do you have to concern
yourself with, "I have to add all that up!?" Very simple,
eventually you can too with a little practice just count binary
by looking at it without the aide of pen and paper or
calculator.
Then advance further by learning:
Binary/ASCII translation like abc = 01100001 01100010 01100011
Binary/hexadecimal translation like 1F0 = 0001 1111 0000