I'm doing a full-adder using logic gates and I want to express the carry bit with a gate.

So I found the minterms of the carry bit

x'yz + xy'z + xyz' + xyz

Is there a 3-input gate that does that expression just like the 3 way XOR?

for example:

x XOR y XOR z = x'y'z + x'yz' + xy'z' + xyz

  • \$\begingroup\$ Its not clear what you mean by this question. For anything other than some simple 2-input gates, there are many possibilities to generate compound gates. In ASIC libraries, these are common. In FPGA, the implementation doesn't target gates, it targets lookup tables. \$\endgroup\$ May 19, 2016 at 11:28

3 Answers 3


You can use a K-map to reduce the number of logic gates needed. It helps to draw out the truth table for the MSB (carry - out) to fill in the K-Map.

The beauty of the K-map is that circling neighboring squares allows you to simplify the Boolean expression. You see there are 3 pairs circled. Then how many gates would you need?

Carry Out K-Map

Another hint to remember is that you can turn sum of products logic to NAND-NAND logic further reducing the types of gates needed.

I have never seen a 3 input Majority Gate. I am answering the question in terms of gates I know exist such as AND, OR, NOT and NAND gates.

I am wondering if you are using 7400 TTL gates. If that is the case, I don't think a 3 Input Majority gate exists.

  • \$\begingroup\$ That's very nice. What's your answer to the question? \$\endgroup\$
    – pipe
    May 19, 2016 at 19:47

Yes, it's called a 3-input "majority" gate, or MAJ3 in some libraries. You won't find one as a discrete device, but many FPGA libraries include such a function.

You do realize that the fourth term in your Boolean expression is redundant, right?


Note that...

x'yz + xy'z + xyz' + xyz

reduces to a simpler form

xy + xz + yz

As can be seen from the truth table.

000 | 0
001 | 0
010 | 0
011 | 1
100 | 0
101 | 1
110 | 1
111 | 1

This is a majority gate.

If you are buying chips to make this then you may use a three input and gate and three or gates.

Dual 3 input AND gate SN74HC11N

DATASHEET: http://www.ti.com/lit/ds/symlink/sn74hc11.pdf (Datasheet)

http://www.digikey.com/product-detail/en/texas-instruments/SN74HC11N/296-8217-5-ND/376871 (Buy it on Digikey for $0.50)

Quad 2-input OR gate SN74HC32N

http://www.ti.com/lit/ds/symlink/sn74hc32.pdf (Datasheet)

http://www.digikey.com/product-detail/en/texas-instruments/SN74HC32N/296-1589-5-ND/277235 (Buy it on Digikey for $0.46)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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