Difference between Static Length and Variable Length Coding Scheme:

Static Length Coding Scheme Variable Length Coding Scheme
  • Static length codes are also known as fixed-length codes. A fixed-length code is one whose codeword length is fixed.
  • The ASCII code for the letter 'a' is 1000011 and for letter 'A' is coded as 1000001.
  • Here, it should be noticed that the ASCII code uses the same number of bits to represent each symbol. Such codes are also called static or fixed-length codes.
  • A variable-length code is the one whose codeword length is not fixed.
  • For an example of a variable-length coding scheme, consider the table given below.
 
Example of static length and variable length coding scheme

 

 

In the below table, Code 1 is a fixed-length code, and, code 2 and code 3 are variable-length codes.

xi Code 1 Code 2 Code 3
x1 00 0 0
x2 01 1 10
x3 10 00 110
x4 11 11 111