222
4
4 Instructions4.6.1 Matrix Operations
◆
Function
An XOR operation is performed on the bit patterns of the n bytes of data from head addresses [S1] and [S2].
The result is stored in elements from head address [D].
The result is 1 when the values of two bits are different; otherwise, the result is 0.
Assume that n = 4. The result of a matrix XOR operation is as follows:
1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1
1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0
1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0
1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1
1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1
1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
bit15 bit0
[+1]
[S1+0]
[+2]
[+3]
[+1]
[S2+0]
[+2]
[+3]
[+1]
[D+0]
[+2]
[+3]
(bit XOR)
◆
Application