Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Binary Binary numbers are a crucial concept in the field of computer science. Computers are built on top of the binary number system, and many

Binary
Binary numbers are a crucial concept in the field of computer science. Computers are built on top of the binary number system, and many algorithms make use of binary numbers. In this assignment, you will be taking a look at one application involving binary numbers.
Run Length Encoding
It is sometimes important to minimize the space used for storing data. This idea of data compression can be implemented in many forms. One of the simpler techniques is known as Run Length Encoding (RLE). RLE takes advantage of the fact that in many cases, data will contain a run of repeated 0s or 1s, and these runs can be represented by a shorter code. RLE is a technique used in some image or sound formats to reduce the overall size of the file. There are many variations of this process, but for this assignment, you will use the 3-bit encoding version described below.
1. Given binary data represented by a sequence of 0s and 1s, break the number into runs of 0s and 1s and note the length of each run.
2. For any run of more than 7, break the run into groups of 7 or smaller.
3. For each run, create an encoded form by first placing the type of run 0 or 1 and then the binary representation of the run's length.
4. Write out the encoded form of data by taking each encoded run and separating them with spaces. Be sure to keep the original order of the data intact.
Example:
Given 11111000000010000001111111000000, what is the RLE form of this data?
Breaking this into runs gives us 51s,70s,11s,60s,71s,60s
For each group, combine the length in binary followed by the type of run. Use spaces to
separate each run:
110101111001011011110110
Data compression is the ratio of the compressed data over the uncompressed data. In this case, the compressed data is 24 bits (including the spaces, which must be counted), and the original data is 32 bits. This gives a data compression ratio of 24/32 or 0.75.
Answer the following questions.
1. What is the RLE of the following inputs?
a.1111111000000011
b.1111100000000000
c.1010101010101010
2. For each of your answers to question 1, compute the data compression ratio.
3. Why must runs over 7 be split apart in this 3-bit encoding
scheme?
4. Will this technique always result in a smaller RLE string
compared with the original data? Explain why or why not.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions

Question

PBr3 A etherMg BCH2OCH3O+DCH2Cl2PCCC

Answered: 1 week ago

Question

Does it avoid using personal pronouns (such as I and me)?

Answered: 1 week ago

Question

Does it clearly identify what you have done and accomplished?

Answered: 1 week ago