在matlab中如何进行位运算

2024-12-05 16:53:37
推荐回答(1个)
回答1:

>> 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.