Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In
telecommunication, a Berger code is a unidirectional error detecting
code, named after its inventor, J. M. Berger. Berger codes can detect
all unidirectional errors. Unidirectional errors are errors that only
flip ones into zeroes or only zeroes into ones, such as in asymmetric
channels. The check bits of Berger codes are computed by summing all the
zeroes in the information word, and expressing that sum in natural
binary. If the information word consists of n bits, then the Berger code
needs k = lceil log_2 (n+1) rceil "check bits", giving a Berger code of
length k+n. (In other words, the k check bits are enough to check up to
n = 2k ¿ 1 information bits). Berger codes can detect any number of
one-to-zero bit-flip errors, as long as no zero-to-one errors occurred
in the same code word. Berger codes can detect any number of zero-to-one
bit-flip errors, as long as no one-to-zero bit-flip errors occur in the
same code word. Berger codes cannot correct any error.