答案1
只是一个想法。主要问题是调整主节点内的标签位置。
\documentclass[tikz,border=2mm]{standalone}
\usepackage{amsmath}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[
fulladder/.style={draw, minimum size=3cm,
label={[xshift=8mm]left:$c_\text{out}$},
label={[yshift=5mm]below:$s$},
label={[xshift=-6mm]right:$c_\text{in}$},
label={[yshift=-3mm, anchor=center]65:$b$},
label={[yshift=-3mm, anchor=center]115:$a$},
}]
\node[fulladder] (a) {};
\node[fulladder, right=1cm of a] (b) {};
\draw[<-] (a.115) --++(90:0.5cm) node [above] {$a_1$};
\draw[<-] (a.65) --++(90:0.5cm) node [above] {$b_1$};
\draw[<-] (b.115) --++(90:0.5cm) node [above] {$a_0$};
\draw[<-] (b.65) --++(90:0.5cm) node [above] {$b_0$};
\draw[<-] (b.east) --++(0:0.5cm) node [right] {$0$};
\draw[<-] (a.east) -- (b.west);
\draw[->] (a.west) --++(180:0.5cm) node [left] {$c$};
\draw[->] (a.south) --++(-90:0.5cm) node [below] {$s_1$};
\draw[->] (b.south) --++(-90:0.5cm) node [below] {$s_0$};
\end{tikzpicture}
\end{document}
更新:轻松调整标签
我已经学会了如何更好地调整节点内的标签托比昂的回答 如何用 tikz 绘制建筑。
先前带有新标签声明的代码可能是:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{amsmath}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[
fulladder/.style={draw, minimum size=3cm,
label={[anchor=west]left:$c_\text{out}$},
label={[anchor=south]below:$s$},
label={[anchor=east]right:$c_\text{in}$},
label={[anchor=north]65:$b$},
label={[anchor=north]115:$a\vphantom{b}$},
}]
\node[fulladder] (a) {};
\node[fulladder, right=1cm of a] (b) {};
\draw[<-] (a.115) --++(90:0.5cm) node [above] {$a_1$};
\draw[<-] (a.65) --++(90:0.5cm) node [above] {$b_1$};
\draw[<-] (b.115) --++(90:0.5cm) node [above] {$a_0$};
\draw[<-] (b.65) --++(90:0.5cm) node [above] {$b_0$};
\draw[<-] (b.east) --++(0:0.5cm) node [right] {$0$};
\draw[<-] (a.east) -- (b.west);
\draw[->] (a.west) --++(180:0.5cm) node [left] {$c$};
\draw[->] (a.south) --++(-90:0.5cm) node [below] {$s_1$};
\draw[->] (b.south) --++(-90:0.5cm) node [below] {$s_0$};
\end{tikzpicture}
\end{document}