显示图纸

显示图纸
\draw
(0,0) nodedipchip, num pins=6, hide numbers, external pins width=0{DFF}
(DFF.pin 1) node[left] {CLK} -- (DFF.bpin 1)
(DFF.pin 2) node[left] {D} -- (DFF.bpin 2)
(DFF.pin 6) node[right] {Q} -- (DFF.bpin 6)
(DFF.pin 4) node[ground] {} -- (DFF.bpin 4)
(DFF.bpin 2) -- ++(-0.5,0) node[circ] {} |- ++(0,1) node[and port, anchor=out] (AND1) {}
(DFF.bpin 6) -- ++(0.5,0) node[circ] {} |- ++(0,1) node[not port, anchor=in] (NOT1) {}
(DFF.bpin 6) -- ++(0.5,0) |- ++(0,-1) node[not port, anchor=in] (NOT2) {}
(DFF.bpin 6) -- ++(0.5,0) |- ++(0,-2) node[and port, anchor=out] (AND2) {}
(AND1.in 1) -- ++(-0.5,0) node[left] {A}
(AND1.in 2) -- ++(-0.5,0) node[left] {B}
(NOT1.out) -- ++(0.5,0) |- (AND2.in 1)
(NOT2.out) -- ++(0.5,0) |- (AND2.in 2)
(AND1.out) -- ++(0.5,0) node[circ] {} |- ++(0,-1) node[or port, anchor=in 1] (OR1) {}
(AND2.out) -- ++(0.5,0) |- (OR1.in 2)
(OR1.out) -- ++(0.5,0) |- (DFF.bpin 2)
;

答案1

首先要猜测一下

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}

\begin{document}
    
    \ctikzset{
        logic ports=ieee,
        logic ports origin=center, % not needed for IEEE
        chips/thickness=4,
    }
    \begin{tikzpicture}
        \node[dipchip, num pins=6, hide numbers, external pins width=0](DFF){}; 
        \draw (DFF.pin 1) node[font=\tiny, above left] {CLK} -- (DFF.bpin 1);
        \draw (DFF.pin 2) node[font=\tiny, above left] {D} -- (DFF.bpin 2);
        \draw (DFF.pin 6) node[font=\tiny, above right] {Q} -- (DFF.bpin 6);
        \draw (DFF.pin 4) node[ground] {} -- (DFF.bpin 4);
        \draw (DFF.bpin 2) -- ++(-1,0) node[circ] {} |- ++(0,1) node[and port, anchor=out] (AND1) {};
        \draw (DFF.bpin 6) -- ++(1,0) node[circ] {} |- ++(0,1) node[not port, anchor=in] (NOT1) {};
        \draw (DFF.bpin 6) -- ++(1,0) |- ++(0,-1) node[not port, anchor=in] (NOT2) {};
        \draw (DFF.bpin 6) -- ++(1,0) |- ++(0,-3) node[and port, anchor=out] (AND2) {};
        
        
    
        
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容