(D-Problems discussed on Friday, 14-Oct-2016)
(Q-Problems due on Tuesday, 18-Oct-2016)
Practice Problems: (not graded)
These are practice problems for you to try out. (Not graded or discussed.)
T9-PP1: (Binary Representations) Problems 1, 2, 5 of Section 4.2.1, p.142 of [SG3].
Discussion Problems: -- Prepare (individually)
for tutorial discussion.
T9-D0: Read Ch. 4.1--4.2 of [SG3]
T9-D1: (Binary Representations) ---
| Part-1 |
| Part-2 |
Problem 1(b), 3(a)(c), 4(c), 5(c), 8(a), 9(a) on p.184 of [SG3]-Ch4.
T9-D2: (ASCII and UNICODE encoding)
How many binary digits (or bits) would it take to represent
the following phrase
"What are you doing up so early in Cinnamon?" (Do not include the surrounding "" marks.)
(a) in ASCII code, and
(b) in UNICODE?
T9-D3: [Boolean Logic Laws]
Using truth tables, prove the following logical law (DeMorgan's Law).
~(P + Q) = (~P) * (~Q)
T9-D4: (Simple Logic Circuit Design)
Design a circuit using AND, OR and NOT gates to implement the following truth table for the following logic function with two inputs a and b. |
a b Output =============== 0 0 1 0 1 0 1 0 1 1 1 1 |
T9-D5: (Advertising War)
There are two pricy restaurants next to each other.
One has a signboard that says,
|
meaning ("Food is Good" implies not ("Food is Cheap")) |
and the other has a signboard that says,
|
meaning ("Food is Cheap" implies not ("Food is Good")) |
Problems to be Handed in for Grading by the Deadline:
(Note: Please submit hard copy to me.
Not just soft copy via email.)
T9-Q1: (10 points) (Binary Representations)
Problem 1(a)(c), 3(b)(d), 4(b), 5(b)(d), 8(b), 9(b)(c) on p.184 of [SG3]-Ch4.
T9-Q2: (5 points) (Storing Images) [First read Ch4.2.2 of [SG]]
(a) (Adapted from Practice Prob. 2 of Ch4.2.2 of [SG].)
How many bits / bytes are needed to store a single
uncompressed RGB image from a 25 megapixel digital camera?
How many such images can be stored in a 32GB (Giga-Byte) memory-card?
(b)
Answer part (a) again, but now assume that the information is
first compressed with a compression ratio of 20:1?
T9-Q3: (5 points) (Storing Sound)
[First read Ch4.2.2 of [SG]] about MP3 format
(a)
Using MP3, how many bits / bytes are required to store a 4-minute song
in uncompressed format?
How many such songs can be stored in a 32GB memory-card?
(b)
Answer part (a) again, but assume that the information is
compressed with a ratio of 15:1?
T9-Q4: (5 points) [Creative, Interesting Interpretations]
Give more interesting and creative interpretations of
G = A + (B*(~C))
T9-Q5: (10 points) [Boolean Logic Laws]
Using truth tables, prove the following logical laws.
1. X*(X+Y) = X
[Absorption Law]
2. ~(X*Y) = (~X) + (~Y)
[de Morgan's Law]
3. X+(Y*Z) = (X+Y)*(X+Z)
[Distributive Law]
A7-2013: (Limits of Floating Point Numbers)
For 64-bit computers, if we
use 53 bits to represent the mantissa (sign/magnitude) and 11 bits to
represent the exponent (also sign/magnitude), we know that we can only
represent a small subset of the real numbers.
The gap (i.e., difference in absolute value)
between two "consecutive" representable real numbers also varies.
(a) What is the largest number (and smallest number) that can be represented.
(b) What is the smallest gap between two consecutive real numbers?
What is the largest gap between any two consecutive real numbers?
[For some details on floating points, you can see http://en.wikipedia.org/wiki/Floating_point ]