# MOSFET logic gates: Putting the pieces together

So I got this problem. And I know MOSFETs...Sort of.

So the area in red is a NAND gate and the area in blue is an Inverter...I think? So I know what those two pieces are, now how do those connect? Let alone what the other MOSFETs function as. So as the title says I can't "Put the pieces together".

And I know you can't give answers to homework problems. So if you can please give me some breadcrumbs to how these pieces come together, it would be greatly appreciated.

EDIT:

I tried the suggestion in the comments and I got 0001. I saw that C is always 1 so I can treat it as a straight wire (correct me if I'm wrong). I thought if D or E is one then the MOSFET without the label would treated as a wire and A,B or C would short circuit, I thought the only way is if D and E are both 0. What am I doing wrong?

EDIT 2:

I am now getting 1001.

• I wouldn't immediately jump to "This is a nand gate" and "This is an inverter". Carefully go through each input and think about what happens when it's low or high. Alternatively, just make a big truth table (this will take a while) and figure out the output z for each combination of inputs. It may help to break the truth table into two smaller ones, one of both D and E with the output taken at the drain of D or E (I shall call it N), and the other one of A, B, C, and N – C_Elegans Mar 19 at 16:29
• I see, I'll work on it and see what I get. – user213230 Mar 19 at 16:31
• I tried what you said and I got 0100. What did I do wrong? @C_Elegans – user213230 Mar 19 at 17:16
• Can't really tell what you did wrong if you don't show your work – C_Elegans Mar 19 at 17:19
• So I caught my mistake and now I calculated 0001. Am I heading in the right path? @C_Elegans – user213230 Mar 19 at 17:45

No, your current guess of "0001" is still wrong.

Here are some hints to get you going:

• There are two separate logic functions here, one associated with each of the load resistors.
• One of those functions has inputs D and E. Call its output Y.
• The other function has inputs A, B, C and Y, and its output is Z.
• Start by working out the full truth table for Y (four entries).
• Then work out the full truth table for Z (16 entries).
• Finally, in your tables, find the four specific results asked for in the problem statement. simulate this circuit – Schematic created using CircuitLab

If you redraw the circuit like this, you will get more clarity. Then deduce Z as:

• Can you write the boolean expression for Z in terms of A,B,C,X ?
• After that, write the expression for X in terms of D and E.
• Substitute and reach the final expression for Z.