www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/TruthTableBitXORExample.m

    %% Truth Table  
% Create a truth table for the logical XOR operation.   

%%  
A = uint8([0 1; 0 1]);
B = uint8([0 0; 1 1]);
TTable = bitxor(A, B) 

%%
% |bitxor| returns 0 if both bit-wise inputs are equal.