# How can I create a three variable port AND (logic circuit)

experts of TikZ. I'm trying to do a simple thing: create the logic circuit S=A.B.C with three lines entering the AND port (not two!).

I thank you in advance, legendary heroes!

Edit.: All I can do is this:

    \documentclass{article}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz} \draw
(0, 2) node[and port](myand){}
(myand.in 1) node[anchor=east]{A}
(myand.in 2) node[anchor=east]{B}
(myand.in 3) node[anchor=east]{C}
(myand.out 4) node[anchor=west]{S};
\end{circuitikz}

\end{document}


    \documentclass{article}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz} \draw
(0, 2) node[and port, number inputs=3](myand){}
(myand.in 1) node[anchor=east]{A}
(myand.in 2) node[anchor=east]{B}
(myand.in 3) node[anchor=east]{C}
;
\end{circuitikz}

\end{document}


for the out side

\documentclass{article}
\usepackage{circuitikz}
\begin{document}

\begin{circuitikz} \draw
(0, 2) node[and port, number inputs=3](myand){}
(myand.in 1) node[anchor=east]{A}
(myand.in 2) node[anchor=east]{B}
(myand.in 3) node[anchor=east]{C}
(myand.out) node[anchor=west]{S}
;
\end{circuitikz}

\end{document}


• Yes, +1. To have the shape the OP posted, use \ctikzset{logic ports=ieee}. Commented Mar 15, 2022 at 8:38