Computer Hardware and Logic Circuits: Question 9

Syllabus 3.2

Structured AS 9 marks

A logic circuit has two inputs, D and E, and one output, Y. It is built from three gates, connected as follows:

  • Gate 1 is a two-input AND gate, with inputs D and E. Its output is called O1.
  • Gate 2 is a two-input NOR gate, with inputs D and E. Its output is called O2.
  • Gate 3 is a two-input OR gate, with inputs O1 and O2. Its output is the output of the whole circuit, Y.

Write Boolean expressions in plain text: use . for AND, + for OR, and NOT immediately before a term for NOT (for example, NOT (D+E)).

(a) Write the Boolean expression for O1 and the Boolean expression for O2, each in terms of D and E. [2]

(b) Write the Boolean expression for Y in terms of O1 and O2, then substitute your answers from part (a) to give Y in terms of D and E. [2]

(c) Complete the truth table for this circuit for all four combinations of D and E, showing the intermediate outputs O1 and O2 as well as the final output Y. [4]

(d) Using your completed truth table, describe in words the relationship between D and E that must hold for Y to equal 1. [1]

Show worked solution Hide worked solution

Worked solution

Part (a): Boolean expressions for O1 and O2

Gate 1 is an AND gate with inputs D and E, so:

O1 = D.E

Gate 2 is a NOR gate with inputs D and E. NOR is the inverse of OR, so first OR the inputs together, then invert the whole result:

O2 = NOT (D+E)

Part (b): Boolean expression for Y

Gate 3 is an OR gate with inputs O1 and O2, so:

Y = O1+O2

Substituting the expressions for O1 and O2 found in part (a):

Y = D.E + NOT (D+E)

Part (c): Completing the truth table

There are two inputs, so the truth table needs 2 to the power 2, which is 4, rows. Work out O1, then O2, then Y for each row.

  • O1 = D.E: this is 1 only when D = 1 and E = 1, and 0 otherwise.
  • O2 = NOT (D+E): first find D+E (1 if D = 1 or E = 1, or both), then invert it, so O2 = 1 only when D = 0 and E = 0.
  • Y = O1+O2: this is 1 whenever O1 is 1, or O2 is 1, or both.
DEO1 = D.EO2 = NOT(D+E)Y = O1+O2
00011
01000
10000
11101

Checking each row: for D = 0, E = 0, D+E = 0, so O2 = NOT 0 = 1, and O1 = 0.0 = 0, giving Y = 0+1 = 1. For D = 0, E = 1 and D = 1, E = 0, D+E = 1 in both cases, so O2 = NOT 1 = 0, and O1 = 0 (since D and E are not both 1), giving Y = 0+0 = 0 for both rows. For D = 1, E = 1, O1 = 1.1 = 1 and D+E = 1 so O2 = NOT 1 = 0, giving Y = 1+0 = 1. [4 marks]: [1] mark for each correctly completed row (O1, O2 and Y all correct for that row).

Part (d): The relationship between D and E for Y = 1

Reading down the Y column of the completed table, Y = 1 only in the D = 0, E = 0 row and the D = 1, E = 1 row. That is, only when D and E hold the same value as each other. In the two rows where D and E differ (D = 0, E = 1 and D = 1, E = 0), Y = 0.

So: Y = 1 exactly when D and E have the same value (both 0 or both 1); Y = 0 when D and E differ.

Final answers

  • (a) O1 = D.E, O2 = NOT (D+E)
  • (b) Y = O1+O2, so Y = D.E + NOT (D+E)
  • (c) Y values in order (D,E from 00 to 11): 1, 0, 0, 1, see the completed table above.
  • (d) Y = 1 exactly when D and E are the same as each other; Y = 0 when D and E differ.