ββββ±*.q:qβ±*.:qβ§*.qβ°*.:qβ§*.q:q*.qⱠβββ
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 β
ββββ±*.q:qβ±*.:qβ§*.qβ°*.:qβ§*.q:q*.qⱠβββ