Tech Tips: Decimal, Hexadecimal and Binary

28 Oct, 2020, 9:48 AM

Every week I have a call requesting me to convert from hexadecimal (hex) to decimal, or from binary to decimal number format. Here is how it works. In all of the explanations I will work from right to left, ie from least significant digit to most significant.


In our decimal number system we count in 1’s, 10’s 100’s etc. This means that the number 123 is 3 lots of 1; 2 lots of 10 (10´1) and 1 lot of 100 (10´10). The decimal system is called base 10, as it uses 10 as the multiplier between the columns.


The hex numbering system works in blocks of 16. In 1’s 16’s 256’s etc. This means that 123 hex is 3 lots of 1; 2 lots of 16 (16´1)and 1 lot of 256 (16´16). In decimal this equals 256+32+3=291dec. A hex number is often identified with a leading $ character so $10 does not equal ten, it actually equals sixteen(1´16 + 0´1). Obviously, we need more than 0-9 to be able to display our hex digits so the letters A-F are used in addition to our normal numbers.


0-9 as normal


This means that $FB is 11 lots of 1 and 15 lots of 16 = 251 decimal, remember I am working right to left with the explanation.


The hexadecimal system is called base 16, as it uses 16 as the multiplier between the columns.


Binary is similar, except it is in multiples of 2. This means that 1101 in binary is 1 lot of 1 + 0 lots of 2 (2´1) + 1 lot of 4(2´2) +1 lot of 8(2´4) which equals 13 in decimal



The binary system is called base 2, as it uses 2 as the multiplier between the columns.