Hexadecimal, simply referred to as Hex, is a base-16 number system.
Most modern day PLC/PAC's use the hexadecimal number system some where within their architecture. Some PLC/PAC require that some instruction parameters be entered in Hex.
Base-16 numbers can be written in two formats:
2416 or 24h
in ControlLogix: 16#24
Base-16 also means that there are 16 valid numbers. Starting with zero they are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
A, B, C, D, E, F
Where:
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15
Hex Number | 4-bit Binary |
---|---|
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
A (10) | 1010 |
B (11) | 1011 |
C (12) | 1100 |
D (13) | 1101 |
E (14) | 1110 |
F (15) | 1111 |
Each digit in a hexadecimal number has a weight Value. The weight of a hex digit is the base raised to the power of the digit position. The figure below depicts an example.