\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.gates.logic.US}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
\begin{tikzpicture}[ circuit symbol wires]
\node (x) at (0,1) {$x$};
\node (y) at (0,0) {$y$};
\node[and gate US, minimum size=32pt, draw] at (1.5,0.5) (And) {};
\draw (x.east) -- ++(right:3mm) |- (And.input 1);
\draw (y.east) -- ++(right:3mm) |- (And.input 2);
\draw (And.output) -- ($(And) + (1.5,0)$);
\node (z) at ($(And) + (1.9,0)$) {$x\& y$};
\end{tikzpicture}
\end{document}
答案1
也许是这样的:
\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.gates.logic.US}
\usetikzlibrary{circuits.ee.IEC}
\begin{document}
\begin{tikzpicture}[ circuit symbol wires]
\node (x) at (0,1) {$x$};
\node (y) at (0,0) {$y$};
\node[and gate US, minimum size=32pt, draw, fill =red] at (1.5,0.5) (And) {};
\draw (x.east) -- ++(right:3mm) |- (And.input 1);
\draw (y.east) -- ++(right:3mm) |- (And.input 2);
\draw (And.output) -- ($(And) + (1.5,0)$);
\node (z) at ($(And) + (1.9,0)$) {$x\& y$};
\end{tikzpicture}
\end{document}
这将给你: