XOR TABLE |
XOR |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
C |
D |
E |
F |
0 |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
C |
D |
E |
F |
1 |
1 |
0 |
3 |
2 |
5 |
4 |
7 |
6 |
9 |
8 |
B |
A |
D |
C |
F |
E |
2 |
2 |
3 |
0 |
1 |
6 |
7 |
4 |
5 |
A |
B |
8 |
9 |
E |
F |
C |
D |
3 |
3 |
2 |
1 |
0 |
7 |
6 |
5 |
4 |
B |
A |
9 |
8 |
F |
E |
D |
C |
4 |
4 |
5 |
6 |
7 |
0 |
1 |
2 |
3 |
C |
D |
E |
F |
8 |
9 |
A |
B |
5 |
5 |
4 |
7 |
6 |
1 |
0 |
3 |
2 |
D |
C |
F |
E |
9 |
8 |
B |
A |
6 |
6 |
7 |
4 |
5 |
2 |
3 |
0 |
1 |
E |
F |
C |
D |
A |
B |
8 |
9 |
7 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
F |
E |
D |
C |
B |
A |
9 |
8 |
8 |
8 |
9 |
A |
B |
C |
D |
E |
F |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
9 |
8 |
B |
A |
D |
C |
F |
E |
1 |
0 |
3 |
2 |
5 |
4 |
7 |
6 |
A |
A |
B |
8 |
9 |
E |
F |
C |
D |
2 |
3 |
0 |
1 |
6 |
7 |
4 |
5 |
B |
B |
A |
9 |
8 |
F |
E |
D |
C |
3 |
2 |
1 |
0 |
7 |
6 |
5 |
4 |
C |
C |
D |
E |
F |
8 |
9 |
A |
B |
4 |
5 |
6 |
7 |
0 |
1 |
2 |
3 |
D |
D |
C |
F |
E |
9 |
8 |
B |
A |
5 |
4 |
7 |
6 |
1 |
0 |
3 |
2 |
E |
E |
F |
C |
D |
A |
B |
8 |
9 |
6 |
7 |
4 |
5 |
2 |
3 |
0 |
1 |
F |
F |
E |
D |
C |
B |
A |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
| |
4-BIT-REVERSAL |
NIBBLE |
REV |
0 |
0 |
1 |
8 |
2 |
4 |
3 |
C |
4 |
2 |
5 |
A |
6 |
6 |
7 |
E |
8 |
1 |
9 |
9 |
A |
5 |
B |
D |
C |
3 |
D |
B |
E |
7 |
F |
F |
|
Worked example :- XOR the string "FEE" and then bit-reverse the odd-position numeral.
Solution - break the string down into numeral pairs - "FE" = 1, "EE"=0 so XOR result is "10", then bit-reverse 1 - being "8", so final result is "80".
Hints:- Ignore the start and stop sentinals - "D". If the first number after the start sentinal is odd, XOR the whole string of numerals then bit-reverse all odd position numerals, if even, XOR the whole string then bit-reverse all the even position numerals. Remember 0, 6, 9 and F stay the same on bit-reversal.
You can also use Microsoft Excel to do automated XOR calculations on a numeral by numeral basis (as it can't handle 48 numeral strings).
You will need to install the Analysis Toolkit Add-In. For earlier versions of Excel you need to use VBA to create the "BITXOR" function.
To do this open VBA, create a new Module and enter the following function:-
"Public Function BITXOR(x As Long, y As Long)
BITXOR = x Xor y
End Function"
Then use the following formula in each Nibble Result Cell
"=DEC2HEX(BITXOR(HEX2DEC(SourceNibbleCell1),HEX2DEC(SourceNibbleCell2)))".
|