Debian Codegraph @

texmf-dist/doc/latex/circuit-macros/examples/Logic.m4

raw
1 .PS
2 # Logic.m4
3 cct_init
4 ifdef(`AND_gate',,`include(liblog.m4)')
5 xgap = 0.6
6 [ dmov = 0.4
7 { {AND_gate ; "{\tt AND\_gate}" ljust at last [].w + (xgap,0)}
8 move down dmov; right_
9 {OR_gate ; "{\tt OR\_gate}" ljust at last [].w + (xgap,0)}
10 move down dmov; right_
11 {BUFFER_gate ; "{\tt BUFFER\_gate}" ljust at last [].w + (xgap,0)}
12 move down dmov; right_
13 {XOR_gate ; "{\tt XOR\_gate}" ljust at last [].w + (xgap,0)}
14 }
15
16 move right_ 140pt__
17 { { NAND_gate; "{\tt NAND\_gate}" ljust at last [].w + (xgap,0) }
18 move down dmov; right_
19 { Gate: NOR_gate(3)
20 "{\tt NOR\_gate(3)}" ljust at last [].w + (xgap,0)
21 thinlines_
22 spline <- from Gate.Out right arrowht*2.0 \
23 then up 0.15 then right 0.05
24 "{\tt Out}" ljust
25 spline <- from Gate.N_Out down arrowht*2.0 \
26 then right 0.1+arrowht*1.5+NOT_rad down 0.15-arrowht*2.0
27 "{\tt N\_Out}" ljust
28 for_(1,3,1,
29 `arrow <- left 0.2 down 0.05 from Gate.In`'m4x
30 "{\tt In`'m4x\/}" rjust at Here+(0,(2-m4x)*0.02)')
31 }
32 thicklines_
33 move down dmov; right_
34 { NOT_gate ; "{\tt NOT\_gate}" ljust at last [].w + (xgap,0) }
35 move down dmov; right_
36 {Gate: NXOR_gate(NPN); "{\tt NXOR\_gate(NPN)}" ljust at last [].w + (xgap,0)
37 for_(1,3,1,
38 `arrow <- left 0.2 up 0.05 from Gate.In`'m4x
39 "{\tt In`'m4x\/}" rjust at Here+(0,(2-m4x)*0.02)')
40 }
41 }
42 move right_ 140pt__
43 { {NAND_gate(,B) ; "{\tt NAND\_gate(,B)}" ljust at last [].w + (xgap,0)}
44 { line invis right 1.6 from last [].se then down 1}
45 move down dmov; right_
46 move left N_diam*L_unit; right_
47 {NOR_gate(3,NB) ; "{\tt NOR\_gate(3,NB)}" ljust at (last "",last []) }
48 move down dmov; right_
49 {BOX_gate(PN,N,,,=1)
50 "{\tt BOX\_gate(PN,N,{,},=1)}" ljust at (last "",last [])
51 line left 0.15 from last [].In1
52 line left 0.15-NOT_rad*2 from last [].In2
53 line right 0.15 from last [].Out }
54 move down dmov; move right_ N_diam*L_unit
55 {BOX_gate(PP,N,,,=)
56 "{\tt BOX\_gate(PP,N,{,},=)}" ljust at (last "",last [])
57 line left 0.15 from last [].In1
58 line left 0.15 from last [].In2
59 line right 0.15 from last [].Out }
60 }
61 ]
62 .PE