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?).
Best Answer
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.