Input: A received word .
Compute . If , then accept ; STOP.
If , then set and decode to and STOP.
Compare to the rows of . If row of differs in exactly one position (say ) or two positions (say and ), then correct in position , or positions and ; correct in position ; STOP
Compute . If , then set and decode to and STOP.
Compare to the rows of . If row of differs in exactly one position (say ) or two positions (say and ), then correct in position , or positions and ; correct in position ; STOP
Reject