1
\$\begingroup\$

I'm currently designing a logic circuit to compare two 4-bit numbers using an XOR gate IC (TI CD4070B).

I'll then need to combine the output of these four XOR gates to into a single line using OR gates. If this combined feed returns a 1, then I'll know the numbers aren't equal.

My question is: do I need to use a dedicated OR gate IC, or can I simply wire together the outputs of the four XOR gates? My main concern is if one of the XOR gates returns a 1, then voltage will be back-fed into the outputs of the other three XOR gates (potentially damaging the chip or spreading back to the inputs of the XOR gate?).

\$\endgroup\$
  • \$\begingroup\$ Your logic is correct. You could use a single 4 input or gate. \$\endgroup\$ – Sparky256 Sep 7 at 4:02
3
\$\begingroup\$

You should not wire outputs together, ever (excepting open drain types or special types designed for such use). Push-pull outputs will "fight" if any one is at a different output voltage to the others, draw excessive current, and will not necessarily provide valid or correct logic levels at the output.

In order to combine the 4 XOR gates you could use a 4-input OR gate (eg. CD4072) or a 4-input NOR gate eg. CD4002 (which would have an inverted output compared to the OR gate).

As implied by the lower number, NOR is a more common function in 4000-series CMOS than OR, but both are still easily available.

\$\endgroup\$
1
\$\begingroup\$

You could form a simple diode resistor 4 input or gate like this.

schematic

simulate this circuit – Schematic created using CircuitLab

Note that there will be a 0.7V drop across the diodes when an input is in the high state. For a smaller 0.3V drop across the diodes use BAT85 diodes. Saves using another I.C.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.