December 2014
Beginner
300 pages
8h 9m
English
Otherwise known as the exclusive OR operator, written as ^, bitwise XOR compares two inputs and returns 1 when the two inputs are different (see Figure 7.7).
Figure 7.7 Performing a bitwise XOR on two bytes (one on top and one on bottom).
Notice in this example that only the comparisons where input 1 and input 2 are different result in a 1. Matching 1s (1 and 1) returns 0 and matching 0s (0 and 0) returns 0.
Read now
Unlock full access