# 7432 behaves like an AND gate & 7408 behaves like an OR gate

Ok. First of all, I'm an absolute beginner about IC and circuits. If you will view the pictures, you will notice that the 7432 behaves like an AND gate and the 7408 behaves like an OR gate. PS. I tried the circuit on a 7487 XOR gate and 7404 NOT gate and it works fine.

So my question is. Is there something wrong with my circuit or is it with the IC?

Switches are on the 1st and 6th on the dip switch. BTW. Disregard the IC on the center of the pictures. That's a 7404 NOT gate. Thanks in advance Sirs.

1: off --- 6: on --- LED: off 1: on --- 6: on --- LED: on 1: off --- 6: on --- LED: on 1: on --- 6: on --- LED: on

• What connection do your switches make? If they connect signals high, that probably won't work, as TTL-ish logic families tend to interpret undriven inputs as high. Often what you actually need to do is use pull-up resistors, rotate your dip switch 180 degrees, and wire it so that a switch in the "down" position connect the signal to ground for a "0", while the "up" position leaves them open and pulled up by the resistor for a "1" Commented Mar 18, 2019 at 17:42

Your observations would hold true if you used negative logic, that is 'active low' signals instead of active high signals.

Then the 7408 acts to pass any active low signal, mimicking an 'or' gate using positive logic. With positive logic, the 7408 output is true only if both inputs are true.

The 7432 is designed to pass any active high signal, so using active 'low' logic it passes nothing. It is not an XOR gate, so if both inputs are low, the output is logic low (0).

Since your LEDs were connected to be active with a low, or '0' output, they completed the negative logic effect.

There is nothing wrong with what you see. Using active low logic requires more experience, as the behaviour of the gates is inverted.

It looks like your switches are pulling signals to ground. That means that "on" corresponds to 0 on the input, and "off" corresponds to 1. Similarly, as pointed out previously, if your LED is going from power to the output, when your LED is on the output is low (0) and when off the output is high (1).

If you draw the truth table with all these inversions, you'll find that if both the inputs and the outputs are inverted, your AND(/NAND) becomes an OR(/NOR) and vice versa.

We cannot see which connects to what on your tangle of wires on a breadboard. Please post a neat and tidy schematic instead.

The LED connects to the +5V supply so it lights to show a signal that is low and its is not lighted to show a signal that is high. Logic gates talk about signals that are high, not low.

• Wrong. This is more of a complaint than an answer, and should have been posted as a comment to the OP. Also logic signals 'talk' about logic of either polarity, hence the term 'active low' logic. Normally used for chip select (cs), read(rd), and write(wr).
– user105652
Commented Mar 19, 2019 at 0:07