simple-example-tikz-circuit-library.tex 703 B

12345678910111213141516171819202122
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{0mm}
  4. \usepackage{tikz}
  5. \usetikzlibrary{circuits.logic.IEC}
  6. \begin{document}
  7. \begin{preview}
  8. \begin{tikzpicture}[circuit logic IEC]
  9. \node[and gate, inputs={normal,normal}] (myand) {};
  10. \draw (1,0) node[not gate, inputs={normal,normal}] (mynot) {};
  11. \draw (myand.input 1 -| -0.8,0) node[anchor=east]{P} -- (myand.input 1);
  12. \draw (myand.input 2 -| -0.8,0) node[anchor=east]{Q} -- (myand.input 2);
  13. \draw (myand.output) -- (mynot.input);
  14. \draw (mynot.output -| 1.8,0) node[anchor=west]{S} -- (mynot.output);
  15. \end{tikzpicture}
  16. \end{preview}
  17. \end{document}