weiter PROG 2

This commit is contained in:
henrydatei 2018-09-07 16:49:30 +02:00
parent f6ab960d07
commit 58eb28e611
11 changed files with 1406 additions and 6 deletions

View file

@ -0,0 +1,55 @@
\begin{*anmerkung}
Der Inhalt dieses ganzen Kapitels ist eigentlich nicht prüfungsrelevant.
\end{*anmerkung}
\section{Addition $n$-stelliger ganzer Zahlen}
Wir werden im Folgenden folgende Notationen verwenden:
\begin{itemize}
\item OR: $x+y$
\item AND: $x\cdot y$
\item NOT: $\overline{x}$
\item XOR: $x\oplus y$
\end{itemize}
Beim \begriff{Halbaddierer} ist die Summe $s=a\oplus b$ und der Übertrag (carry) $c=a\cdot b$.
\begin{figure}[ht]
\centering
\includegraphics{images/Halbaddierer.png}
\caption{Halbaddierer}
\end{figure}
Der \begriff{Volladdierer} besteht aus 2 Halbaddierern. Die Summe $s$ ist hier: $s=a\overline{b}\overline{c_{in}}+\overline{a}b\overline{c_{in}}+\overline{a}\overline{b}c_{in}abc_{in}+a\oplus b\oplus c_{in}$. Der Übertrag ist $c_{out}=ab+ac_{in}+bc_{in}$.
\begin{figure}[ht]
\centering
\includegraphics{images/Volladdierer.png}
\caption{Volladdierer}
\end{figure}
Mit dem \begriff{Carry-Ripple-Adder} kann man dann endlich zwei $n$-stellige Zahlen addieren:
\begin{itemize}
\item $a=[a_{n-1}a_{n-2}...a_1a_0]_2$
\item $b=[b_{n-1}b_{n-2}...b_1b_0]_2$
\end{itemize}
\begin{figure}[ht]
\centering
\includegraphics{images/Carry-Ripple-Adder.png}
\caption{Carry-Ripple-Adder}
\end{figure}
$\Rightarrow T(n)=\mathcal{O}(n\cdot T_{FA})$
Machen wir zum Schluss noch eine Übertragsanalyse: Eine Bitposition $i\in\{0,1,...,n-1\}$ kann 3 verschiedene Übertragsfälle annehmen:
\begin{enumerate}
\item kein Übertrag möglich, wenn $a_i=b_i=0$
\item Übertrag wird weitergeleitet (\begriff{carry propergate}) $p=a_i\oplus b_i$
\item Übertrag wird auf jeden Fall generiert (\begriff{generate bit}) $g=a_i\cdot b_i$
\end{enumerate}
Rekursionsbeziehung:
\begin{align}
c_{i+1} &= g_i+p_i\cdot c_i=a_ib_i+(a_i\oplus b_i)c_i=a_ib_i+(a_i+b_i)c_i \notag \\
c_{i+1} &= \underbrace{g_i+p_ig_{i-1}+p_ip_{i-1}g_{i-2}+...+p_ip_{i-1}...p_1g_0}_{G_{0,i}} + \underbrace{p_ip_{i-1}...p_1p_0}_{P_{0,i}}\cdot c_0\notag
\end{align}

View file

@ -1,9 +1,9 @@
\section{Rechenaufwand für Grundoperationen}
\begin{tabularx}{\textwidth}{p{0.17\textwidth}|p{0.16\textwidth}p{0.16\textwidth}|p{0.17\textwidth}p{0.2\textwidth}}
& einfach verkettet & & doppelt verkettet & \\
\begin{longtable}{p{0.17\textwidth}|p{0.16\textwidth}p{0.16\textwidth}|p{0.17\textwidth}p{0.2\textwidth}}
\rowcolor{lightgray}& einfach verkettet & & doppelt verkettet & \\
\hline
Grundoperationen & linear & zyklisch & linear & zyklisch \\
\rowcolor{lightgray}Grundoperationen & linear & zyklisch & linear & zyklisch \\
\hline\hline
\texttt{access\_head} & konstant & konstant & konstant & konstant \\
\hline
@ -28,4 +28,4 @@
\texttt{trav\_forward} & konstant (pro Element) & konstant (pro Element) & konstant (pro Element) & konstant (pro Element) \\
\hline
\texttt{trav\_backward} & $\mathcal{O}(n)$ (pro Element) & $\mathcal{O}(n)$ (pro Element) & $\mathcal{O}(n)$ (pro Element) & $\mathcal{O}(n)$ (pro Element) \\
\end{tabularx}
\end{longtable}

View file

