* SPICE netlist
VCC VG 0 7
M1 N003 B 0 0 2N7002
M2 N002 A 0 0 2N7002
M3 N004 N001 N003 N003 2N7002
M4 N008 N002 B B 2N7002
M5 N004 N001 O1 O1 2N7002
M6 N008 N002 O1 O1 2N7002
R3 O1 0 100k
VIN1 A 0 PULSE(0 5 0 10n 10n 90n 200n 10)
VIN2 B 0 PULSE(0 5 0 10n 10n 190n 400n 5)
M7 N003 B VCC VCC BSS84
M8 N002 A VG VG BSS84
M9 N001 N002 0 0 2N7002
M10 N001 N002 VG VG BSS84
VCC1 VCC 0 5
M15 N017 B 0 0 2N7002
M16 N016 A 0 0 2N7002
M17 N018 N015 N017 N017 2N7002
M18 N018 N016 B B 2N7002
R4 N018 0 100k
M21 N017 B VCC VCC BSS84
M22 N016 A VG VG BSS84
M23 N015 N016 0 0 2N7002
M24 N015 N016 VG VG BSS84
M11 N021 B 0 0 2N7002
M12 N020 A 0 0 2N7002
M25 N021 N019 N022 N022 2N7002
M26 B N020 N022 N022 2N7002
R1 N022 0 100k
M27 N021 B VCC VCC BSS84
M28 N020 A VG VG BSS84
M29 N019 N020 0 0 2N7002
M30 N019 N020 VG VG BSS84
M13 N007 A 0 0 2N7002
R2 VCC N007 100
M14 N005 N007 0 0 2N7002
R5 VCC N005 100
M19 N010 B 0 0 2N7002
R6 VCC N010 100
M20 N012 N010 0 0 2N7002
R7 VCC N012 100
M31 N006 N005 N009 N009 2N7002
M32 N009 N010 0 0 2N7002
R8 VCC N006 100
M33 N011 N007 N013 N013 2N7002
M34 N013 N012 0 0 2N7002
R9 VCC N011 100
M35 O2 N006 N014 N014 2N7002
M36 N014 N011 0 0 2N7002
R10 VCC O2 100
.tran 1000n

