Saturday, December 17, 2011

What is a fixed length code?

is it i use the huffman coding to find out the binary number and assign it to the variable?





Eg.


0.3 = 00


0.25 = 01


0.25 = 10


0.2 = 11





Need help here.|||A fixed length code is a kind of channel coding that was used in earlier communication systems. The idea is simple: lets suppose you want to encode an alphabet {A1, A2, A3, ... Ak}.


A fixed length code C is a set of code words {C1,.... Ck} , all of the same number of bits, each of which encodes a specific element of the alphabet. Notice that this last property is essential to be able to decode the original message from an encoded version.





E.g. if the alphabet of messages is {A, B, C, D, E} then 3 bits suffice to represent these five elements, and you can choose the code





A = 000


B = 001


C = 010


D = 011


E = 100





one among the many possibilities of assigning unique 3-bit code words to each message.





Huffman coding is variable length, so by definition a Huffman code cannot be a fixed length code.

No comments:

Post a Comment