A decoding method for binary quadratic residue codes