1
\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}

Register

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.

How to connect the parts

muzimuzhi Z
  • 26,474
  • https://tex.stackexchange.com/questions/543404/weird-behavior-of-flipflop-in/543456#543456 – js bibra May 14 '20 at 14:31
  • https://tex.stackexchange.com/questions/529674/circuitikz-logic-gates – js bibra May 14 '20 at 14:31
  • I added the code.It's required in assignment to include logic US circuit but it doesn't work when I do that. –  May 14 '20 at 15:19
  • @Nina77 IEEE standard ports are very recent, look at https://tex.stackexchange.com/questions/524328/i-need-to-use-a-different-version-of-circuitikz-how-can-i-do-that – Rmano May 14 '20 at 17:00

1 Answers1

0

The basic principle is the same as myand1. You use the anchor keyword to locate what part of the component you wish to align. In this case, I located (ff1.pin 1) to the right of (myand1.out), then located (myand2.out) to the left of (ff1.pin 3).

\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)
    ;
    \ctikzset{multipoles/dipchip/pin spacing=0.5}% increasee size of dipchip
    \draw (myand1.out) -- ++(1,0) node[anchor=pin 1,
        dipchip,
        num pins=6,
        hide numbers,
        no topmark,
        external pins width=0](ff1) {}
    (ff1.pin 3) -- ++(-1,0) node[and port, anchor=out] (myand2) {}
    (myand2.in 1) node[circ]{}
    (prvone.out) |- (myand2.in 2);

    \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}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120