Hexadecimal self-defining term
A hexadecimal self-defining term consists of hexadecimal digits enclosed in apostrophes and
preceded by the letter X; for example, X'C49'
and X'00FF00FF00'
.
Spaces within the value are allowed and ignored. They can be used between groups
of digits to improve readability, for example X'7F FF FF FF'
.
Each hexadecimal digit is assembled as its 4 bit binary equivalent. Thus, a hexadecimal term used to represent an 8 bit mask consists of two hexadecimal digits.
The hexadecimal digits and their bit patterns are as follows:
0 - 0000 4 - 0100 8 - 1000 C - 1100
1 - 0001 5 - 0101 9 - 1001 D - 1101
2 - 0010 6 - 0110 A - 1010 E - 1110
3 - 0011 7 - 0111 B - 1011 F - 1111
When used as an absolute term in an expression, a hexadecimal self-defining term has a negative value if the high-order bit is 1.