How to Convert Between base-10, Hexadecimal, and Binary

There are 10 types of people in this world: Those who can read binary and those who can't.

Many electronic and microcontroller projects require the use of a particular base numbering system, such as BCD on thumbwheel switches, hexadecimal (base-16) on hex encoders, and binary in shift registers and dip switches.  Often it is necessary to convert between bases, for example, when using a decade counter and converting a BCD value of a switch into a base-10 (that is, decimal) value that can be easily displayed.  In particular, all math is done in binary in digital systems, as well as at the analog/digital interface (like when you sample a waveform or measure a voltage) using only two digits: 1 and 0.

This is a brief instructable on what numbers represent and how to convert between the bases in which they are represented. This was included in one of my other guides when I realized that it should be separated out and put into its own instructable. After reading this guide you should be able to look at a binary number like "11101011" and tell that it represents the number 235 or convert the hex value "0xC0E4" to its binary equivalent of "1100000011100100" and decimal representation of 19980 without the use of a calculator (unless you suck apples at addition,subtraction,or division, in which case I feel your pain and wholly suggest keeping your favorite calculator handy).

However, no heavy math is needed and you won't need to do anything outside of basic math so don't sweat it if you're mathematically challenged.  This is part of the fun side of math.
Remove these ads by Signing Up
nevdull (author) 3 months ago

Hey guys,

Thanks for the comments. I checked and it looks like a typo as I have it correctly typed in the preceding line. The typo below is now corrected.

Thanks for finding that!

TheW13 months ago

158 base 10 should be equal to 314 in base 7.

3 months ago

I second/confirm/approve of or whatever this statement.

dunsin9 months ago

Good Job. Please confirm the conversion of 158 (Base 10) into base7 the result it should give is 314 (Base 7), not 214 (Base 7).

Just cross-check if there were any errors during calculations.

Weldone !!!

westfw4 years ago

You left out octal (base 8), which is just like base 10. If you're missing two fingers.

nevdull (author)  westfw4 years ago
Oops, where did I leave out octal?

Ah, Tom Lehrer....
4 years ago
oops. I guess not. It was just missing from titles...
matstermind4 years ago
where did you hear that joke from?
nevdull (author)  matstermind4 years ago
I think I saw it first on a thinkgeek t-shirt.