**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.

And here you can find the formal math to convert number in any base to any other base: http://www.codinghelmet.com/?path=exercises/converting-number-bases

Hiyas,

Thanks for that link. Webpages that make use of latex math please me. :)

Alright, my question is about decimal to hexadecimal. When you have the number (9 in your example) and divide it by 16 and it equals 0, it works fine. But when you have a number like 429dec, which provides 26, which divides by 16 to 1, what do you do. I tried multiplying the equation by 1 and moving it over, and the converter showed a different result.

429

_{10}= ???_{16}1. 429 / 16 = 26.8125; .8125*16 = 13; 13 in hex is D. So 0x??D

2. 26 / 16 = 1.625; 0.625 * 16 = 10; 10 in hex is A. So 0x?AD

3. 1 / 16 = 0.0625; 0.0625 * 16 = 1; 1 is 1 in hex, so 0x1AD.

429(dec) = 0x1AD(hex)

Hope that helped to clear it up. If you still have problems feel free to ask again.

Cheers and thanks for the comments!

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!

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

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

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 !!!You left out octal (base 8), which is just like base 10. If you're missing two fingers.

Ah, Tom Lehrer....