aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bits.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bits.c b/bits.c
index e283be3..951cc91 100644
--- a/bits.c
+++ b/bits.c
@@ -30,7 +30,7 @@ int bitAnd(int x, int y) {
* Difficulty: 1
*/
int bitXor(int x, int y) {
- return 2;
+ return ~(x & y) & ~(~x & ~y);
}
/*