Let s denote a prime number and let b be prime and a quadratic residue modulo s. Then Q(s, b) and Qʹ(s, b) are the cyclic linear codes defined by the polynomials (Xαr)

and

(X – 1) (Xαr)

over b, respectively, where Q denotes the set of all quadratic residues modulo s, and α is a primitive sth root of unity in some extension field of b. The code Q(s, b) is called the augmented quadratic residue code, whereas Qʹ(s, b) is called the expurgated quadratic residue code. It can be shown that Q(s, b) is an [s,(s + 1)/2]-code and Qʹ(s, b) is an [s,(s−1)/2]-code.

The extended quadratic residue code Qe(s + 1, b) is obtained by applying standard lengthening (i.e., construction X with a [1, 1, 1]-code) to Qʹ(s, b) ⊂ Q(s, b). It is a linear [s + 1,(s + 1)/2]-code over b.

Bounds on the minimum distance of Qe are available, but the actual minimum distance of quadratic residue codes is usually much higher. It can be shown that the minimum distance of Qe is actually given by the following values. These tables are based on the tables in [1, page 318], but contain some additional entries.

### Over ℤ2

 s + 1 d 8 4  18 6  24 8 , extended Golay code 32 8  42 10  48 12  72 12  74 14  80 16  90 18  98 16  104 20  114 16  128 20  138 22  152 20 

### Over ℤ3

 s + 1 d 12 6 , extended Golay code 14 6  24 9  38 11 ,  48 15  60 18  62 12  72 18  74 18  84 21 

### Over F4

 s + 1 d 6 4 , hexacode 12 6  14 6  20 8  30 12  38 12  42 10  44 14  54 14  60 14 

### Over ℤ5

 s + 1 d 12 6  20 8  30 12  32 10 

### Over ℤ7

 s + 1 d 20 9  30 12  32 13 

### Over F9

 s + 1 d 8 5  18 8  20 10  30 12  32 12 

### Over F25

 s + 1 d 8 5  14 8  18 10  24 12 

### Over F49

 s + 1 d 6 4  12 7  14 8  18 10  24 12