───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───
Parity
- Parity is a simple error detection technique. It helps identify whether a single-bit error has occurred during data transmission or processing.
- Parity can only detect single-bit errors—it cannot correct them.
- It fails to detect if two are more bits are changed since the parity may remain the same
Even vs Odd
- Even → number of 1s in a byte (including parity bit) is even
- Odd → number of 1s is odd
Detection and Correction
- Detection → did bits flip?
- Correction → flip the bits back
SEC & DED
- Improves parity by detecting 2 bit errors and correct 1 bit errors
- SEC → single error correction
- DED → double error detection
Hamming Code
- Place multiple parity bits at certain positions in the number
- Positions are powers of 2
- Formatted as , where is the total bits and is the number of data bits
Example
- → transfer 4 data bits,
Set Positions
- The data bits can be placed at the positions that are not powers of two
- The data would be
Parity Bits
- XOR is used to ensure each group has even parity
- checks 1, 3, 5, 7 →
- checks 2, 3, 6, 7 →
- checks 4, 5, 6, 7 →
- Final value →
───✱*.。:。✱*.:。✧*.。✰*.:。✧*.。:。*.。✱ ───