Source
%% gh
%% Un circuit logique pour afficher 4
%% P = \overline{a} + \overlin{(b \oplus c)}

%% échelle et étendue de l'image
60 setxunit
-4 5 setxrange
1 3.5 setyrange

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% définitions des couleurs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/coul0 {0 0 0 0.5 setcmykcolor} def %gris
/coul1 {noir} def
/coul2 {orange} def
/coul3 {rouge} def
/coul4 {bleu} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Bibliothèque logic
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
uselogic
1.5 setlinewidth
/logicUnit .15 def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Les portes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(C) node %% declaration du noeud de sortie
2.5 2.5 (OR) ccpict

(A) node
0 3 (AND) ccpict

(B) node
0 2 (AND) ccpict

/posA {Ain1 exch pop -2 exch} def % hauteur entrée 1 de A

(D) node
posA (INV) ccpict

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Les points
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/D1 {Din exch pop -3.5 exch} def % hauteur entrée 0 de C
/B1 {Bin1 exch pop -3.5 exch} def %
/B0 {Bin0 exch pop -3.5 exch} def %

<latex>
$x$
</latex>
D1 [1.5 dup] cltexlabel

<latex>
$y$
</latex>
B1 [1.5 dup] cltexlabel

<latex>
$z$
</latex>
B0 [1.5 dup] cltexlabel

<latex>
$f(x,y,z)$
</latex>
Cout [1.5 dup] crtexlabel

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Les liaisons
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ain0 Bin1 (-*) pcline
Aout Cin1 (-) pcline
Bout Cin0 (-) pcline
Dout Ain1 (-) line
D1 Din (-) line
B1 Bin1 (-) line
B0 Bin0 (-) line