If you can represent/model a Conditional IF statement with AND + NOT or OR + NOT
This is partly possible.

Assume your code is

if (a==b)
  x = y;
else
  z = w;


where all vars are ints

This can be rewritten as

c = (a==b) -1 // true 1-1=0; false 0-1=0xfffffffff

x = (~c &amp;  y) | (c &amp; x); // or ~(~(~c&amp;y)&amp;~(c&amp;x)) to only use &amp; and ~
z = (c &amp;  w) | (~c &amp; z);


This can be applied to arbitrarily complex expressions, even nested, but you cannot have function calls, which seriously limits application area.

Note that this is routinely used to program SIMD extensions like SSE or AVX. In SIMD, you do several operations simultaneously and the only way to perform if-then-else if by mean of masking and anding/oring.

Similarly, there is the same problem on a GPU where hundred of processing elements work simultaneoulsy. It is hidden from the user, but internally the controller transforms if-then-else to logic ops. It even keeps track of it across function calls.