A system for protecting a codeword u against an error in at least one <7-ary symbol, where q is an rth power of two, r>1 (q=2r). The code word u includes information symbols u[0] . . . u[k−1] , k>1 , each information symbol representing an integer in the range {0 . . . 2w−1}, where w=n*r, n≧1. A processor includes an integer processing unit for, under control of a program, calculating a parity symbol u[k] for protecting the information symbols, where the parity symbol includes −(a[0]·u[0]+a[1] ·u[1]+. . . +a[k−1]•u[k−1]) mod M, where the multiplication · and the addition + are integer operations. The constants a[0] . . . a[£−1] lie in {0 . . . M−1}, M>1 and are chosen such that the elements a[i]*d*qi mod M are unique for iε{0, . . . ,k−1}, jε{0 . . . n−1}, −q<d<q, d≠0.