Electronic – Simple Logic Circuit Not Behaving As Expected (TinkerCad)

digital-logic

Circuit

I need to build the following cicruit: F = (A AND B) OR (A XOR B) and I came up with the circuit in the image above. The bulb is only turning on when both A and B are OFF. The expected behavior is for the bulb to turn on if (A OR B).

I tested all the gates and bulb seperately and they all work as expected but the switch inputs don't, so I'm thinking it has something to do with the switch.

Best Answer

I took a quick look at your Tinkerc cct.

Inputs to the 7486 XOR gate are both at logic 0 always. They are connected to GND. Output of the XOR will therefore always be 0 too. You need to connect the inputs to the upper side of the slide switch.