Now, a break from all that to approach something new. Before we can approach addition, we need to know how to represent numbers at all. Now, we all know about binary, but there's another useful numbering system called "hex-decimal." The value of hex-decimal cannot be understood without first teaching binary, however it's alot easier to teach hex-decimal. Now, the system that we're used to is called "decimal," which meas "base 10." Hex-decimal is "base 6 and 10," or "base 16." What this means is, that's how many digits there are before we "promote" the digit to the left. So for decimal, we have 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. That's 10 numbers.

The thing with hex-decimal (most people call it "hex" for short, even if that's technically "base 6" instead, which I'll use for the rest of these lesson) is that our system of numbering only created 10 digits. So, the most effective method would be to use common letters. Now, to help distinguish what numbering system we're trying to use, we have a standard prefix of "0x" to let people know we're messing with the system. Some people prefer ending the number with "h," but I, personally, think it's easier to read if you make it a prefix, especially if you're dealing with a long number. Now, for a quick conversion.

0x00 = 0
0x01 = 1
0x02 = 2
0x03 = 3
0x04 = 4
0x05 = 5
0x06 = 6
0x07 = 7
0x08 = 8
0x09 = 9 (Easy so far, right?)
0x0a = 10
0x0b = 11
0x0c = 12
0x0d = 13
0x0e = 14
0x0f = 15
0x10 = 16 (See what we did there?)

Take some time to figure it out. This is one of the lessons that teachers often skip. You'll see in the next lesson why it is valueable. The good news is, odds are if you need to convert between hex and decimal, you'll probably have a capable calculator handy. However, odds are, you're not going to be doing that that often. The point of using hex is to make things easier when binary gets out of hand.

Get your own web kitty here!
┬ęCopyright 2010, 2011, 2012, 2013, 2014, 2017, 2018. All rights reserved.