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.

45 lines
2.0 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 (d) at (0,-3) {$d$};
  9. \node (z) at (12,-1.5) {$z$};
  10. \node (am1) at (5,0) {};
  11. \node (am2) at (3,0) {};
  12. \node (ab_c1) at (3,-.9) {};
  13. \node (ab_c2) at (3.1,-1) {};
  14. \node (ab_c3) at (3,-1.1) {};
  15. \node (not1m) at (5,-1) {};
  16. \node (not2m) at (2,-2) {};
  17. \node (or2m) at (5,-2) {};
  18. \node (dm) at (5,-3) {};
  19. \node (or1m) at (7,-.5) {};
  20. \node (or3m) at (7,-2.5) {};
  21. \node[not gate US, draw, logic gate inputs=n] at ($(1,-1)$) (not1) {\tiny NOT};
  22. \node[not gate US, draw, logic gate inputs=n] at ($(1,-2)$) (not2) {\tiny NOT};
  23. \node[or gate US, draw, logic gate inputs=nn] at ($(6,-.5)$) (or1) {\tiny OR};
  24. \node[or gate US, draw, logic gate inputs=nn] at ($(4,-2)$) (or2) {\tiny OR};
  25. \node[or gate US, draw, logic gate inputs=nn] at ($(6,-2.5)$) (or3) {\tiny OR};
  26. \node[and gate US, draw, logic gate inputs=nn] at ($(8,-1.5)$) (and1) {\tiny AND};
  27. \node[not gate US, draw, logic gate inputs=n] at ($(10,-1.5)$) (not3) {\tiny NOT};
  28. \draw (b.east) -- (not1.input);
  29. \draw (c.east) -- (not2.input);
  30. \draw (a.east) |- (am1.center) |- (or1.input 1);
  31. \draw (not1.output) |- (not1m.center) node[below] {$u$} |- (or1.input 2);
  32. \draw (a.east) |- (am2.center) node[circle, fill,inner sep=2pt] {} -- (ab_c1.center) -- (ab_c2.center) -- (ab_c3.center) |- (or2.input 1);
  33. \draw (not2.output) |- (not2m.center) node[below] {$t$} |- (or2.input 2);
  34. \draw (or2.output) |- (or2m.center) node[above] {$v$} |- (or3.input 1);
  35. \draw (d.east) |- (dm.center) |- (or3.input 2);
  36. \draw (or1.output) |- (or1m.center) node[above] {$w$} |- (and1.input 1);
  37. \draw (or3.output) |- (or3m.center) node[below] {$x$} |- (and1.input 2);
  38. \draw (and1.output) -- node[below] {$y$} (not3.input);
  39. \draw (not3.output) -- (z.west);
  40. \end{tikzpicture}