I am trying to get my labels positioned correctly and perhaps extending the lines coming out of NAND2.in 1 and NAND2.in 2 nodes, such that my first circuit looks similar to the second circuit in terms of label arrangement. I looked through the CircuitTikz manual and was not able to solve my problem.
\documentclass[12pt]{article}
\import{circuitikz}
\begin{document}
\subsection*{(b) }
\begin{center}
\begin{tikzpicture}
\node[nand port] (NAND1) {};
\node[nand port] at ($(NAND1) + (2,0)$) (NAND2) {};
\draw (NAND1.in 1) -- ++(-0.5,0) node[left ] {$p$};
\draw (NAND1.in 2) -- ++(-0.5,0) node[left ] {$q$};
\draw (NAND2.in 1) node[above] {$\overline{p \land q}$};
\draw (NAND2.in 2) node[below] {$\overline{p \land q}$};
\draw (NAND1.out) -| (NAND2.in 1) -| (NAND2.in 2);
\draw[->] (NAND2.out) -- ++( 0.5,0) node[right] {$\overline{\overline{p \land q} \land \overline{p \land q}} \equiv \overline{\overline{p \land q}} \equiv p \land q$};
\end{tikzpicture}
\end{center}
\subsection*{(c) }
\begin{center}
\begin{tikzpicture}
\node[nand port] (NAND1) {};
\node[nand port] at ($(NAND1) + (0,-1.5)$) (NAND2) {};
\node[nand port] at ($(NAND1) + (2,-0.75)$) (NAND3) {};
\draw (NAND1.in 1) -- ++(-0.5,0) node[left ] {$p$};
\draw (NAND1.in 2) -- ++(-0.5,0) node[left ] {$p$};
\draw (NAND2.in 1) -- ++(-0.5,0) node[left ] {$q$};
\draw (NAND2.in 2) -- ++(-0.5,0) node[left ] {$q$};
\draw (NAND1.out) node[above] {$\overline{p}$};
\draw (NAND2.out) node[below] {$\overline{q}$};
\draw (NAND1.out) -| (NAND3.in 1);
\draw (NAND2.out) -| (NAND3.in 2);
\draw[->] (NAND3.out) -- ++( 0.5,0) node[right] {$\overline{\overline{p} \land \overline{q}} \equiv \overline{\overline{p}} \lor \overline{\overline{q}} \equiv p \lor q$};
\end{tikzpicture}
\end{center}
\end{document}