XOR checksum of four bytes — parity and checksum
exam standardthe weakest useful checksum
Answer
00010000
Why this example is worth doing
XORing all the bytes together gives a one-byte longitudinal redundancy check — cheap, and used in simple serial protocols. It is also weak in a specific and predictable way: it cannot detect reordering at all, because XOR is commutative, and it misses any error that flips the same bit position in two bytes. The page names those blind spots explicitly rather than presenting it as adequate.
Try your own input in the Parity & checksum. Even and odd parity, one’s-complement sums and the Internet checksum, step by step.
How the answer is reached
Column by column
A10110110
B01101101
C11010010
D00011001
result00010000
| bit | A | B | C | D | result |
|---|---|---|---|---|---|
| 7 | 1 | 0 | 1 | 0 | 0 |
| 6 | 0 | 1 | 1 | 0 | 0 |
| 5 | 1 | 1 | 0 | 0 | 0 |
| 4 | 1 | 0 | 1 | 1 | 1 |
| 3 | 0 | 1 | 0 | 1 | 0 |
| 2 | 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 | 0 |