1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
\documentclass{ppex}
\nonstopmode
\usepackage [graph,curve,arc]{xy}
\pagestyle{empty}
\begin{document}
\ResetPreambleCommands
\ReadyForTheFray
\usepackage [graph,curve,arc]{xy}
\newgraphescape{N}[1]{!{\save-/4mm/-/4pt/;p+/4mm/:
(-1,1);(-1,-1)**@{-} ?(.25)="N#1a" ?(.75)="N#1b",
(-1,1);(0,1)**@{-} ; (0,-1),{\ellipse_{}} ; (-1,-1)**@{-},
(0,0);(1,0)**{}*!E\cir<2pt>{}!C-E="N#1"\restore \POS"N#1"}}
\newgraphescape{I}[1]{!{\save-/4mm/-/2pt/;p+/4mm/:
(-1,1);(-1,-1)**@{-} ?="I#1a", (-1,1);(.667,0)**@{-};(-1,-1)**@{-},
(0,0);**{}*!E\cir<2pt>{}!C-E="I#1"\restore \POS"I#1"}}
\newgraphescape{B}{!{*=0@{*}}}
\newgraphescape{R}{!{;p+/r4mm/**{};}}
\newgraphescape{p}[2]{[#1!{"#2";p+/^/}]}
\newcommand{\circuit}[1]{\xygraph{~{0;<10mm,0mm>:<0mm,9mm>::0}#1}}
\[\begin{array}{c}
\circuit{ []!R!N1 ("N1a"([l]x - ?), "N1b"([l]y - ?))
[r]!I2 ("N1" - "I2a") - [r]{x\land y}}\\
\circuit{ []x
[rrr]!R!I1 ("I1a"("x" - ?))
[drr]!R!N1 ("I1" -`r[d]`"N1a""N1a", "N1b"!plx y - "N1b")
"I1"[dddd]!R!I2 ("I2a"[l]!puy!B - `d"I2a""I2a")
"N1"[dd]!R!N2 ("I1a"[l(.5)]!pux!B -`d"N2a""N2a", "I2" -`r[u]`"N2b""N2b")
[urr]!R!N3 ("N1" -`r[d]`"N3a""N3a", "N2" -`r[u]`"N3b""N3b")
- [r]{x\mathrel{\textrm{xor}}y}}
\end{array}\]
\end{document}
|