In: Electrical Engineering
The thermometer code is 8-bit. Therefore, it can represent integers from 0 to 8. The correct thermometer codes (without bubble error) are:
0000 0000
1000 0000
1100 0000
1110 0000
1111 0000
1111 1000
1111 1100
1111 1110
1111 1111
We divide the entire thermometer code into two equal halves. From the above, we can easily see that for each of the halves, the correct code could be one of the following four:
0000
1000
1100
1110
1111
Since we have to use NOR gates, we will make POS (Product Of Sums) expression. We make a function F(X,Y,Z,W) such that if XYZW takes one of the five values above, F(X,Y,Z,W) = 0
Note that in a POS expression, variable represents a 0, while a barred variable represents a 1. Therefore
This expression requires one NOR gate for each of the three sums inside the brackets, and one NOR gate for the product. Thus, we require four NOR gates overall for first half of the thermometer code.
If F(X,Y,Z,W) for the first half is 0, we will know that there is no bubble error in the first part.
We will need an identical circuit for the second half (requiring another four NOR gates)
The outputs of both the halves will be zero if there is no error. If these outputs are combined with a NOR gate, output will be one.
Thus, there will be no error for final output 1.
The logic circuit is as follows:
Let the 8-bit thermometer code be T = T1 T2 T3 T4 T5 T6 T7 T8
T1 represents the leftmost bit and T8 represents the rightmost bit.
The first half is T1 T2 T3 T4 and the second half is T5 T6 T7 T8
Note that ~T1 = T1 bar = inverted value of T1
We need to check for one more thing. Even if T1 T2 T3 T4 and T5 T6 T7 T8 are separately correct, we can have a situation where T1 T2 T3 T4 = 1110 and T5 T6 T7 T8 = 1000. While both these halves are correct separately, they contain bubble error when joined together. Thus, we need to check if T4 and T5 have the correct combination. From the allowed sequences, we know that T4 = 0 and T5 = 1 is the only sequence not allowed. Thus, if we use 0, T4 and ~T5 as the inputs to a 3-input NOR gate, we will get 1 if there is an error, and 0 if there is no error.
Thus, we have three sub-blocks, one each for the two halves and one for T4 and T5.
Output is Y. Y = 1 when there is no bubble error in the thermometer code. Y = 0 if bubble error is present.