# package tikz error while drawing circuit

I was trying to draw the figure below. Please avoid the coordinates marked in this figure (:D)

My codes are

\documentclass[12pt, a4size]{article}
\begin{document}
\begin{circuitikz}
\draw
(0,0) -- ++ (2,0)
-- ++ (0,1) to [nos,l=$y$] -- ++ (1,0)
-- ++ (0,1) to [nos,l=$z$] -- ++ (2,0)
-- ++ (0,-1) to (1,0) -- ++ (0,-1)
;
\end{circuitikz}
\end{circuitikz}
\end{document}


which is just the above part of the above figure. But error are generating. Package tikz Error: (, +, coordinate, pic, or node expected. -- ++ (0,1) to [nos,l=$y$] - and so many.

What exactly are the mistakes?

• does it look better now -- once you add a component in the circuit you need to finish the syntax line by a coordinate after the component -- -- ++ (0,1) to [nos,l=$y$]++ (1,0) -- after the nos component add the relevant coordinate ++(1,0) without dashes Apr 28, 2021 at 14:42

\documentclass[12pt, a4size]{article}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0,0) -- ++ (2,0)
-- ++ (0,1) to [nos,l=$y$]++ (1,0)
-- ++ (0,1) to [nos,l=$z$]++ (2,0)
-- ++ (0,-1)
-- ++ (1,0)
-- ++ (0,-1)
-- ++ (1,0)
;
\end{circuitikz}
\end{document}


\documentclass[12pt, a4size]{article}
\usepackage[siunitx, RPvoltages]{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0,0)   to [short, o-*]         ++ (2,0)        coordinate(in)
-- ++ (0,1)
to [nos,l=$y$, -*]      ++ (2,0)        coordinate(y)
-- ++ (0,0.5)
to [nos,l=$z$]          ++ (2,0)
to [short,-*]           ++ (0,-0.5)
-| ++ (0.5,-1)                          coordinate(out)
to[short,*-o]           ++(2,0)
(y)     -- ++(0,-0.5)
to [nos,l=$x$]          ++(2,0)
-- ++ (0,0.5)
(in)    --++(0,-1)
to[nos,l=$z$, -*]       ++(2,0)         coordinate(z)
-- ++ (0,0.5)
to [nos,l=$u$]          ++ (2,0)
to [short,-*]           ++ (0,-0.5)
(z)     -- ++(0,-0.5)
to [nos,l=$v$]          ++(2,0)
-- ++ (0,0.5)
-|(out)
;
\end{circuitikz}
\end{document}


• It's very nice. Would you like to tell me what are coordinate(in), coordinate(out)? Also why did you write (y), (z) separately? Apr 28, 2021 at 17:39
• since we use the notation ++ refers to relative positioning the actual coordinates are not known hence a temporary coordinate in stores the actual coordinate in memory and can be later recalled for further usage -- as far as y z are concerned you can combine them if you so feel Apr 29, 2021 at 0:59