* LTspice schematic (.asc)
Version 4.1
SHEET 1 4512 2640
WIRE -688 -1320 -784 -1320
WIRE -416 -1320 -688 -1320
WIRE -1584 -1288 -1760 -1288
WIRE -1408 -1288 -1440 -1288
WIRE -1152 -1288 -1184 -1288
WIRE -2208 -1256 -2256 -1256
WIRE -2160 -1256 -2208 -1256
WIRE -2000 -1256 -2048 -1256
WIRE -1952 -1256 -2000 -1256
WIRE -688 -1256 -688 -1320
WIRE -416 -1256 -416 -1320
WIRE -704 -1208 -736 -1208
WIRE -496 -1208 -608 -1208
WIRE -336 -1208 -400 -1208
WIRE -288 -1208 -336 -1208
WIRE -176 -1208 -288 -1208
WIRE -1104 -1192 -1104 -1208
WIRE -784 -1192 -784 -1320
WIRE -784 -1192 -1104 -1192
WIRE -2256 -1176 -2256 -1256
WIRE -2048 -1176 -2048 -1256
WIRE -1536 -1176 -1536 -1208
WIRE -736 -1176 -736 -1208
WIRE -736 -1176 -1536 -1176
WIRE -1760 -1112 -1760 -1288
WIRE -848 -1112 -1760 -1112
WIRE -1184 -1096 -1184 -1288
WIRE -688 -1096 -1184 -1096
WIRE 928 -1096 928 -1112
WIRE 1216 -1096 928 -1096
WIRE -1360 -1080 -1360 -1208
WIRE -1184 -1080 -1184 -1096
WIRE -1184 -1080 -1360 -1080
WIRE 928 -1064 928 -1096
WIRE -1360 -1048 -1360 -1080
WIRE -1104 -1048 -1104 -1192
WIRE -688 -1048 -688 -1096
WIRE -432 -1048 -688 -1048
WIRE 1360 -1016 1360 -1096
WIRE 1840 -1016 1360 -1016
WIRE -688 -1000 -688 -1048
WIRE -432 -1000 -432 -1048
WIRE 624 -984 624 -1112
WIRE 880 -984 624 -984
WIRE -2144 -968 -2256 -968
WIRE -1904 -968 -2144 -968
WIRE -1440 -968 -1440 -1288
WIRE -1440 -968 -1904 -968
WIRE -1408 -968 -1440 -968
WIRE -1184 -968 -1184 -1080
WIRE -1152 -968 -1184 -968
WIRE -176 -968 -176 -1208
WIRE -848 -952 -848 -1112
WIRE -704 -952 -848 -952
WIRE -512 -952 -608 -952
WIRE -288 -952 -288 -1208
WIRE -288 -952 -416 -952
WIRE 624 -952 624 -984
WIRE 1072 -952 624 -952
WIRE 1360 -936 1360 -1016
WIRE -1536 -920 -1536 -1176
WIRE 1984 -888 1984 -1096
WIRE 2128 -888 1984 -888
WIRE 2256 -888 2128 -888
WIRE 624 -872 624 -952
WIRE 1216 -856 1216 -1096
WIRE 1312 -856 1216 -856
WIRE -2000 -840 -2064 -840
WIRE -1952 -840 -2000 -840
WIRE -1760 -840 -1760 -1112
WIRE -1760 -840 -1952 -840
WIRE -1584 -840 -1760 -840
WIRE 480 -792 368 -792
WIRE 576 -792 480 -792
WIRE 1360 -792 1360 -840
WIRE 1984 -760 1984 -888
WIRE -2256 -728 -2256 -968
WIRE -2064 -728 -2064 -840
WIRE 1312 -712 1200 -712
WIRE 624 -680 624 -776
WIRE 928 -680 928 -968
WIRE 1840 -680 1840 -1016
WIRE 1936 -680 1840 -680
WIRE 1680 -648 1680 -1096
WIRE 1840 -648 1680 -648
WIRE 1680 -600 1680 -648
WIRE -176 -552 -176 -888
WIRE -2256 -536 -2256 -648
WIRE -2064 -536 -2064 -648
WIRE -1536 -536 -1536 -824
WIRE -1360 -536 -1360 -952
WIRE -1104 -536 -1104 -952
WIRE 1072 -520 1072 -952
WIRE 1632 -520 1072 -520
WIRE 928 -472 928 -488
WIRE 1072 -472 928 -472
WIRE 1680 -456 1680 -504
WIRE 1984 -456 1984 -664
WIRE 928 -440 928 -472
WIRE -704 -408 -800 -408
WIRE -1600 -376 -1776 -376
WIRE -1424 -376 -1456 -376
WIRE -1168 -376 -1200 -376
WIRE 1072 -376 1072 -472
WIRE 1632 -376 1072 -376
WIRE 1840 -376 1840 -648
WIRE 1936 -376 1840 -376
WIRE 624 -360 624 -488
WIRE 880 -360 624 -360
WIRE -704 -344 -704 -408
WIRE 624 -312 624 -360
WIRE 1200 -312 1200 -712
WIRE 1200 -312 624 -312
WIRE -720 -296 -752 -296
WIRE -304 -296 -624 -296
WIRE -192 -296 -304 -296
WIRE -1120 -280 -1120 -296
WIRE -800 -280 -800 -408
WIRE -800 -280 -1120 -280
WIRE -1552 -264 -1552 -296
WIRE -752 -264 -752 -296
WIRE -752 -264 -1552 -264
WIRE 624 -248 624 -312
WIRE -1776 -200 -1776 -376
WIRE -864 -200 -1776 -200
WIRE -1200 -184 -1200 -376
WIRE -704 -184 -1200 -184
WIRE -1376 -168 -1376 -296
WIRE -1200 -168 -1200 -184
WIRE -1200 -168 -1376 -168
WIRE 480 -168 368 -168
WIRE 576 -168 480 -168
WIRE -1376 -136 -1376 -168
WIRE -1120 -136 -1120 -280
WIRE -704 -88 -704 -184
WIRE -1904 -56 -1904 -968
WIRE -1456 -56 -1456 -376
WIRE -1456 -56 -1904 -56
WIRE -1424 -56 -1456 -56
WIRE -1200 -56 -1200 -168
WIRE -1168 -56 -1200 -56
WIRE -192 -56 -192 -296
WIRE 624 -56 624 -152
WIRE 928 -56 928 -344
WIRE 1360 -56 1360 -696
WIRE 1680 -56 1680 -360
WIRE 1984 -56 1984 -360
WIRE -864 -40 -864 -200
WIRE -720 -40 -864 -40
WIRE -304 -40 -304 -296
WIRE -304 -40 -624 -40
WIRE -1552 -8 -1552 -264
WIRE -1952 72 -1952 -840
WIRE -1776 72 -1776 -200
WIRE -1776 72 -1952 72
WIRE -1600 72 -1776 72
WIRE -192 360 -192 24
WIRE -1552 376 -1552 88
WIRE -1376 376 -1376 -40
WIRE -1120 376 -1120 -40
WIRE -432 536 -800 536
WIRE -1600 568 -1776 568
WIRE -1424 568 -1456 568
WIRE -1168 568 -1200 568
WIRE -432 600 -432 536
WIRE -512 648 -752 648
WIRE -304 648 -416 648
WIRE -192 648 -304 648
WIRE -1120 664 -1120 648
WIRE -800 664 -800 536
WIRE -800 664 -1120 664
WIRE -1552 680 -1552 648
WIRE -752 680 -752 648
WIRE -752 680 -1552 680
WIRE -1776 744 -1776 568
WIRE -864 744 -1776 744
WIRE -1200 760 -1200 568
WIRE -704 760 -1200 760
WIRE -1376 776 -1376 648
WIRE -1200 776 -1200 760
WIRE -1200 776 -1376 776
WIRE -1376 808 -1376 776
WIRE -1120 808 -1120 664
WIRE -704 808 -704 760
WIRE -448 808 -704 808
WIRE -448 856 -448 808
WIRE -1904 888 -1904 -56
WIRE -1456 888 -1456 568
WIRE -1456 888 -1904 888
WIRE -1424 888 -1456 888
WIRE -1200 888 -1200 776
WIRE -1168 888 -1200 888
WIRE -192 888 -192 648
WIRE -864 904 -864 744
WIRE -528 904 -864 904
WIRE -304 904 -304 648
WIRE -304 904 -432 904
WIRE -1552 936 -1552 680
WIRE -1952 1016 -1952 72
WIRE -1776 1016 -1776 744
WIRE -1776 1016 -1952 1016
WIRE -1600 1016 -1776 1016
WIRE -192 1304 -192 968
WIRE -1552 1320 -1552 1032
WIRE -1376 1320 -1376 904
WIRE -1120 1320 -1120 904
FLAG -1536 -536 0
FLAG -1360 -536 0
FLAG -2048 -1096 0
FLAG -2000 -1256 VG
FLAG -1536 -1304 VCC
FLAG -1360 -1304 VG
FLAG -176 -552 0
FLAG -2064 -536 0
FLAG -2256 -536 0
FLAG -1104 -536 0
FLAG -1104 -1304 VG
FLAG -2256 -1096 0
FLAG -2208 -1256 VCC
FLAG -1552 376 0
FLAG -1376 376 0
FLAG -1552 -392 VCC
FLAG -1376 -392 VG
FLAG -192 360 0
FLAG -1120 376 0
FLAG -1120 -392 VG
FLAG -1552 1320 0
FLAG -1376 1320 0
FLAG -1552 552 VCC
FLAG -1376 552 VG
FLAG -192 1304 0
FLAG -1120 1320 0
FLAG -1120 552 VG
FLAG 624 -1192 VCC
FLAG 624 -680 0
FLAG -2144 -968 A
FLAG -2000 -840 B
FLAG -336 -1208 O1
FLAG 928 -1192 VCC
FLAG 928 -680 0
FLAG 480 -792 A
FLAG 624 -568 VCC
FLAG 624 -56 0
FLAG 928 -568 VCC
FLAG 928 -56 0
FLAG 480 -168 B
FLAG 1360 -1176 VCC
FLAG 1360 -56 0
FLAG 1680 -1176 VCC
FLAG 1680 -56 0
FLAG 1984 -1176 VCC
FLAG 1984 -56 0
FLAG 2128 -888 O2
SYMBOL voltage -2048 -1192 R0
SYMATTR InstName VCC
SYMATTR Value 7
SYMBOL nmos -1584 -920 R0
SYMATTR InstName M1
SYMATTR Value 2N7002
SYMBOL nmos -1408 -1048 R0
SYMATTR InstName M2
SYMATTR Value 2N7002
SYMBOL nmos -608 -1256 R90
SYMATTR InstName M3
SYMATTR Value 2N7002
SYMBOL nmos -608 -1000 R90
SYMATTR InstName M4
SYMATTR Value 2N7002
SYMBOL nmos -496 -1256 M90
SYMATTR InstName M5
SYMATTR Value 2N7002
SYMBOL nmos -512 -1000 M90
SYMATTR InstName M6
SYMATTR Value 2N7002
SYMBOL res -192 -984 R0
SYMATTR InstName R3
SYMATTR Value 100k
SYMBOL voltage -2256 -744 R0
SYMATTR Value PULSE(0 5 0 10n 10n 90n 200n 10)
SYMATTR InstName IN1
SYMBOL voltage -2064 -744 R0
SYMATTR InstName IN2
SYMATTR Value PULSE(0 5 0 10n 10n 190n 400n 5)
SYMBOL pmos -1584 -1208 M180
SYMATTR InstName M7
SYMATTR Value BSS84
SYMBOL pmos -1408 -1208 M180
SYMATTR InstName M8
SYMATTR Value BSS84
SYMBOL nmos -1152 -1048 R0
SYMATTR InstName M9
SYMATTR Value 2N7002
SYMBOL pmos -1152 -1208 M180
SYMATTR InstName M10
SYMATTR Value BSS84
SYMBOL voltage -2256 -1192 R0
SYMATTR InstName VCC1
SYMATTR Value 5
SYMBOL nmos -1600 -8 R0
SYMATTR InstName M15
SYMATTR Value 2N7002
SYMBOL nmos -1424 -136 R0
SYMATTR InstName M16
SYMATTR Value 2N7002
SYMBOL nmos -624 -344 R90
SYMATTR InstName M17
SYMATTR Value 2N7002
SYMBOL nmos -624 -88 R90
SYMATTR InstName M18
SYMATTR Value 2N7002
SYMBOL res -208 -72 R0
SYMATTR InstName R4
SYMATTR Value 100k
SYMBOL pmos -1600 -296 M180
SYMATTR InstName M21
SYMATTR Value BSS84
SYMBOL pmos -1424 -296 M180
SYMATTR InstName M22
SYMATTR Value BSS84
SYMBOL nmos -1168 -136 R0
SYMATTR InstName M23
SYMATTR Value 2N7002
SYMBOL pmos -1168 -296 M180
SYMATTR InstName M24
SYMATTR Value BSS84
SYMBOL nmos -1600 936 R0
SYMATTR InstName M11
SYMATTR Value 2N7002
SYMBOL nmos -1424 808 R0
SYMATTR InstName M12
SYMATTR Value 2N7002
SYMBOL nmos -512 600 M90
SYMATTR InstName M25
SYMATTR Value 2N7002
SYMBOL nmos -528 856 M90
SYMATTR InstName M26
SYMATTR Value 2N7002
SYMBOL res -208 872 R0
SYMATTR InstName R1
SYMATTR Value 100k
SYMBOL pmos -1600 648 M180
SYMATTR InstName M27
SYMATTR Value BSS84
SYMBOL pmos -1424 648 M180
SYMATTR InstName M28
SYMATTR Value BSS84
SYMBOL nmos -1168 808 R0
SYMATTR InstName M29
SYMATTR Value 2N7002
SYMBOL pmos -1168 648 M180
SYMATTR InstName M30
SYMATTR Value BSS84
SYMBOL nmos 576 -872 R0
SYMATTR InstName M13
SYMATTR Value 2N7002
SYMBOL res 608 -1208 R0
SYMATTR InstName R2
SYMATTR Value 100
SYMBOL nmos 880 -1064 R0
SYMATTR InstName M14
SYMATTR Value 2N7002
SYMBOL res 912 -1208 R0
SYMATTR InstName R5
SYMATTR Value 100
SYMBOL nmos 576 -248 R0
SYMATTR InstName M19
SYMATTR Value 2N7002
SYMBOL res 608 -584 R0
SYMATTR InstName R6
SYMATTR Value 100
SYMBOL nmos 880 -440 R0
SYMATTR InstName M20
SYMATTR Value 2N7002
SYMBOL res 912 -584 R0
SYMATTR InstName R7
SYMATTR Value 100
SYMBOL nmos 1312 -936 R0
SYMATTR InstName M31
SYMATTR Value 2N7002
SYMBOL nmos 1312 -792 R0
SYMATTR InstName M32
SYMATTR Value 2N7002
SYMBOL res 1344 -1192 R0
SYMATTR InstName R8
SYMATTR Value 100
SYMBOL nmos 1632 -600 R0
SYMATTR InstName M33
SYMATTR Value 2N7002
SYMBOL nmos 1632 -456 R0
SYMATTR InstName M34
SYMATTR Value 2N7002
SYMBOL res 1664 -1192 R0
SYMATTR InstName R9
SYMATTR Value 100
SYMBOL nmos 1936 -760 R0
SYMATTR InstName M35
SYMATTR Value 2N7002
SYMBOL nmos 1936 -456 R0
SYMATTR InstName M36
SYMATTR Value 2N7002
SYMBOL res 1968 -1192 R0
SYMATTR InstName R10
SYMATTR Value 100