MS Word

advertisement
ECE-C490 Security in Computing
Winter term 2005
Homework #3
Due in class on Tuesday, February 1st
1. Consider stuck-at faults at lines x2, y2 and f in the circuit below. Determine which,
if any, sets of inputs can be used to detect these faults.
We begin by generating a truth table consisting of:
(a) all possible input combinations to the circuit;
(b) the corresponding output f for each input, and;
(c) the output for each input set if a stuck-at fault is present.
X1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
X2
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
X3
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
X4
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
Y1
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
Y2
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
f
0
1
1
1
0
1
1
1
1
0
0
0
0
1
1
1
X2/0 X2/1 Y2/0 Y2/1 F/0
0
0
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
0
0
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
0
1
0
0
0
1
1
0
0
0
1
1
0
0
0
1
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
1
0
1
0
F/1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
In our table, we use “X2/0” to denote “line x2 stuck at 0,” etc. For example, the input
set (1, 1, 0, 0) will produce f=0 when the circuit is operating correctly, but if the line
x2 becomes stuck at 0, the circuit will produce f=1, as the table shows. Therefore, we
can say that (1, 1, 0, 0) detects the fault x2/0. The input sets corresponding to
highlighted cells in the table can detect the fault listed at the top of that column.
2. Consider a repetition code using 5 bits. Design a circuit to detect errors in
transmission for this code.
In its simplest form, this repetition code would simply consist of two codewords:
{00000, 11111}. In a more useful form, it would consist of 2n codewords, each of
some size larger than n (where each bit beyond the first n is part of a check code for
the codeword). In this case, most students dealt with only two codewords, and the
easiest way to check for errors in this system is to simply XOR the first bit of the
codeword with each other bit separately (requiring four XOR gates) and then feed
the outputs of all four XORs into a final XOR gate, which will output a ‘1’ if any of
the bits are different. Since we are only expecting two codewords, both of which
consist of the same bit repeated five times, this is the only check necessary to detect
errors, and in fact it will detect up to four-bit errors in transmission.
Download