User guide

Appendix B
Number Systems, Hex Mask
B5
Hexadecimal and binary numbers have the following equivalence:
128A
0010 0001 0100 0110
8192
1x2
13
256
1x2
8
128
1x2
7
10
1x2
3
+1x2
1
Binary = 8586
Hexadecimal = 8586
Example: Decimal number 8586 in equivalent binary and hexadecimal
forms:
1101 1110 1011 1010
Binary = 8586
ED76
Hexadecimal = 56950
(negative number, 8586)
Hex number DE76 = 13x16
3
+14x16
2
+7x16
1
+6x16
0
= 56950. This is a
negative number because it exceeds the maximum positive value of 32767.
To calculate its value, subtract 16
4
(the next higher power of 16) from 56950:
56950 65536 = 8586.
This is a 4-character code, entered as a parameter in SQO, SQC, and other
instructions to exclude selected bits of a word from being operated on by the
instruction. The hex values are used in their binary equivalent form, as
indicated in the figure below. The figure also shows an example of a hex
code and the corresponding mask word.
00FF
0000 0000 1111 1111
Hex Code
Mask Word
Hex
Value
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Binary
Value
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Hex Mask