The hexadecimal or Base 16 number system is commonly used to represent binary numbers in a more readable form. Computers perform computations in binary. However, the binary output of a computer is expressed in decimal or hexadecimal to make it easier to read.
Like the binary and decimal systems, the hexadecimal system is based on the use of symbols, powers, and positions. The symbols that hexadecimal uses are the digits 0 through 9 and the letters A through F. Where decimal numbers can be represented by any number of bits (8 being the most famous), each Hexadecimal symbol is represented always by 4 bits. Here is the whole table for this numbering system:
Hexadecimal Symbol Corresponding Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Note: There is an easy way to write the table with no need for summarizing each symbol. Look at the binary columns, The right most column is composed of alternating 0 and 1, the next column( to its left) is composed of alternating TWO 0's and TWO 1's. The next column is composed of alternating FOUR 0's and FOUR 1's and the final column is composed of EIGHT 0's followed by EIGHT 1's.
A hexadecimal number is often indicated with a 0x. For example, the hexadecimal number 2102 would be written as 0x2102. The table above helps you to simply convert from hexadecimal to binary and vice versa. For example:
0x2102 is equivalent to : 0010 0001 0000 0010
11110011 is eqivalent to : 3F hexadecimal.
Note: if you got a binary with number of digits not a multiple of 4, simply add 0's to the left .For example: 011010 , simple add two 0's to the left to become: 00011010 = 1A hexadecimal.



