| MATLAB Function Reference | ![]() |
Syntax
Description
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 1
The five-bit binary representations of the integers 13 and 27 are 01101 and 11011, respectively. Performing a bitwise XOR on these numbers yields 10110, or 22.
Example 2
Create a truth table for a logical XOR operation:
See Also
bitand, bitcmp, bitget, bitmax, bitor, bitset, bitshift
| bitshift | blanks | ![]() |
© 1994-2005 The MathWorks, Inc.