Hello SAS Community, I am currently facing an issue with the Bitwise NOT (BNOT) function in my SAS code. Instead of producing the expected inverse of 1 or 0, the function is returning random numbers in the result window. I have tried using the BNOT function on binary values 1 and 0, but the output is not as expected. Has anyone encountered a similar problem or have any insights into what might be causing this issue? Any help or suggestions would be greatly appreciated. Thank you in advance for your assistance! data Logical_Input;
input x y;
datalines;
0 0
0 1
1 0
1 1
;
run;
OPTION VALIDVARNAME=ANY;
data Logical_operation_table;
set Logical_Input;
"x and y"n = BAND(x,y);
"x or y"n = BOR(x,y);
"x xor y"n = BXOR(x,y);
"not x"n = BNOT(x);
run;
proc print noobs; run; Output: x y x and y x or y x xor y not x 0 0 0 0 0 4294967295 0 1 0 1 1 4294967295 1 0 0 1 1 4294967294 1 1 1 1 0 4294967294 Best regards, Vijay
... View more