What is the definition of a fixed-length code in information theory?
A fixed-length code is a code in which every source symbol is represented by a codeword containing the same number of bits. The defining property is the equality of codeword length across all symbols, not the equality of the codeword contents themselves.
Conditions
- Applies to a single code mapping across all symbols in its alphabet.
- The defining property is equality of codeword length, not equality of codeword content.
Reasoning, step by step
- Identify the set of codewords assigned to the source symbols under a specific code.
- Measure the bit length of each codeword.
- Verify that all measured lengths are identical.
- Conclude that the code is fixed-length.
Example
In the displayed example table, Code 1, Code 2, and Code 7 are identified as fixed-length because every listed codeword in those columns has exactly 2 bits.
Common misconceptions
- Assuming that fixed-length means all codewords must be identical strings.
- Confusing fixed-length codes with distinct codes, which require codewords to be different from one another.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.