48 lines
1.0 KiB
TeX
48 lines
1.0 KiB
TeX
%!tikz editor 1.0
|
|
\documentclass{article}
|
|
\usepackage{tikz}
|
|
\usepackage[graphics, active, tightpage]{preview}
|
|
\usepackage{circuitikz}
|
|
\PreviewEnvironment{tikzpicture}
|
|
|
|
%!tikz preamble begin
|
|
%\usetikzlibrary{circuits.logic.US, positioning}
|
|
\usepackage{circuitikz}
|
|
\usepackage[utf8]{inputenc}
|
|
%!tikz preamble end
|
|
|
|
|
|
\begin{document}
|
|
%!tikz source begin
|
|
\begin{tikzpicture}[scale=6,transform shape]
|
|
\ctikzset{
|
|
logic ports=ieee,
|
|
logic ports/scale=1,
|
|
% logic ports/fill=lightgray
|
|
% Koordinaten für Kreuzpunkte
|
|
}
|
|
\coordinate (A) at (2.75,0.5);
|
|
\fill (A) circle (1.5pt);
|
|
|
|
% Eingangsvariablen
|
|
\node (x2) at (0.15,0.225) {b};
|
|
\node (x1) at (0.15,0.775) {a};
|
|
|
|
% Ausgangsvariable
|
|
\node (y) at (6,0.5) {out};
|
|
|
|
% Gatter
|
|
\node[nand port] at (1.5,0.5) (n1) {};
|
|
\node[nand port] at (4,0.5) (n2) {};
|
|
|
|
\draw(x1) -- (n1.in 1);
|
|
\draw(x2) -- (n1.in 2);
|
|
\draw(n1.out) -- (A);
|
|
\draw(A) |- (n2.in 2);
|
|
\draw(A) |- (n2.in 1);
|
|
\draw(n2.out) -- (y);
|
|
|
|
\end{tikzpicture}
|
|
%!tikz source end
|
|
|
|
\end{document} |