|
|
\item \self Compute the propositional formula of the following circuit.
\tikzstyle{branch}=[fill,shape=circle,minimum size=3pt,inner sep=0pt] \begin{tikzpicture}[label distance=2mm] \node (a) at (0,0) {$a$}; \node (b) at (0,-1) {$b$}; \node (c) at (0,-2.5) {$c$}; \node (d) at (0,-3.5) {$d$}; \node (z) at (13.5,-1.5) {$z$};
\node (am) at (2,0) {}; \node (not1m) at (3,-1) {}; \node (not2m) at (3,-2.5) {}; \node (dm) at (2,-3.5) {}; \node (bm) at (1,-1) {}; \node (bm2) at (7,-1.875) {}; \node (not3m) at (7,-2.5) {}; \node (or1m) at (9,-.5) {}; \node (and1m) at (9,-2) {};
\node[not gate US, draw, logic gate inputs=n] at ($(2,-1)$) (not1) {\tiny NOT}; \node[not gate US, draw, logic gate inputs=n] at ($(2,-2.5)$) (not2) {\tiny NOT}; \node[or gate US, draw, logic gate inputs=nn] at ($(4,-.5)$) (or1) {\tiny OR}; \node[xor gate US, draw, logic gate inputs=nn] at ($(4,-3)$) (xor1) {\tiny XOR}; \node[not gate US, draw, logic gate inputs=n] at ($(6,-3)$) (not3) {\tiny NOT}; \node[and gate US, draw, logic gate inputs=nn] at ($(8,-2)$) (and1) {\tiny AND}; \node[or gate US, draw, logic gate inputs=nn] at ($(10,-1.5)$) (or2) {\tiny OR}; \node[not gate US, draw, logic gate inputs=n] at ($(12,-1.5)$) (not4) {\tiny NOT};
\draw (a.east) -| (am.center) |- (or1.input 1); \draw (b.east) -- (not1.input); \draw (not1.output) -| (not1m.center) node[below] {$r$} |- (or1.input 2); \draw (c.east) -- (not2.input); \draw (not2.output) -| (not2m.center) node[above] {$s$} |- (xor1.input 1); \draw (d.east) -| (dm.center) |- (xor1.input 2); \draw (b.east) -| (bm.center) node[circle, fill,inner sep=2pt] {} |- (bm2.center) node[above] {$u$} |- (and1.input 1); \draw (xor1.output) -- node[below] {$t$} (not3.input); \draw (not3.output) -| node[below] {$v$} (not3m.center) |- (and1.input 2); \draw (or1.output) -| (or1m.center) node[above] {$w$} |- (or2.input 1); \draw (and1.output) -| (and1m.center) node[below] {$x$} |- (or2.input 2); \draw (or2.output) -- node[below] {$y$} (not4.input); \draw (not4.output) -- (z);
\end{tikzpicture}
|