Electronic – Logic gates and logic circuits

circuit analysisdigital-logic

I understand logic gates and their truth tables. However, when it comes to the circuits of the gates, I have trouble understanding them. Could someone please explain how a gate such as the following can be compared to the NAND logic gate?

enter image description here

(original image source Basic Logic Gates and Buffers)

Best Answer

The best way to do this is to analyze each case separately. This gate has two input signals, so only four combinations to analyze. For each case write down the inputs and the resulting output. After the four cases, you have a truth table, which you say you already understand.

Here is the case with both inputs 0:

Both transistors are obviously off, so the pullup drives the output high.

Now do the (1,0) inputs case:

The bottom transistor is obviously off, so again the outut can only be high.

Case (0,1):

Case (1,1):

From these four cases you get the truth table:

  In1  In2  Out
  ---  ---  ---
    0    0    1
    1    0    1
    0    1    1
    1    1    0

which is the NAND function.