You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.7 KiB

  1. \item
  2. \CNFfromCircuit
  3. \tikzstyle{branch}=[fill,shape=circle,minimum size=3pt,inner sep=0pt]
  4. \begin{tikzpicture}[label distance=2mm]
  5. \node (a) at (0,0) {$a$};
  6. \node (b) at (0,-1) {$b$};
  7. \node (c) at (0,-2) {$c$};
  8. \node (z) at (10,-1) {$z$};
  9. \node (am) at (1,0) {};
  10. \node (cm) at (1,-2) {};
  11. \node (bm) at (3,-1) {};
  12. \node (not1m) at (3,-2) {};
  13. \node (not2m) at (5,-.5) {};
  14. \node (or1m) at (5,-1.5) {};
  15. \node (bc_c1) at (1,-1.1) {};
  16. \node (bc_c2) at (1.1,-1) {};
  17. \node (bc_c3) at (1,-.9) {};
  18. \node[and gate US, draw, logic gate inputs=nn] at ($(2,-.5)$) (and1) {\tiny AND};
  19. \node[not gate US, draw, logic gate inputs=n] at ($(2,-2)$) (not1) {\tiny NOT};
  20. \node[not gate US, draw, logic gate inputs=n] at ($(4,-.5)$) (not2) {\tiny NOT};
  21. \node[or gate US, draw, logic gate inputs=nn] at ($(4,-1.5)$) (or1) {\tiny OR};
  22. \node[and gate US, draw, logic gate inputs=nn] at ($(6,-1)$) (and2) {\tiny AND};
  23. \node[not gate US, draw, logic gate inputs=n] at ($(8,-1)$) (not3) {\tiny NOT};
  24. \draw (a.east) -| (am.center) |- (and1.input 1);
  25. \draw (c.east) -| (cm.center) node[circle, fill,inner sep=2pt] {} -- (bc_c1.center) -- (bc_c2.center) -- (bc_c3.center) |- (and1.input 2);
  26. \draw (b.east) -| (bm.center)|- (or1.input 1);
  27. \draw (c.east) -- (not1.input);
  28. \draw (and1.output) -- node[above] {$u$} (not2.input);
  29. \draw (not1.output) -| (not1m.center) node[below] {$v$} |- (or1.input 2);
  30. \draw (not2.output) -| (not2m.center) node[above] {$w$} |- (and2.input 1);
  31. \draw (or1.output) -| (or1m.center) node[below] {$x$} |- (and2.input 2);
  32. \draw (and2.output) -- node[below] {$y$} (not3.input);
  33. \draw (not3.output) -- (z.west);
  34. \end{tikzpicture}