A type of error-correcting or error-detecting code in which a fixed number (conventionally k) of digits are taken into the encoder at a time and then output in the form of a codeword consisting of a greater number (conventionally n) of digits. It is often specified as an (n, k) code, with block length k and codeword length n. The corresponding decoder takes in n digits, and outputs k digits, at a time. Since the codewords are longer than the input words, the possible received words are no more numerous. The codewords are only a selection of all possible words of their length: the selection method gives any code its particular properties. See also code.