Questions about this topic? Sign up to ask in the talk tab.

Bitwise math/Operators/XOR/example

From NetSec
Jump to: navigation, search
back to Bitwise math


Example: A xor F = 5
Operation Hexadecimal Binary comment


xor

A

F

1010

1111

The first and third bits are true.

The first, second, third, and fourth bits are true.

=
5 0101 The second and fourth bits are true in ONLY one instance as opposed to two.
  • The 8’s and 2's placeholders are the same so they return 0.
  • The 4’s and 1’s placeholders are different, therefore return true.