\begin{tikzpicture}[scale=1,transform shape]
\ctikzset{
    logic ports=ieee,
    logic ports/scale=1,
 }

\node[nand port] at (1.75,0.56)(nota){};
\node[nand port] at (1.75,4*0.56)(notb){};
\node[nand port] at (4.,2.5*0.56)(n2){};


\draw (nota.out) |- (n2.in 2);
\draw (notb.out) |- (n2.in 1);

\node (a) at (0,0.56) {$a$};
\node (b) at (0,2.2384) {$b$};
\node (y) at (5.5,2.5*0.56) {$out$};

\coordinate (A) at (0.45,0.841-0.2814);
\fill (A) circle (1.5pt);

\draw[name path = a1] (A) |- (nota.in 1); 
\draw[name path = a2] (A) |- (nota.in 2);
\draw (A) --++ (-.25,0);


\coordinate (B) at (0.45,2.2384);
\fill (B) circle (1.5pt);

\draw (B) |- (notb.in 1);
\draw (B) |- (notb.in 2);
\draw (B) --++ (-.25,0);


\draw (nota.out) |- node[below, yshift=-15pt, xshift=5pt]{\small$nota$}(n2.in 2);
\draw (notb.out) |- node[above, yshift=15pt, xshift=5pt]{\small$notb$}(n2.in 1);

\end{tikzpicture}