在matlab中如何进行位运算

如题所述

第1个回答  2013-03-25
>> help bitxor
BITXOR Bit-wise XOR.
C = BITXOR(A,B) returns the bitwise XOR of arguments A and B,
where A and B are unsigned integers or arrays of unsigned integers.

Example:
Create a truth table:
A = uint8([0 1; 0 1])
B = uint8([0 0; 1 1])
TT = bitxor(A,B)

See also bitor, bitand, bitcmp, bitshift, bitset, bitget, intmax.本回答被提问者采纳
相似回答