xor_flashcards

1
Q

What is the result of A XOR A?

A

A XOR A = 0. XOR-ing a value with itself always results in 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the result of A XOR 0?

A

A XOR 0 = A. XOR-ing a value with 0 leaves it unchanged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the result of A XOR 1?

A

A XOR 1 = ~A. XOR-ing a value with 1 toggles its value (flips the bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is XOR commutative and associative?

A

Yes, A XOR B = B XOR A, meaning XOR is both commutative and associative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly