Mohammed Shoaib
Mohammed Shoaib

Reputation: 372

What is 1 XOR 1 XOR 1?

so I know that 1 XOR 1 will be 0, and 1 XOR 0 will be 1 What will 1 XOR 1 XOR 1 be? I just started learning so I am really new to this Any help would be appreciated!

Upvotes: 0

Views: 12771

Answers (2)

in binary number, XOR is a sum, but unlike OR operation, you must consider the least significant number. So, if 1+1+1 in binary number equals 11, the operation 1xor1xor1 equals 1. On the other hand, 1+0+1 in binary equals 10, so 1xor0xor1 equals 0, while 1or0or1 equals 1, since the OR operation considers the most significant number.

Upvotes: -1

WhoKnows
WhoKnows

Reputation: 327

1 XOR 1 equals 0

1 XOR 0 equals 1

So it is 1. You can always decomposite.

Upvotes: 4

Related Questions