1. With the help of the table on page 2 of the
lecture notes, add the following numbers using Two’s complement, Sign and
Magnitude and One’s-Complement methods: 7/8+3/8+2/8-6/8. What was your
observation?
|
Sign & Magn. |
Binary Num. |
|
7/8 |
0111 |
|
3/8 |
0011 |
|
2/8 |
0010 |
|
-6/8 |
1110 |
|
= 6/8 |
= (1)1010
= -2/8 ≠ 6/8 |
|
2’s Complem. |
Binary Num. |
|
7/8 |
0111 |
|
+3/8 |
+ 0011 |
|
+2/8 |
+ 0010 |
|
-6/8 |
+ 1010 |
|
= 6/8 |
= (1)0110
= 6/8 |
|
1’s Complem. |
Binary Num. |
|
7/8 |
0111 |
|
+3/8 |
+0011 |
|
+2/8 |
+0010 |
|
-6/8 |
+1001 |
|
= 6/8 |
= (1)0101
= 5/8 ≠ 6/8 |
In two’s
complement arithmetic the overflows don’t mess up the result, if the final
result is within the desired range.
2. Generate 100000 samples of a random signal in Matlab whose mean is
0.5 and variance is 0.8. Pass it through the system h[n] = [1 2
3]. First calculate (using pen and paper) what the mean and variance of the
output should be. Next find out the mean and variance of the output noise using
Matlab. Is there any difference between what you calculated and what Matlab
suggests?
See H12.m.
Using
formulas on page 22 we get

There is a
slight difference between the theoretical results and the results obtained in
Matlab, depending on the length of the random vector (the longer the vector,
the more accurate the results).
3. Prove: (lecture notes, page 17)
.

4. Consider the system: y[n]=1.2x[n]+0.5y[n-1]
Depict the
statistical model for fixed-point round-off error of this system. Express the
mean and the variance of the output round-off error in terms of the mean and
the variance of the input round-off error (denoted by me and σe2 respectively).
What is the noise gain of this system? Noise gain is defined on page 63 of the
lecture notes.

,
where
is solved with help of H(z) (H(z)
is the transfer function after the multiplier 1.2) and
because
the errors go through the same system.
.
Because the transform
of
is
,
.

So ![]()
and![]()
Noise gain
is 
5. How many bits are required for SNR ≥ 60 dB?
Signal-to-noise
ratio:

for ![]()

If the
scaling is performed such that
, we get
![]()
If we use the
other equation (
), we get
![]()