Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: BushCountry
Someone asked about the math method, so I decided to post it. I don't know if invented is the correct word, but I never seen a teacher or textbook used my method. It is just a simple way to do the binary to decimal conversion in your head, works great for IP addresses. };O)

It is a lot easier to explain in front of a classroom then put in text message, but I will try.

Here is the binary string (a byte): 10101000

Start from the left and work your way right.

Mutliply the first number by 2.
Add the second digit to the total.
Mutliply the total by 2.
Add the third digit to the total.
Repeat until you reach the end.

You can do this in your head.
Example above 10101000 - 2,5,10,21,42,84,168 <-- Answer.
Another Example - 11001101 - 3,6,12,25,51,102,205 <---Answer.

Things to remember: If the binary number ends in a 1 the total will be odd. In fact, whenever the number is a one in the binary string the total will be odd. See the above examples. With practice you can convert long binary strings in seconds to decimal without a calculator, provided you can multiply by two.
28 posted on 09/02/2003 6:16:06 AM PDT by BushCountry (To the last, I will grapple with Democrats. For hate's sake, I spit my last breath at Liberals.)
[ Post Reply | Private Reply | To 25 | View Replies ]


To: BushCountry
Only 10 kinds of people, those who know binary and those who don't.
34 posted on 09/02/2003 7:11:03 AM PDT by dfwgator
[ Post Reply | Private Reply | To 28 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson