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.

47 lines
2.1 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.5) {$c$};
  8. \node (d) at (0,-3.5) {$d$};
  9. \node (z) at (13.5,-1.5) {$z$};
  10. \node (am) at (2,0) {};
  11. \node (not1m) at (3,-1) {};
  12. \node (not2m) at (3,-2.5) {};
  13. \node (dm) at (2,-3.5) {};
  14. \node (bm) at (1,-1) {};
  15. \node (bm2) at (7,-1.875) {};
  16. \node (not3m) at (7,-2.5) {};
  17. \node (or1m) at (9,-.5) {};
  18. \node (and1m) at (9,-2) {};
  19. \node[not gate US, draw, logic gate inputs=n] at ($(2,-1)$) (not1) {\tiny NOT};
  20. \node[not gate US, draw, logic gate inputs=n] at ($(2,-2.5)$) (not2) {\tiny NOT};
  21. \node[or gate US, draw, logic gate inputs=nn] at ($(4,-.5)$) (or1) {\tiny OR};
  22. \node[xor gate US, draw, logic gate inputs=nn] at ($(4,-3)$) (xor1) {\tiny XOR};
  23. \node[not gate US, draw, logic gate inputs=n] at ($(6,-3)$) (not3) {\tiny NOT};
  24. \node[and gate US, draw, logic gate inputs=nn] at ($(8,-2)$) (and1) {\tiny AND};
  25. \node[or gate US, draw, logic gate inputs=nn] at ($(10,-1.5)$) (or2) {\tiny OR};
  26. \node[not gate US, draw, logic gate inputs=n] at ($(12,-1.5)$) (not4) {\tiny NOT};
  27. \draw (a.east) -| (am.center) |- (or1.input 1);
  28. \draw (b.east) -- (not1.input);
  29. \draw (not1.output) -| (not1m.center) node[below] {$r$} |- (or1.input 2);
  30. \draw (c.east) -- (not2.input);
  31. \draw (not2.output) -| (not2m.center) node[above] {$s$} |- (xor1.input 1);
  32. \draw (d.east) -| (dm.center) |- (xor1.input 2);
  33. \draw (b.east) -| (bm.center) node[circle, fill,inner sep=2pt] {} |- (bm2.center) node[above] {$u$} |- (and1.input 1);
  34. \draw (xor1.output) -- node[below] {$t$} (not3.input);
  35. \draw (not3.output) -| node[below] {$v$} (not3m.center) |- (and1.input 2);
  36. \draw (or1.output) -| (or1m.center) node[above] {$w$} |- (or2.input 1);
  37. \draw (and1.output) -| (and1m.center) node[below] {$x$} |- (or2.input 2);
  38. \draw (or2.output) -- node[below] {$y$} (not4.input);
  39. \draw (not4.output) -- (z);
  40. \end{tikzpicture}