Forgive me if this is a stupid question with a poorly drawn circuit diagram. I've never really made anything electrical before, so this is all very new to me.
I've recently been wondering how transistors can be used to add numbers together, and learned that it is done using logic gates. I thought I'd try to understand how this could be done, by drawing a circuit diagram for the half adder of an ALU. The below image is what I came up with...
For those unaware of how binary addition (for a single digit) works, the intention of this circuit is for neither LED to turn on if neither switch is closed, for only the top LED to turn on if only 1 switch is closed, and for only the bottom LED to turn on if both switches are closed.
This can be represented by the following truth table:
Would this circuit work correctly, in the way I have described? If not, how can I change it so that it would work?