Docsity

Exam 3 - Introduction to Electronics - 6 Solved Problems | ECE 110, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
Problem
1
(25
points)
Consider
five
symbols with given relative
frequencies.
Two
different
codes were designed
to
achieve compression over
a
fixed
length code.
Symbol
A B C D E
Frequency 3/15 2/15 3/15 6/15 1/15
Codel
00
0101
Oil
1
0100
»|^
\»,V
Code2
010 001
Oil
1
000
--*is
v>:^
[)
(5pts)
Show that
the
average code word length
for
Code
1 is 2.2
bits/symbol.
-
4
44L
(b)
f5
/7te)
Terry, Kris
and Sam
computed
the
Entropy. Without computing
it
yourself,
check
which result(s) might
be
correct,
(check
all
that apply).
Justify
your answer.
>
2-2
(5
pts) What
is the
compression ratio
for
Code
1 as
compared with
a
fixed
length code?
'I
/
Hi
0.70
D
0.73
V
1-36
D
1.42
X^other
lc/4r
U
.(d)
(5
pts) Which
of
Code
1 or
Code
2 is
prefix-free?
ler
D
Only Code
1
D
Only Code
2
S^\
Both
J^.]
/^.
](e)
f5j[?/^
For
data compression purposes, which
of
Code
1 or
Code
2 is
preferable,
and
why?
;
S
pf3
pf4
pf5

Partial preview of the text

Download Exam 3 - Introduction to Electronics - 6 Solved Problems | ECE 110 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

Consider five symbols with given relative frequencies. Two different codes were designed to achieve compression over a fixed length code.

Symbol A B C D E

Frequency 3/15 2/15 3/15 6/15 1/

Codel 00 0101 Oil 1 0100 »|^ \»,V

Code2 010 001 Oil 1 000 - - * i s v > : ^

[) (5pts) Show that the average code word length for Code 1 is 2.2 bits/symbol.

  • 4 4 4 L

(b) f5 /7te) Terry, Kris and Sam computed the Entropy. Without computing it yourself, check which result(s) might be correct, (check all that apply). Justify your answer.

(5 pts) What is the compression ratio for Code 1 as compared with a fixed length code? ' I / Hi 0.70 D 0.73 V 1-36 D 1.42 X^other

lc/4r U

.(d) (5 pts) Which of Code 1 or Code 2 is prefix-free?

ler D Only Code 1 D Only Code 2

_S^_

Both

J^.] /^. ](e) f5j[?/^ For data compression purposes, which of Code 1 or Code 2 is preferable, and why?

; S

A DVD has a capacity of 4.7 GB. A DVD can be used for CD-quality music, sampled at 44. kHz, with 16 bits of data per sample (for stereo), and 8 bits per byte.

(a) (6 pts) Calculate the maximum number of hours of music that can be recorded in this format on one DVD, with no data compression.

/,A __ <3>d>^ by/dao v i

(b) (4pts) Suppose a Cyclic Redundancy Check (CRC) code is used to correct single-bit errors, as follows. For every run of fifteen consecutive data bytes, the code introduces 24 additional bits: one parity bit for each data byte, and then nine more parity bits, one for each bit position. (An actual CD uses a different error-correcting code.) Using the result of part (a), calculate the maximum number of hours of music that can be recorded with the CRC code on one DVD.

_JT_

Problem 3 (10points) Let u(f) = cos(6 7i f) and v(f) = cos(16 n t), where t is in seconds.

(a) (5 pts) Find a sampling frequency/^ between the frequencies if u and v such that v(f) aliases to u(t). Show your work. -t.^ ^•JL-JTS, ~ L--

(b) (5 pts) Determine the maximum sampling frequency/^ such that v(f) aliases to u(f). Explain your reasoning.

This sequential circuit has positive-edge-triggered D and JK flip-flops. Variable qi is the state of a flip-flop that is not shown, but connected to the same clock signal. The combinational circuit F implements d as a Boolean function of <?2, q, and q$.

clock

Time (ms)

(a) (16 pts.) Part of the timing diagram is given. Determine the entire waveform for d, and the remainder of the waveforms for q 2 , q, and q$. Assume that the delay in F is negligible. If there is insufficient information to determine a value, write "??" in the appropriate space.

(b) (4 pts.) Explain your reasoning for your answers for the values of qi and _q_ before time 1.0. Be sure to explain why alternative values are invalid.

You will design and analyze a mod-6 counter whose state sequence is i (<?2 q i ?o) = 000, 001, 010, 100, 101, 110, 000, ... Note that the counting sequence is not the' sequence of binary representations of 0, 1, 2, 3, 4, 5.

(a) (8pts) If the clock period is 7 ms, what are the periods of go, q, and q{l

Period of q 0 = Renod of qi = eriod of q 2 =

(b) (8 pts) ] Shown below is a partial design that uses a 3 -bit up counter and a 4x1 multiplexer. Specify constant inputs x, XQ, do, d, di, d^, to produce the specified counting sequence. Explain your design.

(c) (4 pts) Describe a simpler design that eliminates the multiplexer. Justify your design.