Lots of times in the depths of programming and security studies, you sometimes come across binary and hexadecimal numbers. Most people look at it and have absolutely no idea how to read either. Its actually quite simple once you know what you're looking at. Let's just look at some examples to show you what's going on.

In each of these numbering systems, each digit represents a field that has a value. The digit itself is only there to manipulate the value of that field. In binary, the fields are read from left to right in descending values and each place is double the one to the right of it. Its easier to remember the values of the places starting from the right, and consequently, its easier to read the value right to left. If there is a one in that column, that means that value is turned on and should be added to the total, if there is a zero, that value should not be counted. Take the following example:

8 4 2 1
1 0 1 1 = 11

As you can see, the rightmost column represents one, the one to the left of that represents two, the next represents four, the one to the left of that represents eight. A binary value that has four places is referred to as a nibble, half a byte (a term with which you might be more familiar that has eight places, a bit is only once place). The fourth bit in this nibble (8) is turned on, so we'll add eight to our total, the third bit is off so we'll ignore that. The second bit is turned on so we'll add two to our total; and the first bit is turned on so we'll add one to come to a total of eleven. Easy math, right? Now let's try some hexadecimal.

Hexadecimal is a tad more complicated because there is an added dimension to the math and there are more than two numbers to worry about, now there are 10 numbers and 5 letters as well. Each place still represents a value and each place is the square of the last. In this nibble we have four different values for each place. A, B, C, and 2. The numbers 0-9 are easy, they represent themselves, A,B,C,D,and E however, represent the next five numbers respectively (A=10, B=11, C=12, D=13, E=14, F=15).

4096 256 16 1
A    B   C 2 = 43970

If you'll look closely, you'll see what's going on. The character in each field is multiplied by the value of that field and added together. So we've got A(10) * 4096 + B(11) * 256 + C(12) * 16 + 2 * 1 = 43970. Sure, its a bit confusing but you'll NEVER have to calculate this in the field off the top of your head. You're in IT, you should have a device with you at all times that either a) has a calculator or b) can connect to the internet. Now that you know how to calculate the values, you can use any calculator to do so.

Something I didn't touch on here is octal numbers. If you're a *nix guy like me, you're already familar with an octal set (does chmod 755 ring a bell?) The mode numbers for permissions in *nix operating systems is an octal set. Learning octal is up to you, grasshopper. I have taught you all I can teach you.