張耀仁
張老師與他的科技英文與科普傳播 Technical English for Engineering Students Using Claude
星期二, 10月 28, 2025
Hamming code
1. Sender: Encoding
2. Transmission & Error
3. Receiver: Correction
Original Data (1011)
1
D3
0
D5
1
D6
1
D7
Encoded Codeword
0
P1
1
P2
1
D3
0
P4
0
D5
1
D6
1
D7
P1 checks D3, D5, D7 (1+0+1=even)
P2 checks D3, D6, D7 (1+1+1=odd -> P2=1)
P4 checks D5, D6, D7 (0+1+1=even)
Transmitted: 0110011
Bit 6 flips!
Received Codeword
0
1
1
0
0
0
1
Parity Re-check
P1 (1,3,5,7): 0+1+0+1 = even
✔
P2 (2,3,6,7): 1+1+0+1 = odd
❌
P4 (4,5,6,7): 0+0+0+1 = odd
❌
Error Syndrome
Failed checks are P2 and P4.
Position 2 + Position 4 = Bit 6
Correction
Flip bit at position 6.
0
1
1
0
0
1
1
Recovered Data
1
0
1
1
沒有留言:
張貼留言
‹
›
首頁
查看網路版
沒有留言:
張貼留言