5

Is it possible to add two ports to the gates (nand, and, or, not) in circuitikz on the top and bottom for reference voltages in a similar fashion to how they exist for the op amp?

5

You can use the same mechanism given for op-amps in the manual by defining your own ports

\documentclass{article}
\usepackage{circuitikz,siunitx}
\begin{document}
\begin{circuitikz} 
\draw (0,0) node[op amp] (opamp) {}
 (opamp.+) node[ left ] {$v_+$}
 (opamp.-) node[left] {$v_-$}
 (opamp.out) node[right] {$v_o$}
 (opamp.down) node[ground] {}
 (opamp.up) ++ (0,.5) node[above] {\SI{12}{\volt}}
 -- (opamp.up)
;
\draw (4,0) node[european and port] (euand) {} 
(euand.south) node[ground] {}
(euand.north) ++(0,0.5) node[above] {\SI{12}{\volt}}
-- (euand.north);
\end{circuitikz}
\end{document} 

enter image description here

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.