\documentclass[10pt,a4paper]{article}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz}
\draw
(0,0) to[short, -*] (1,0) -- (2,0) node[and port, anchor=in 1] (myand1) {}
(1,-1) node[american not port,rotate=-90] (prvone) {}
(myand1.in 2) -| (2,-4)
(1,0) -| (prvone.in)
(myand1.south) node[and port, below=\baselineskip] (myand2) {}
(myand2.in 1) node[circ]{}
(prvone.out) |- (myand2.in 2)
;
\node[
dipchip,
num pins=6,
hide numbers,
no topmark,
external pins width=0](ff1) at (3.5,0) {};
\node [right,font=\tiny] at (ff1.bpin 1) {\textsl{S}};
\node [right,font=\tiny] at (ff1.bpin 2) {\textsl{CP}};
\node [right,font=\tiny] at (ff1.bpin 3) {\textsl{R}};
\node [left,font=\tiny] at (ff1.bpin 6) {\textsl{Q}};
\node [left,font=\tiny] at (ff1.bpin 4) {\textsl{\ctikztextnot{Q}}};
\end{circuitikz}
\end{document}
I am beginner in LaTex. Any help, books or manuals how to use circuitikz to get schemas like this one.I've read manual on CTAN but it wasn't very helpful.Not sure how to connect the custom elements. Thank you in advance.

