The Golay code is a type of the iniprimitive BCH code. The (23, 12, 7) Golay code is a unique perfect linear error-correcting code that can correct all patterns of three or fewer errors in 23 bit positions. This paper designed the Golay decoder based on C++ Builder. It can encode, correct the error bits of transmission and decode. This paper pit forward a new algorithm which can calculate all error patterns. It can list the all 2047 error patterns.