MATLAB logic
fprintf('\nZ Y X F\n'); for k=0:2^N-1 str = sprintf('%04s',dec2bin(k)); x = str(4)=='1'; y = str(3)=='1'; z = str(2)=='1'; fprintf('%d %d %d ',z,y,x); % insert logic statement here f = ~(x&(y|z)); fprintf(' %d\n',f); end
Z Y X F 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0