diff --git a/TeX/And.tex b/TeX/And.tex index ace59ab..7d7d710 100644 --- a/TeX/And.tex +++ b/TeX/And.tex @@ -64,10 +64,10 @@ \tikzstyle{branch}=[fill,shape=circle,minimum size=3pt,inner sep=0pt] - \draw (-1,-1) to[grid with coordinates] (10,10); + %\draw (-1,-1) to[grid with coordinates] (10,10); % Koordinaten für Kreuzpunkte - \coordinate (A) at (2.15,0.5); + \coordinate (A) at (3.15,0.5); \fill (A) circle (1pt); % Eingangsvariablen @@ -75,11 +75,11 @@ \node (x1) at (0,0.67) {a}; % Ausgangsvariable - \node (y) at (4,0.5) {out}; + \node (y) at (5,0.5) {out}; % Gatter \node[nand gate] at (1.3,0.5) (n1) {}; - \node[nand gate] at (2.75,0.5) (n2) {}; + \node[nand gate] at (3.75,0.5) (n2) {}; % Verbindungen @@ -90,7 +90,8 @@ \draw(A) |- (n2.input 2); \draw(A) |- (n2.input 1); \draw(n2.output) -- (y); - + \draw(n1.output) to [short,l=\footnotesize{nandout}, -] (A); + \end{tikzpicture} %!tikz source end diff --git a/TeX/Or.tex b/TeX/Or.tex new file mode 100644 index 0000000..5a96fec --- /dev/null +++ b/TeX/Or.tex @@ -0,0 +1,116 @@ +%!tikz editor 1.0 +\documentclass{article} +\usepackage{tikz} +\usepackage[graphics, active, tightpage]{preview} +\usepackage{circuitikz} +\PreviewEnvironment{tikzpicture} + +%!tikz preamble begin +\usetikzlibrary{circuits.logic.IEC, positioning} +\usepackage[utf8]{inputenc} + + +\makeatletter +\def\grd@save@target#1{% + \def\grd@target{#1}} +\def\grd@save@start#1{% + \def\grd@start{#1}} +\tikzset{ + grid with coordinates/.style={ + to path={% + \pgfextra{% + \edef\grd@@target{(\tikztotarget)}% + \tikz@scan@one@point\grd@save@target\grd@@target\relax + \edef\grd@@start{(\tikztostart)}% + \tikz@scan@one@point\grd@save@start\grd@@start\relax + \draw[minor help lines] (\tikztostart) grid (\tikztotarget); + \draw[major help lines] (\tikztostart) grid (\tikztotarget); + \grd@start + \pgfmathsetmacro{\grd@xa}{\the\pgf@x/1cm} + \pgfmathsetmacro{\grd@ya}{\the\pgf@y/1cm} + \grd@target + \pgfmathsetmacro{\grd@xb}{\the\pgf@x/1cm} + \pgfmathsetmacro{\grd@yb}{\the\pgf@y/1cm} + \pgfmathsetmacro{\grd@xc}{\grd@xa + \pgfkeysvalueof{/tikz/grid with coordinates/major step}} + \pgfmathsetmacro{\grd@yc}{\grd@ya + \pgfkeysvalueof{/tikz/grid with coordinates/major step}} + \foreach \x in {\grd@xa,\grd@xc,...,\grd@xb} + \node[anchor=north] at (\x,\grd@ya) {\pgfmathprintnumber{\x}}; + \foreach \y in {\grd@ya,\grd@yc,...,\grd@yb} + \node[anchor=east] at (\grd@xa,\y) {\pgfmathprintnumber{\y}}; + } + } + }, + minor help lines/.style={ + help lines, + step=\pgfkeysvalueof{/tikz/grid with coordinates/minor step} + }, + major help lines/.style={ + help lines, + line width=\pgfkeysvalueof{/tikz/grid with coordinates/major line width}, + step=\pgfkeysvalueof{/tikz/grid with coordinates/major step} + }, + grid with coordinates/.cd, + minor step/.initial=.2, + major step/.initial=1, + major line width/.initial=1pt, +} +\makeatother +%!tikz preamble end + + +\begin{document} +%!tikz source begin +\begin{tikzpicture}[scale=1.3, transform shape,circuit logic IEC] + +\tikzstyle{branch}=[fill,shape=circle,minimum size=3pt,inner sep=0pt] + +% \draw (-1,-1) to[grid with coordinates] (10,10); + + % Koordinaten für Kreuzpunkte + + \coordinate (A) at (0.75,0.5); + \fill (A) circle (1pt); + + \coordinate (B) at (0.75,2.); + \fill (B) circle (1pt); + + % Eingangsvariablen + \node (x2) at (0,0.5) {b}; + \node (x1) at (0,2) {a}; + + % Ausgangsvariable + \node (y) at (4.5,1.25) {out}; + + % Gatter + \node[nand gate] at (1.3,0.5) (n1) {}; + + \node[nand gate] at (1.3,2) (n2) {}; + + \node[nand gate] at (3.25,1.25) (n3) {}; + + + % Verbindungen + \draw(x2) -- (A); + \draw(x1) -- (B); + \draw(A) |- (n1.input 1); + \draw(A) |- (n1.input 2); + + \draw(B) |- (n2.input 1); + \draw(B) |- (n2.input 2); + +% \draw(n2.output) |- (n3.input 1); + + \draw(n2.output) -- +(0.75,0) |- (n3.input 1); + \draw(n1.output) -- +(0.75,0) |- (n3.input 2); + + + \draw(n3.output) -- (y); + %\draw(A) |- (n2.input 2); + %\draw(A) |- (n2.input 1); +% \draw(n2.output) -- (y); + %\draw(n1.output) to [short,l=\footnotesize{nandout}, -] (A); + +\end{tikzpicture} +%!tikz source end + +\end{document} \ No newline at end of file diff --git a/projects/01/Locad/Nand.icc b/projects/01/Locad/Nand.icc deleted file mode 100644 index 2870367..0000000 Binary files a/projects/01/Locad/Nand.icc and /dev/null differ