F. Numbers in hecadecimal start 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, ...
Chat with our AI personalities
Mnemonics is a method of remembering things by associascation. Hexadecimal is a number system. 0-9 are as usual and then a(10) b(11) c(12) d(13) e(14) f(15)
FC(16) = value_of(F)*16 + value_of(C) = 15*16+12 = 252
16 is the 4th power of 2. So a hexadecimal number is converted to binary by replacing each hex digit by the 4-bit binary number having the same value. Conversely, in converting binary to hexadecimal, we group every 4 bits starting at the decimal (binary?) point and replace it with the equivalent hex digit. For example, the hexadecimal number 3F9 in binary is 1111111001, because 3 in binary is 11, F (decimal 15) is 1111, and 9 is 1001.
Sixteen would be coded 10, similar to ten being coded 10 in decimal: One in the 'sixteens' column, and zero in the units column. It's a wonderful question, though. The mystery evaporates when you realize that we commonly use a 'decimal' system, but the value of the highest single-digit number is 9. It seems odd, but think of the number line as a representation of continuous values. There are 10 ranges of value BETWEEN 0 and 10. These ranges can be coded with numbers between 0.000... and 9.999... The same idea applies to the hexadecimal system. F has the value of decimal 15.
0xc = 1100 Hexadecimal digits use exactly 4 binary digits (bits). The 0x0 to 0xf of hexadecimal map to 0000 to 1111 of binary. Thinking of the hexadecimal digits as decimal numbers, ie 0x0 to 0x9 are 0 to 9 and 0xa to 0xf are 10 to 15, helps with the conversion to binary: 0xc is 12 decimal which is 8 + 4 → 1100 in [4 bit] binary.