答案1
下面绘制了您的逻辑电路。所有内容都相对于 A 放置,如果您在 A 路径中更改某些内容,B 路径应该会相应地拉伸/收缩。
\documentclass[border=3.14,tikz]{standalone}
\usepackage{circuitikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw (0,0) coordinate[label={[left]$A$}](A)
to[short,-*] ++(.35,0) coordinate(jA)
-- ++(.25,0) node[american not port, anchor=west](notA){} (notA.east)
node[american and port, anchor=in 1](andA){}
(A) ++(0, -2) coordinate[label={[left]$B$}](B)
to[short,-*] ($(B-|jA)+(0.1,0)$) coordinate(jB)
-- (B-|notA.west) node[american not port, anchor=west](notB){} (notB.east)
node[american and port, anchor=in 2](andB){}
(jA) -- ($(jA)!.8!(jA|-andB.in 1)$) -| (andB.in 1) -- +(.01,0)
(jB) -- ($(jB)!.8!(jB|-andA.in 2)$) -| (andA.in 2) -- +(.01,0)
($(A)!.5!(B)$) coordinate(vc)
(vc-|andB.out) node[american or port, anchor=west](or){}
(andA.out) ++(-.01,0) -| (or.in 1) -- +(0.01,0)
(andB.out) ++(-.01,0) -| (or.in 2) -- +(0.01,0)
(or.out) node[right]{$(\bar{A}\cdot B)+(A\cdot\bar{B})=A\oplus B$}
;
\end{tikzpicture}
\end{document}