Question: A bitstring is just a sequence of bits, e . g . 1 0 0 1 0 1 1 0 . Normally, printable characters in
A bitstring is just a sequence of bits, eg Normally, printable characters in a file are encoded
as bytes, or bitstrings of length This is called ASCII code. For example, the ASCII code for the character
a is the bitstring which is in binary.
However, we are not forced to use a fixedlength encoding. If we choose a di
erent encoding in which the codes can have di
erent lengths, then we can assign shorter strings to the more frequent characters, thereby saving space.
To illustrate, lets do this for bitstrings of length Suppose we have a file that is exactly bits long,
so it can be viewed as a sequence of bit bitstrings. Suppose we scan the file and find that the four
bit bitstrings occur in the file with the frequencies as shown in Fig.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
