Boolean Logic and Logic Gates: Question 10
Syllabus 10.1, 10.2, 10.3
A campus print-station kiosk automatically issues refunds for failed print jobs. Three inputs feed the refund-decision circuit: J = 1 if a printer-jam sensor detects that the job jammed partway through, otherwise 0; E = 1 if the user's account shows an error code was logged for that job, otherwise 0; and S = 1 if the self-service refund terminal is currently enabled at that kiosk, otherwise 0. A technician built the circuit from exactly two logic gates, but the paperwork recording which gates, and in what order, has been lost. All that survives is the completed truth table for the refund output, Rfund, shown below.
| J | E | S | Rfund |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
(a) By comparing each pair of rows that share the same values of J and E but differ in S, determine what role S plays in the circuit, and state whether Rfund can ever equal 1 when S = 0. [2]
(b) State the logic expression for Rfund in terms of J, E and S, and name the two gates used and the order in which they are applied. [3]
(c) State the number of the eight (J, E, S) combinations for which the refund is issued automatically (Rfund = 1), and identify them. [2]
Show worked solution Hide worked solution
Worked solution
Part (a): Identifying the role of S
Group the eight rows into four pairs that share the same J and E but differ in S:
| J | E | Rfund when S=0 | Rfund when S=1 |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 |
In every pair, the S = 0 row gives Rfund = 0, regardless of J and E. This means S must be 1 before Rfund can ever become 1. S is acting as a gating (permission) condition on the rest of the circuit, so Rfund can never equal 1 when S = 0.
Part (b): Reconstructing the expression
Since S = 0 always forces Rfund = 0, and Rfund only becomes 1 for some S = 1 rows, the final gate combining S with the rest of the circuit must be an AND gate (an AND gate is 0 whenever either input is 0, which matches S = 0 always giving 0).
Now look only at the S = 1 rows to find what S is ANDed with:
| J | E | Rfund (S=1 rows) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
This is exactly the truth table of an OR gate combining J and E (0 only when both are 0, 1 otherwise).
So the reconstructed expression is:
Rfund = (J OR E) AND S
with gate order: OR first (combining J and E), then AND (combining that result with S).
Verification against all eight rows: (0,0,0)→(0 OR 0) AND 0 = 0 ✓; (0,0,1)→0 AND 1 = 0 ✓; (0,1,0)→1 AND 0 = 0 ✓; (0,1,1)→1 AND 1 = 1 ✓; (1,0,0)→1 AND 0 = 0 ✓; (1,0,1)→1 AND 1 = 1 ✓; (1,1,0)→1 AND 0 = 0 ✓; (1,1,1)→1 AND 1 = 1 ✓. Every row matches the given table.
Part (c): Counting the automatic refunds
Reading down the Rfund column of the original table: 0, 0, 0, 1, 0, 1, 0, 1. There are three rows where Rfund = 1, namely (J=0, E=1, S=1), (J=1, E=0, S=1) and (J=1, E=1, S=1).
Final answers
- (a) S is a gating condition. Rfund can never equal 1 when S = 0
- (b) Rfund = (J OR E) AND S; gate order: OR, then AND
- (c) 3 of the 8 combinations issue an automatic refund: (0,1,1), (1,0,1) and (1,1,1)