How to Convert Binary (Base 2) to Decimal (Base 10)

Converting binary to decimal is something most of us did once in school or college and never again thereafter. I have always wanted to write a page on binary to decimal conversion, and I think that this is a more fitting place for it here.

History

Students tend to think of binary mathematics as a modern invention. If you were to ask any A* GCSE student where it was invented, then many of them will say Hong Kong or Japan, or America, because this is where all the consumer electronics products are manufactured.

The more enlightened ones might mention Leibniz 1695. However, man first used the binary style of mathematics, consisting of binary number addition, in the 2nd century AD in Ancient India.

This is the binary to decimal conversion using the multiply by 2 method. Since the bitmap data stored in Tupper's constant k is simply a large binary number converted to a decimal number, the coding scheme is obvious. Most students would have come across it. This is probably the easiest method to use in computer programming, for converting a large binary number into an equivalent decimal number. In this example, we are going to convert the binary pattern "1101100101" to decimal.

Binary to Decimal

Binary Decimal
0 × 2 + 1 = 1
1 × 2 + 1 = 3
3 × 2 + 0 = 6
6 × 2 + 1 = 13
13 × 2 + 1 = 27
27 × 2 + 0 = 54
54 × 2 + 0 = 108
108 × 2 + 1 = 217
217 × 2 + 0 = 434
434 × 2 + 1 = 869

If you had a monochrome bitmap image made up of ones and zeros, you could use this scheme to convert the binary pattern to a single decimal number. You could then multiply the result by any arbitrary number such as 17, which Mr Tupper did, to create another number. Once it is in decimal form, you could perform all sorts of arithmetic manipulations to it.

To decode the number you would simply follow the same coding steps in reverse, so if you multiplied the final number by 17 during coding, then you would divide it by 17 during the decoding process... Therefore to create a constant k the same as in Tupper’s formula, you would convert the binary number to decimal and then multiply it by 17. It is that simple!

If this article gets any hits then I might add some more content, and create a JavaScript coding program as well. Otherwise, consider it homework! :-)

This Article Continues...

Tupper’s Self-Referential Formula Explained
Simplification of Tupper’s Formula for Graphing
How to graph Tupper’s self-referential formula
Graphing Raster Used for Tupper’s Formula
Plot Tupper’s Self-Referential Formula
How to Convert Binary (Base 2) to Decimal (Base 10)
Self-Referential Formula Plot 1
Self-Referential Formula Plot 2