Вы находитесь на странице: 1из 2

15CSE100 Computational Thinking and Problems Solving

Tutorial 1
Topics: Basics of computation, data Representation, Number systems, Data Encoding, Data
Compression
Date of submission/discussion:
A Batch – 6/8/18
Write the answers in a paper. Write your roll number and name on the facing sheet provided.
Submissions should be made in class. Do not copy answers.
Questions
1. Briefly explain the difference between computation and calculation.
2. What are the four cornerstones of computational thinking?
3. State true or false, with justifications
a. Computational thinking is programming.
b. Computational thinking is a way to solve a problem quickly.
c. Computational thinking gives a solution.
d. Computational thinking does not state what a good solution is.
4. What is the need of data encoding? Explain the following.
a. ASCII
b. UNICODE
c. Pixel
d. Sampling
5. Convert the following numbers as specified. Give atleast 4 digits of precision in the factional part
if possible.
a. 23.2510 = ---------------2, ----------------8, -------------------16
b. 429.9910 = ---------------2, ----------------8, ------------------16
c. 1101.1112 = -----------------10, ----------------8, ------------------16
d. 11011101.111112 = -----------------10, ----------------8, ------------------16
e. 111111111.11112 = -----------------10, ----------------8, ------------------16
f. 127.358 = -----------------10, ----------------2, ------------------16
g. 2727.7778 = -----------------10, ----------------2, ------------------16
h. AB9F.FFA316 =-----------------10, ----------------2, ----------------8
i. FFFA93.FFF16 =-----------------10, ----------------2, ----------------8

6. Refer ASCII table and encode the following text.


a. Hello World
b. I got 50/50 for CTPS :)
7. Assume that you are designing a sensor device which can sense 2500 different events. You want
to encode each event with a unique number of some base, so that the sensor transmits the number
when corresponding event occurs. How many bit are required if you use
a. Binary numbers
b. Octal numbers
c. Hexadecimal numbers

8. Given a decimal number n, derive a formula for finding the number of bits in its
a. Binary equivalent
b. Hexadecimal equivalent
c. Octal equivalent
9. While converting octal numbers and hexadecimal numbers into binary we used a simple method
of converting each digit of the number into a binary number of length 3 or 4 respectively and
joining them. What is the math behind this conversion? Why do you think that it is correct?
10. We learned how to convert base 10 numbers to all other bases and how to convert numbers in any
base to base 10. Now the question is how can we convert a base x number into base y number
directly?
11. Explain run length encoding, lossy compression and lossless compression. Find the run length
encoding of the following bit strings.
a. 1100110101
b. 0010010010
c. 0000000000
d. 1111111111

12. Construct the bit string for the following run length encodings.
a. 2,1,4,5,3
b. 0,1,2,5,4
c. 6,1,3,2,4
13. Identify the errors in the following run length encodings and justify your answer.
a. 0,0,2,3,4
b. 3,0,1,0,3
c. 4,1,0,1,0,0
d. 3,0,0,2,1,0,1

14. Length of a run length encoding is defined as the count of numbers in it. For example, length of 3,
2, 3, 4, 1 is 5 and it represents the bit string 0001100011110. Give examples of 10 bit string which
a. maximizes the length
b. minimizes the length

15. A binary string B has n bits in it. If the run length encoding of B has only three 1’s at some positions
which represents the zeros, what is the minimum and maximum number which can appear in the
encoded string to represent ones.

16. Explain 1 bit sampling and 2 bit sampling. Which is better in terms of
a. Lossy compressibility
b. Lossless compressibility
17. “Pixel is a sample of an image”. Comment on this statement.
18. Write the run-length encoding of the following black and white image.

Page 2 of 2

Вам также может понравиться