Partial implementation of AND, OR, XOR and NOT