@ -216,4 +216,175 @@ Bei einer iterativen Multiplikation, so wie man sie schriftlich gelernt hat, bet
Falls man bis jetzt die Vermutung hatte, dass rekursive Algorithmen immer schlechter als iterative Algorithmen sind, hier ist ein Gegenbeispiel: Wenn man die Zifferngruppen rekursiv halbiert ergibt sich eine Komplexität von $T(n)=\Theta(n^{\log_2 3})=\Theta(n^{1,525})$.
Der \person{Schönhage-Strassen}-Algorithmus, eine diskrete Fourier-Transformation, war von 1971 bis 2007 (in der Vorlesung war es auch nicht aktueller) der schnellste Multiplikationsalgorithmus mit einer Komplexität von $T(n)=\Theta(n\cdot\log n\cdot\log\log n)$.
Der \person{Schönhage-Strassen}-Algorithmus, eine diskrete Fourier-Transformation, war von 1971 bis 2007 (in der Vorlesung war es auch nicht aktueller) der schnellste Multiplikationsalgorithmus mit einer Komplexität von $T(n)=\Theta(n\cdot\log n\cdot\log\log n)$.
\subsection{Matrizenmultiplikation}
Die iterative Methode hat eine Komplexität von $T(n)=\Theta(n^3)$. Das ist die Methode, die auch in der Schule/im Studium gelehrt wird.
Auch hier ist die rekursive Variante wieder etwas schneller, \person{Strassen} fand einen Algorithmus mit einer Komplexität von $T(n)=\Theta(n^{\log_2 7})=\Theta(n^{2,8075})$.
Der beste bis heute bekannte Algorithmus setzt auf eine Vermischung von iterativen und rekursiven Funktionen und hat eine Komplexität von $T(n)=\mathcal{O}(n^{2,376})$.
\subsection{Zyklische Zahl}
Finde Ziffern $z_1,...,z_n$ mit:
\begin{align}
5\cdot[z_1z_2...z_n]_{10}=[5z_1z_2...z_n]_{10}\notag
\end{align}
Ein einfaches Durchprobieren aller Zahlen bis zu einer Zahl $n$ erzeugt einen Aufwand von $T(n)=\mathcal{O}(n\log n)$. Mit systematischer Berechnung der Ziffern von hinten nach vorne beträgt der Aufwand nur noch $T(n)=\mathcal{O}(\log_2 n)$, wenn $n$ die gesuchte Zahl ist.
Die gesuchte Zahl ist übrigens $n=10.204.081.632.653.061.224.489.795.918.367.346.938.775$. \\
Als Wort: "'10 Sextilliarden 204 Sextillionen 81 Quintilliarden 632 Quintillionen 653 Quadrilliarden 61 Quadrillionen 224 Trilliarden 489 Trillionen 795 Billiarden 918 Billionen 367 Milliarden 346 Millionen 938 Tausend 775"' \smiley{}.
\subsection{Türme von Hanoi}
\begin{center}
\begin{tikzpicture}
\draw[line width=1mm] (0,0) -- (3,0);
\draw[line width=1mm] (4,0) -- (7,0);
\draw[line width=1mm] (8,0) -- (11,0);
\draw (0.2,0) rectangle (2.8,1);
\draw (0.6,1) rectangle (2.4,2);
\draw (1.0,2) rectangle (2.0,3);
\node at (1.5,2.5) (1) {1};
\node at (1.5,1.5) (2) {2};
\node at (1.5,0.5) (3) {3};
\draw (1.45,3) rectangle (1.55,3.5);
\draw (5.45,0) rectangle (5.55,3.5);
\draw (9.45,0) rectangle (9.55,3.5);
\node at (1.5,4) (A) {A};
\node at (5.5,4) (B) {B};
\node at (9.5,4) (C) {C};
\end{tikzpicture}
\end{center}
Dieses Problem lässt sich nur rekursiv rechnen. Der Aufwand dafür beträgt $T(n)=2^n-1$.
\begin{center}
\begin{longtable}{p{1cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}}
\rowcolor{lightgray}
& \textbf{Schritt} $i$ & \textbf{Scheibe} $d$ & \textbf{Quelle} $s$ & \textbf{Ziel} $t$ \\
\hline
$n=1$ & 1 & 1 & A & C \\
\hline\hline
$n=2$ & 1 & 1 & A & B \\
\hline
& 2 & 2 & A & C \\
\hline
& 3 & 1 & B & C \\
\hline\hline
$n=3$ & 1 & 1 & A & C \\
\hline
& 2 & 2 & A & B \\
\hline
& 3 & 1 & C & B \\
\hline
& 4 & 3 & A & C \\
\hline
& 5 & 1 & B & A \\
\hline
& 6 & 2 & B & C \\
\hline
& 7 & 1 & A & C
\end{longtable}
\end{center}
Im $i$-ten Schritt finden dann folgende Schritt statt:
\begin{itemize}
\item Scheibe $k$ wird bewegt, mit \texttt{mod(i,2**(k-1))} = 0, aber \texttt{mod(i,2**k) != 0}
\item Scheibe $k$ wird zum ersten Mal im Schritt $2^{k-1}$ und dann alle $2^k$ Schritte bewegt
\item Die größte Scheibe $n$ wird immer genau einmal im Schritt $2^{n-1}$ von A nach C bewegt, das heißt rückwärts durch die Positionsindizes, die nächstkleinere Scheibe $n-1$ zweimal vorwärts A $\to$ B $\to$ C, die nächstkleinere $n-2$ viermal rückwärts A $\to$ C $\to$ B $\to$ A $\to$ C, ...
\end{itemize}
\begin{*anmerkung}
Der Legende nach soll die Welt zu dem Zeitpunkt untergehen, wenn dieses Problem mit $n=64$ Scheiben von einem Menschen gelöst wurde.
Dafür benutzt man stattdessen einen Computer und das Programm von Unicomp, Inc (\url{https://www.fortran.com/F/ex_hanoi.html}, auch in meinen Github-Repository: \url{https://github.com/henrydatei/TU_PROG/blob/master/Tuerme_von_Hanoi.f95}).
Dieses Programm wird bei $n=64$ einen Output von einem Zetabyte produzieren, was in etwa dem Internettraffic der Menschheit eines Jahres entspricht. Weiterhin würde mein Rechner rund 3,3 Millionen Jahre brauchen. Es dauert also noch ein bisschen bis zum Weltuntergang \smiley{}.
\end{*anmerkung}
\subsection{Kochkurve}
\begin{center}
\begin{tikzpicture}[decoration=Koch snowflake, scale=0.8]
\draw decorate{(0,0) -- ++(60:3) -- ++(300:3) -- ++(180:3)};
\draw decorate{ decorate{(4,0) -- ++(60:3) -- ++(300:3) -- ++(180:3)}};
\draw decorate{ decorate{ decorate{(8,0) -- ++(60:3) -- ++(300:3) -- ++(180:3)}}};
\draw decorate{ decorate{ decorate{ decorate{(12,0) -- ++(60:3) -- ++(300:3) -- ++(180:3)}}}};
\end{tikzpicture}
\end{center}
Die Komplexitäten lauten
\begin{itemize}
\item rekursiv: $T(n)=\mathcal{O}(4^n)$
\item iterativ: Algorithmus ist sehr kompliziert
\end{itemize}
\subsection{$n$-Damen-Problem}
Beim $n$-Damen-Problem geht es darum, $n$ Damen auf einen $n\times n$-Schachbrett zu verteilen, sodass keine Dame eine andere schlagen kann. Eine Dame kann alle Damen schlagen, die horizontal, vertikal oder diagonal zu ihr stehen.
Für $n=1$ gibt es genau 1 triviale Lösung, $n=2$ und $n=3$ haben keine Lösungen, für $n=4$ gibt es bis auf Symmetrien auch nur eine Lösung:
\begin{center}
\begin{tikzpicture}
\draw[step=1] (0,0) grid (4,4);
\node at (0.5,1.5) (a) {D};
\node at (1.5,3.5) (b) {D};
\node at (2.5,0.5) (c) {D};
\node at (3.5,2.5) (d) {D};
\end{tikzpicture}
\end{center}
Will man alle Lösungen finden kann man die $n$ Damen beliebig auf die $n^2$ Felder verteilen. Dann muss man $\binom{n^2}{n}$ Möglichkeiten durchprobieren. Verteilt man nur auf jeder Spalte eine Dame, so hat man noch $n^n$ Möglichkeiten. Bei zusätzlich nur noch einer Dame pro Zeile sind es nur noch $n!$ Möglichkeiten. Wenn auch Diagonalen berücksichtigt werden sollen, gibt es viel weniger Möglichkeiten. Da eine
systematische Planung vorausschauend alle bedrohten Felder für weitere Platzierungen kennen müsste, wird zur Lösung \begriff{Backtracking} verwendet.
\subsection{Legepuzzle}
Eine Legepuzzle ist ein zweidimensionales Puzzle mit $n$ Teilen.
Löst man dieses Puzzle rekursiv naiv, also vergleicht eine Seite eines Teils mit jeweils allen offenen Stellen, so hat man $T(n)=\mathcal{O}(n^2)$. Löst man dies iterativ mit $k$ Teilengen, zum Beispiel Farbgruppen mit $\approx\frac{n}{k}$ Teilen, wobei $k\le\frac{n}{k}$, also zum Beispiel $k=\sqrt{n}=\frac{n}{k}$: $T_k(n)=\mathcal{O}(n+\frac{n^2}{k}+k^2)=\mathcal{O}(n^{1,5})$.
\subsection{\person{Ackermann}-Funktion}
Die \person{Ackermann}-Funktion hat folgende Bildungsvorschrift:
\begin{align}
A(i,j)=\begin{cases}
2^j & i=1 \\
A(i-1,2) & j=1 \\
A(i-1,A(i,j-1)) & i\ge 2, j\ge 2
\end{cases}\notag
\end{align}
\begin{center}
\begin{tabular}{p{1cm}|p{2cm}p{2cm}p{2cm}p{2cm}p{2cm}}
\rowcolor{lightgray} $i\setminus j$ & 1 & 2 & 3 & 4 & 5 \\
\hline
\cellcolor{lightgray} 1 & 2 & 4 & 8 & 16 & 32 \\
\cellcolor{lightgray} 2 & 4 & $2^{2^2}=16$ & $2^{2^{2^2}}=65536$ & $2^{65536}$ & \\
\cellcolor{lightgray} 3 & $2^{2^2}=16$ & $A(2,16)$ & & & \\
\cellcolor{lightgray} 4 & $A(2,16)$ & $A(3,A(4,1))$ & & &
\end{tabular}
\end{center}
Die \person{Ackermann}-Funktion ist nicht primitiv rekursiv!
Besonders bei $A(2,3)$ tauchen unschön zu schreibende "'Potenztürme"' auf. Um diese zu vermeiden, führen wir die \begriff{Knuth-Up-Arrow}-Notation ein. Dabei gilt:
\begin{align}
a\uparrow b &:= a^b \notag \\
a\uparrow\uparrow b = a\uparrow^2 b &:= \underbrace{a\uparrow\dots\uparrow a}_b \notag \\
a\uparrow\uparrow\uparrow b = a\uparrow^3 b &:= \underbrace{a\uparrow^2 a\uparrow^2\dots\uparrow^2 a}_b \notag \\
a\underbrace{\uparrow\dots\uparrow}_n b = a\uparrow^n b &:= \underbrace{a\underbrace{\uparrow\dots\uparrow}_{n-1} a\underbrace{\uparrow\dots\uparrow}_{n-1}\dots\underbrace{\uparrow\dots\uparrow}a}_b\notag
\end{align}
So gilt also:
\begin{itemize}
\item $3\uparrow 2=3^2=9$
\item $3\uparrow\uparrow 2 = 3^3 = 27$
\item $3\uparrow\uparrow 3 = 3^{3^3} > 7\cdot 10^{12}$
\end{itemize}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -0,0 +1,520 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="425"
height="175"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docbase="/home/mik/Documents/wikipedia/Addierwerk"
sodipodi:docname="Ripple-carry-adder.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs4">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 87.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="425 : 87.5 : 1"
inkscape:persp3d-origin="212.5 : 58.333333 : 1"
id="perspective92" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="white"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="262.89812"
inkscape:cy="107.80633"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="425px"
height="175px"
showgrid="true"
gridtolerance="10000"
inkscape:grid-points="true"
inkscape:window-width="1280"
inkscape:window-height="958"
inkscape:window-x="-4"
inkscape:window-y="-3">
<inkscape:grid
id="GridFromPre046Settings"
type="xygrid"
originx="0px"
originy="0px"
spacingx="5px"
spacingy="5px"
color="#3f3fff"
empcolor="#3f3fff"
opacity="0.21568627"
empopacity="0.48627451"
empspacing="5" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.77165353;stroke-miterlimit:4;stroke-dasharray:none"
id="rect2465"
width="425"
height="175"
x="0"
y="0" />
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2794"
width="60"
height="40"
x="297.43121"
y="64.566017"
rx="3"
ry="3" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="328.54608"
y="80.105011"
id="text2796"><tspan
sodipodi:role="line"
x="328.54608"
y="80.105011"
id="tspan2798">Voll-</tspan><tspan
sodipodi:role="line"
x="328.54608"
y="96.105011"
id="tspan2800">addierer</tspan></text>
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2802"
width="60"
height="40"
x="209.43121"
y="64.566017"
rx="3"
ry="3" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="240.54608"
y="80.105011"
id="text2804"><tspan
sodipodi:role="line"
x="240.54608"
y="80.105011"
id="tspan2806">Voll-</tspan><tspan
sodipodi:role="line"
x="240.54608"
y="96.105011"
id="tspan2808">addierer</tspan></text>
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2810"
width="60"
height="40"
x="121.4312"
y="64.566017"
rx="3"
ry="3" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="152.54608"
y="80.105026"
id="text2812"><tspan
sodipodi:role="line"
x="152.54608"
y="80.105026"
id="tspan2814">Voll-</tspan><tspan
sodipodi:role="line"
x="152.54608"
y="96.105026"
id="tspan2816">addierer</tspan></text>
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2818"
width="60"
height="40"
x="33.431198"
y="64.566017"
rx="3"
ry="3" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="64.546082"
y="80.105011"
id="text2820"><tspan
sodipodi:role="line"
x="64.546081"
y="80.105011"
id="tspan2822">Voll-</tspan><tspan
sodipodi:role="line"
x="64.546081"
y="96.105011"
id="tspan2824">addierer</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 345.431,64.566 L 345.431,29.566 L 400.431,29.566"
id="path3847"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 309.4312,64.56602 L 309.4312,22.06602"
id="path3849"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 327.4312,22.06602 L 327.4312,64.56602"
id="path3851"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 221.4312,64.56602 L 221.4312,22.06602"
id="path3853"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 237.4312,64.56602 L 237.4312,22.06602"
id="path3855"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 257.4312,64.56602 L 257.4312,52.56602 L 283.4312,52.56602 L 283.4312,116.56602 L 313.4312,116.56602 L 313.4312,104.56602"
id="path3857"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 133.4312,64.56602 L 133.4312,22.06602"
id="path3859"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 149.4312,64.56602 L 149.4312,22.06602"
id="path3861"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 169.4312,64.56602 L 169.4312,52.56602 L 195.4312,52.56602 L 195.4312,116.56602 L 225.4312,116.56602 L 225.4312,104.56602"
id="path3863"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 45.4312,64.56602 L 45.4312,22.06602"
id="path3865"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 61.4312,64.56602 L 61.4312,22.06602"
id="path3867"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 81.4312,64.56602 L 81.4312,52.56602 L 107.4312,52.56602 L 107.4312,116.56602 L 137.4312,116.56602 L 137.4312,104.56602"
id="path3869"
sodipodi:nodetypes="cccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 341.4312,104.56602 L 341.4312,144.56602"
id="path3887" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 253.4312,104.56602 L 253.4312,144.56602"
id="path3889" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 165.4312,104.56602 L 165.4312,144.56602"
id="path3891" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 77.4312,104.56602 L 77.4312,144.56602"
id="path3893" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="334.03113"
y="23.566017"
id="text3901"><tspan
sodipodi:role="line"
id="tspan3903"
x="334.03113"
y="23.566017">a</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="311.63116"
y="23.166016"
id="text3905"><tspan
sodipodi:role="line"
id="tspan3907"
x="311.63116"
y="23.166016">b</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="322.17804"
y="25.566017"
id="text3909"><tspan
sodipodi:role="line"
id="tspan3911"
x="322.17804"
y="25.566017">0</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="340.45068"
y="25.566017"
id="text3913"><tspan
sodipodi:role="line"
id="tspan3915"
x="340.45068"
y="25.566017">0</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="246.03113"
y="23.566017"
id="text3917"><tspan
sodipodi:role="line"
id="tspan3919"
x="246.03113"
y="23.566017">a</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="223.63116"
y="23.166016"
id="text3921"><tspan
sodipodi:role="line"
id="tspan3923"
x="223.63116"
y="23.166016">b</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="234.17804"
y="25.566017"
id="text3925"><tspan
sodipodi:role="line"
id="tspan3927"
x="234.17804"
y="25.566017">1</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="252.45068"
y="25.566017"
id="text3929"><tspan
sodipodi:role="line"
id="tspan3931"
x="252.45068"
y="25.566017">1</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="158.03113"
y="23.566017"
id="text3949"><tspan
sodipodi:role="line"
id="tspan3951"
x="158.03113"
y="23.566017">a</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="135.63116"
y="23.166016"
id="text3953"><tspan
sodipodi:role="line"
id="tspan3955"
x="135.63116"
y="23.166016">b</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="146.17804"
y="25.566017"
id="text3957"><tspan
sodipodi:role="line"
id="tspan3959"
x="146.17804"
y="25.566017">2</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="164.45068"
y="25.566017"
id="text3961"><tspan
sodipodi:role="line"
id="tspan3963"
x="164.45068"
y="25.566017">2</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="70.031128"
y="23.566017"
id="text3965"><tspan
sodipodi:role="line"
id="tspan3967"
x="70.031128"
y="23.566017">a</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="47.631157"
y="23.166016"
id="text3969"><tspan
sodipodi:role="line"
id="tspan3971"
x="47.631157"
y="23.166016">b</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="58.17804"
y="25.566017"
id="text3973"><tspan
sodipodi:role="line"
id="tspan3975"
x="58.17804"
y="25.566017">3</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="76.450684"
y="25.566017"
id="text3977"><tspan
sodipodi:role="line"
id="tspan3979"
x="76.450684"
y="25.566017">3</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="342.63116"
y="140.16602"
id="text5883"><tspan
sodipodi:role="line"
id="tspan5885"
x="342.63116"
y="140.16602">s</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="353.17804"
y="142.56601"
id="text5887"><tspan
sodipodi:role="line"
id="tspan5889"
x="353.17804"
y="142.56601">0</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="254.63116"
y="140.16602"
id="text5891"><tspan
sodipodi:role="line"
id="tspan5893"
x="254.63116"
y="140.16602">s</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="265.17804"
y="142.56601"
id="text5895"><tspan
sodipodi:role="line"
id="tspan5897"
x="265.17804"
y="142.56601">1</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="166.63116"
y="140.16602"
id="text5899"><tspan
sodipodi:role="line"
id="tspan5901"
x="166.63116"
y="140.16602">s</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="177.17804"
y="142.56601"
id="text5903"><tspan
sodipodi:role="line"
id="tspan5905"
x="177.17804"
y="142.56601">2</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:start;text-anchor:start;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="78.631149"
y="140.16602"
id="text5907"><tspan
sodipodi:role="line"
id="tspan5909"
x="78.631149"
y="140.16602">s</tspan></text>
<text
xml:space="preserve"
style="font-size:8px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="89.178017"
y="142.56601"
id="text5911"><tspan
sodipodi:role="line"
id="tspan5913"
x="89.178017"
y="142.56601">3</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 49.4312,104.56602 L 49.4312,144.56602"
id="path5915" />
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="-142.30038"
y="60.790619"
id="text5917"
transform="matrix(0,-1,1,0,0,0)"><tspan
sodipodi:role="line"
id="tspan5919"
x="-142.30038"
y="60.790619">carry out</tspan></text>
<text
xml:space="preserve"
style="font-size:12.80000019px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Sans"
x="377.43124"
y="25.266006"
id="text6825"><tspan
sodipodi:role="line"
id="tspan6827"
x="377.43124"
y="25.266006">carry in</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

View file

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="155.9055"
height="109.84251"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.44.1"
version="1.0"
sodipodi:docbase="C:\Dokumente und Einstellungen\q904710\Desktop"
sodipodi:docname="Halbaddierer_Aufbau_XOR.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="82.55921"
inkscape:cy="53.858242"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
width="44mm"
height="31mm"
units="mm"
showgrid="true"
gridspacingx="1mm"
gridspacingy="1mm"
grid_units="mm"
inkscape:grid-points="true"
gridtolerance="0.4"
inkscape:window-width="1024"
inkscape:window-height="748"
inkscape:window-x="203"
inkscape:window-y="109"
inkscape:object-bbox="true"
inkscape:object-points="true"
inkscape:object-nodes="true" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.47755909;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3698"
sodipodi:cx="39.375568"
sodipodi:cy="183.10983"
sodipodi:rx="0.39918929"
sodipodi:ry="0"
d="M 39.774758 183.10983 A 0.39918929 0 0 1 1 38.976379,183.10983 A 0.39918929 0 0 1 1 39.774758 183.10983 z" />
<path
style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 159.44882,230.31496 L 17.716535,230.31496"
id="path4820" />
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2248"
width="24.80315"
height="35.433071"
x="71.08268"
y="14.173231" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="78.169289"
y="35.852661"
id="text3136"><tspan
sodipodi:role="line"
id="tspan3138"
x="78.169289"
y="35.852661">=1</tspan></text>
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect3140"
width="24.80315"
height="35.433071"
x="71.08268"
y="56.692902" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="79.979713"
y="78.372314"
id="text3142"><tspan
sodipodi:role="line"
id="tspan3144"
x="79.979713"
y="78.372314">&amp;</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 71.08268,21.099557 L 35.649606,21.259847"
id="path3146" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 71.08268,42.706697 L 35.649606,42.519687"
id="path3148" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 71.080428,63.779508 L 60.236056,63.749672 L 60.236221,21.275413"
id="path3150"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 71.08268,85.028117 L 49.822835,85.039377 L 49.822835,42.519687"
id="path3152"
sodipodi:nodetypes="ccc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3154"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-31.66104,-28.33583)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="15.200516"
y="24.803129"
id="text3156"><tspan
sodipodi:role="line"
id="tspan3158"
x="15.200516"
y="24.803129">x</tspan></text>
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3164"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-31.43466,-6.846733)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="15.426888"
y="46.292267"
id="text3166"><tspan
sodipodi:role="line"
id="tspan3168"
x="15.426888"
y="46.292267">y</tspan></text>
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3174"
sodipodi:cx="67.276787"
sodipodi:cy="266.06897"
sodipodi:rx="2.2767856"
sodipodi:ry="2.2767856"
d="M 69.553572 266.06897 A 2.2767856 2.2767856 0 1 1 65.000001,266.06897 A 2.2767856 2.2767856 0 1 1 69.553572 266.06897 z"
transform="translate(-17.5,-223.2283)" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 95.88583,31.813837 L 124.23228,31.889767"
id="path3176" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 95.88583,74.492407 L 124.23228,74.409447"
id="path3178"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3180"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(63.99606,-17.70593)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="134.8622"
y="34.93573"
id="text3182"><tspan
sodipodi:role="line"
id="tspan3184"
x="134.8622"
y="34.93573">s</tspan></text>
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3186"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(63.99606,24.81377)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="135.14949"
y="77.229431"
id="text3188"><tspan
sodipodi:role="line"
id="tspan3190"
x="135.14949"
y="77.229431">c</tspan></text>
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path1972"
sodipodi:cx="67.276787"
sodipodi:cy="266.06897"
sodipodi:rx="2.2767856"
sodipodi:ry="2.2767856"
d="M 69.553572 266.06897 A 2.2767856 2.2767856 0 1 1 65.000001,266.06897 A 2.2767856 2.2767856 0 1 1 69.553572 266.06897 z"
transform="translate(-7.040566,-244.8091)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,415 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="294.09448"
height="166.53543"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.44.1"
version="1.0"
sodipodi:docbase="C:\Dokumente und Einstellungen\q904710\Desktop"
sodipodi:docname="Halbaddierer_Aufbau_XOR.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8"
inkscape:cx="186.74246"
inkscape:cy="75.589511"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
width="83mm"
height="47mm"
units="mm"
showgrid="true"
gridspacingx="1mm"
gridspacingy="1mm"
grid_units="mm"
inkscape:grid-points="true"
gridtolerance="0.4"
inkscape:window-width="1280"
inkscape:window-height="968"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:object-bbox="true"
inkscape:object-points="true"
inkscape:object-nodes="true" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.47755909;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3698"
sodipodi:cx="39.375568"
sodipodi:cy="183.10983"
sodipodi:rx="0.39918929"
sodipodi:ry="0"
d="M 39.774758 183.10983 A 0.39918929 0 0 1 1 38.976379,183.10983 A 0.39918929 0 0 1 1 39.774758 183.10983 z" />
<path
style="fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 159.44882,230.31496 L 17.716535,230.31496"
id="path4820" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 81.181376,39.034569 L 42.242964,39.016293"
id="path2000"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 81.181376,60.195277 L 42.242964,60.276123"
id="path2002"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2004"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-25.06768,-10.57939)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="21.793871"
y="42.559578"
id="text2006"><tspan
sodipodi:role="line"
id="tspan2008"
x="21.793871"
y="42.559578">x</tspan></text>
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2010"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-24.8413,10.9097)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="22.020247"
y="64.048714"
id="text2012"><tspan
sodipodi:role="line"
id="tspan2014"
x="22.020247"
y="64.048714">y</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 230.41814,49.509757 L 248.03146,49.556937"
id="path2016"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2018"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(187.7953,-0.114674)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="258.66141"
y="121.15503"
id="text2020"><tspan
sodipodi:role="line"
id="tspan2022"
x="258.66141"
y="121.15503">s</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 180.86306,118.34552 L 248.17911,118.33244"
id="path2024"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2026"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(187.9429,68.66082)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="258.80902"
y="52.660065"
id="text2028"><tspan
sodipodi:role="line"
id="tspan2030"
x="258.80902"
y="52.660065">c</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 151.97996,131.07128 L 42.56284,131.07129"
id="path2048"
sodipodi:nodetypes="cc" />
<path
sodipodi:type="arc"
style="fill:none;fill-opacity:1;stroke:black;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2050"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-24.80314,81.70486)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="20.336016"
y="134.97011"
id="text2052"><tspan
sodipodi:role="line"
id="tspan2054"
x="20.336016"
y="134.97011">c</tspan></text>
<text
xml:space="preserve"
style="font-size:6.51179123px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="27.284081"
y="137.22588"
id="text2072"><tspan
sodipodi:role="line"
id="tspan2074"
x="27.284081"
y="137.22588">IN</tspan></text>
<text
xml:space="preserve"
style="font-size:6.51179123px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="266.30627"
y="56.661819"
id="text2098"><tspan
sodipodi:role="line"
id="tspan2100"
x="266.30627"
y="56.661819">OUT</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="210.13049"
y="53.118511"
id="text2176"><tspan
sodipodi:role="line"
id="tspan2178"
x="210.13049"
y="53.118511">≥1</tspan></text>
<rect
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect2192"
width="28.661144"
height="42.519688"
x="201.96851"
y="28.315361" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 109.84251,38.981207 L 201.96851,39.012774"
id="path2194"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 180.70866,70.811727 L 191.33858,70.813195 L 191.33859,60.208063 L 201.96851,60.211"
id="path2196"
sodipodi:nodetypes="cccc" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="160.9594"
y="125.37282"
id="text2202"><tspan
sodipodi:role="line"
id="tspan2204"
x="160.9594"
y="125.37282">=1</tspan></text>
<rect
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect2206"
width="28.661144"
height="42.519688"
x="152.04752"
y="49.575203" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="91.811295"
y="53.118515"
id="text2208"><tspan
sodipodi:role="line"
id="tspan2210"
x="91.811295"
y="53.118515">&amp;</tspan></text>
<rect
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect2212"
width="28.661144"
height="42.519688"
x="81.181374"
y="28.315363" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 67.268461,38.945286 L 67.268461,88.551585 L 81.181376,88.589549"
id="path2214" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 53.036538,60.253714 L 53.149606,109.81143 L 81.181376,109.75026"
id="path2216"
sodipodi:nodetypes="ccc" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="89.343361"
y="102.72482"
id="text2218"><tspan
sodipodi:role="line"
id="tspan2220"
x="89.343361"
y="102.72482">=1</tspan></text>
<rect
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect2222"
width="28.661144"
height="42.519688"
x="81.181374"
y="77.921661" />
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:none;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2224"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(3.355178,-10.5677)" />
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:none;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path2226"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(-10.84117,10.65824)" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="163.44278"
y="76.020638"
id="text3115"><tspan
sodipodi:role="line"
id="tspan3117"
x="163.44278"
y="76.020638">&amp;</tspan></text>
<rect
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="rect3119"
width="28.661144"
height="42.519688"
x="152.04753"
y="99.181503" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 138.41906,131.07127 L 138.34919,81.733835 L 152.04752,81.700016"
id="path3121"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 152.04752,60.01812 L 124.01575,60.205128 L 124.01575,99.181506 L 109.84252,99.181506"
id="path3123" />
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:none;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3125"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(74.40946,81.46498)" />
<path
style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 152.04753,109.98156 L 124.01575,109.81143 L 124.01575,99.092218"
id="path3127"
sodipodi:nodetypes="ccc" />
<path
sodipodi:type="arc"
style="fill:black;fill-opacity:1;stroke:none;stroke-width:1.0629921;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path3129"
sodipodi:cx="63.77953"
sodipodi:cy="49.595676"
sodipodi:rx="3.5433066"
sodipodi:ry="3.5539272"
d="M 67.322836 49.595676 A 3.5433066 3.5539272 0 1 1 60.236223,49.595676 A 3.5433066 3.5539272 0 1 1 67.322836 49.595676 z"
transform="translate(60.23622,49.57521)" />
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:1.9984252, 1.9984252;stroke-dashoffset:0;stroke-opacity:1"
id="rect3131"
width="67.958145"
height="104.55079"
x="46.467014"
y="21.77667" />
<rect
style="fill:none;fill-opacity:1;stroke:black;stroke-width:0.99921262;stroke-miterlimit:4;stroke-dasharray:1.9984252, 1.9984252;stroke-dashoffset:0;stroke-opacity:1"
id="rect4018"
width="69.192902"
height="103.94111"
x="118.60236"
y="44.35717" />
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="69.44799"
y="16.725906"
id="text4020"><tspan
sodipodi:role="line"
id="tspan4022"
x="69.44799"
y="16.725906">HA</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
x="148.81889"
y="160.16757"
id="text4024"><tspan
sodipodi:role="line"
id="tspan4026"
x="148.81889"
y="160.16757">HA</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -98,7 +98,7 @@
\usepgfplotslibrary{fillbetween}
\RequirePackage{pgf}
\RequirePackage{tikz}
\usetikzlibrary{patterns,arrows,calc,decorations.pathmorphing,backgrounds, positioning,fit,petri}
\usetikzlibrary{patterns,arrows,calc,decorations.pathmorphing,backgrounds, positioning,fit,petri,decorations.fractals}
\usetikzlibrary{matrix}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%