In coding theory, block codes are a large and important family of error-correcting codes that encode data in blocks. There is a vast number of examples for block codes, many of which have a wide range of practical applications. The abstract definition of block codes is conceptually useful because it allows coding theorists, mathematicians, and computer scientists to study the limitations of all block codes in a unified way. Such limitations often take the form of bounds that relate different parameters of the block code to each other, such as its rate and its ability to detect and correct errors. Examples of block codes are Reed–Solomon codes, Hamming codes, Hadamard codes, Expander codes, Golay codes, Reed–Muller codes and Polar codes. These examples also belong to the class of linear codes, and hence they are called linear block codes. More particularly, these codes are known as algebraic block codes, or cyclic block codes, because they can be generated using Boolean polynomials. Algebraic block codes are typically hard-decoded using algebraic decoders. The term block code may also refer to any error-correcting code that acts on a block of k bits of input data to produce n bits of output data (n,k). Consequently, the block coder is a memoryless device. Under this definition codes such as turbo codes, terminated convolutional codes and other iteratively decodable codes (turbo-like codes) would also be considered block codes. A non-terminated convolutional encoder would be an example of a non-block (unframed) code, which has memory and is instead classified as a tree code. This article deals with "algebraic block codes".
The block code and its parameters Error-correcting codes are used to reliably transmit digital data over unreliable communication channels subject to channel noise. When a sender wants to transmit a possibly very long data stream using a block code, the sender breaks the stream up into pieces of some fixed size. Each such piece is called message and the procedure given by the block code encodes each message individually into a codeword, also called a block in the context of block codes. The sender then transmits all blocks to the receiver, who can in turn use some decoding mechanism to (hopefully) recover the original messages from the possibly corrupted received blocks. The performance and success of the overall transmission depends on the parameters of the channel and the block code. Formally, a block code is an injective mapping
C:Σk→Σn. Here, Σ is a finite and nonempty set and k and n are integers. The meaning and significance of these three parameters and other parameters related to the code are described below.
The alphabet Σ The data stream to be encoded is modeled as a string over some alphabet Σ. The size |Σ| of the alphabet is often written as q. If q=2, then the block code is called a binary block code. In many applications it is useful to consider q to be a prime power, and to identify Σ with the finite field 𝔽q.
The message length k Messages are elements m of Σk, that is, strings of length k. Hence the number k is called the message length or dimension of a block code.
The block length n The block length n of a block code is the number of symbols in a block. Hence, the elements c of Σn are strings of length n and correspond to blocks that may be received by the receiver. Hence they are also called received words. If c=C(m) for some message m, then c is called the codeword of m.
The rate R The rate of a block code is defined as the ratio between its message length and its block length:
R=k/n. A large rate means that the amount of actual message per transmitted block is high. In this sense, the rate measures the transmission speed and the quantity 1−R measures the overhead that occurs due to the encoding with the block code. It is a simple information theoretical fact that the rate cannot exceed 1 since data cannot in general be losslessly compressed. Formally, this follows from the fact that the code C is an injective map.
The distance d The distance or minimum distance d of a block code is the minimum number of positions in which any two distinct codewords differ, and the relative distance δ is the fraction d/n. Formally, for received words c1,c2∈Σn, let Δ(c1,c2) denote the Hamming distance between c1 and c2, that is, the number of positions in which c1 and c2 differ. Then the minimum distance d of the code C is defined as
d:=minm1,m2∈Σkm1≠m2Δ[C(m1),C(m2)]. Since any code has to be injective, any two codewords will disagree in at least one position, so the distance of any code is at least 1. Besides, the distance equals the minimum weight for linear block codes because:
minm1,m2∈Σkm1≠m2Δ[C(m1),C(m2)]=minm1,m2∈Σkm1≠m2Δ[𝟎,C(m2)−C(m1)]=minm∈Σkm≠𝟎w[C(m)]=wmin. A larger distance allows for more error correction and detection. For example, if we only consider errors that may change symbols of the sent codeword but never erase or add them, then the number of errors is the number of positions in which the sent codeword and the received word differ. A code with distance d allows the receiver to detect up to d−1 transmission errors since changing d−1 positions of a codeword can never accidentally yield another codeword. Furthermore, if no more than (d−1)/2 transmission errors occur, the receiver can uniquely decode the received word to a codeword. This is because every received word has at most one codeword at distance (d−1)/2. If more than (d−1)/2 transmission errors occur, the receiver cannot uniquely decode the received word in general as there might be several possible codewords. One way for the receiver to cope with this situation is to use list decoding, in which the decoder outputs a list of all codewords in a certain radius.
… excerpt ends here. Continue reading the full article.

![Block code: There are theoretical limits (such as the Hamming limit), but another question is which codes can actually constructed.[clarification needed] It is like packing spheres in a box in many dimensions. This diagram shows the constructible codes, which are linear and binary. The x axis shows the number of protected symbols k, the y axis the number of needed check symbols n–k. Plotted are the limits for different Hamming distances from 1 (unprotected) to 34.
Marked with dots are perfect codes:
light orange on x axis: trivial unprotected codesorange on y axis: trivial repeat codesdark orange on data set d=3: classic perfect Hamming codesdark red and larger: the only perfect binary Golay code](https://thumb.wikimedia.org/wikipedia/commons/thumb/4/4b/Linear_Binary_Block_Codes_and_their_needed_Check_Symbols.png/500px-Linear_Binary_Block_Codes_and_their_needed_Check_Symbols.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)