I have a sample problem with w=1
, y=7
, z=0
, x = ~(w && y) | y;
and the solution is x = -1
, but I can't figure out why?
Here is my thought process:
(w && y) = (1 && 7) = 1
~1
1 in bits is 0000 0001
~1 in bits is 1111 1110
Not sure what to do from here.