
Aaron T. answered 01/23/21
Bachelors in Computer Science with 8+ Years of Industry Experience
Hi Yulia, I would start on this problem at the top and work left to right, top to bottom.
The first input is run immediately through a NOT gate, meaning if it was on (1) it would be inverted to off (0) before being routed to the XOR gate. The value from the second input is routed directly to the same XOR gate.
XOR gates will output a 1 if ONLY one of the inputs is a 1 and the other is a 0. So for instance, if the first input to the circuit is 0, then the first input to the XOR is 1. If the second input to the circuit is 1, the second input to the XOR is also 1. In this case, because more than one input to the XOR is 1, the output will be 0.
Moving down, you next have a NAND gate, or a NOT AND gate. A normal AND gate outputs a 1 if/only if all inputs are also 1; otherwise 0. In the case of the NAND gate this is flipped; if all inputs are 1 then the output is 0, otherwise 1. So if the second and third inputs to the circuit (the first and second inputs to the NAND gate) are both 1, for instance, then the output of the gate will be 0.
The last gate is a NOR gate. A normal OR gate outputs 1 if any of its inputs is 1. For NOR, this is flipped (similar to the NAND gate) -- a NOR gate outputs 0 unless all inputs are also 0. If all inputs are 0, it outputs a 1.
Continuing our example, the first input to the NOR gate (the output of the XOR gate) is 0, and the second input (the output of the NAND gate) is also 0. Thus, the NOR gate will in this case output a 1, which is the final output of the circuit.
In terms of building a truth table, the table will have to have three columns for the three inputs and one column for the output. The number of rows will equal all possible input combinations, which for this problem is 2^3 = 8 (two possible states for each input, three inputs). You can build the table by calculating the output for each set of inputs in a similar fashion to that above.
Hope this helps!