A hexadecimal number can be converted to decimal by following the method:

0xh_{n}h_{n-1}...h_{1}h_{0} where h_{i} is any of 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F ,
can be converted to the decimal number:

h_{n}×16^{n} + h_{n-1}×16^{n-1} + ... + h_{1}×16 + h_{0}.

For example the decimal representation of 0x2A9 is 2×16^{2} + 10×16^{1} + 9 = 681.

#### Hexadecimal to binary conversion quiz: