implements XOR/OR/NOT (closes #10)