Logic gates and binary operations