* Z:\home\khalils\Downloads\files\data\raw_asc\fd89a11dc457_Logic-gates-diodes-transistors.asc
* Generated by LTspice 26.0.1 for Windows.
* AND gate
* OR gate
* Logic gates with diodes and transistors
* NOT gate
* XOR gate
Q1 NOT_out N004 0 0 2N3904
R12 Vcc XOR_out 10k
R16 Vcc N001 10k
V3 Signal_2 0 PULSE(0 12 0.5 1n 1n 1 2 1)
Q8 N001 N005 Signal_1 0 2N3904
Q6 XOR_out N003 0 0 2N3904
D1 Signal_1 OR_out 1N4148
R2 Vcc AND_out 10k
R4 N004 Signal_1 1k
Q7 N001 N002 Signal_2 0 2N3904
R3 Vcc NOT_out 10k
R13 N003 N001 1k
D4 AND_out Signal_2 1N4148
D3 AND_out Signal_1 1N4148
R14 N005 Signal_2 10k
R1 OR_out 0 10k
R15 N002 Signal_1 10k
D2 Signal_2 OR_out 1N4148
V1 Vcc 0 12
V2 Signal_1 0 PULSE(0 12 0 1n 1n 1 2 1)
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.tran 3
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1880 1556
WIRE -240 -96 -240 -128
WIRE -96 -96 -96 -112
WIRE 240 -96 240 -112
WIRE -240 16 -240 -16
WIRE -96 16 -96 -16
WIRE 240 16 240 -16
WIRE -128 192 -192 192
WIRE 16 192 -64 192
WIRE 112 192 16 192
WIRE 576 240 576 192
WIRE -128 304 -192 304
WIRE 16 304 16 192
WIRE 16 304 -64 304
WIRE 16 368 16 304
WIRE 448 368 384 368
WIRE 576 368 576 320
WIRE 576 368 512 368
WIRE 16 480 16 448
WIRE 448 480 384 480
WIRE 576 480 576 368
WIRE 576 480 512 480
WIRE 672 480 576 480
WIRE 1024 688 1024 640
WIRE 64 736 64 688
WIRE 656 736 576 736
WIRE 752 736 752 704
WIRE 352 784 336 784
WIRE 384 784 352 784
WIRE 512 784 464 784
WIRE 1024 784 1024 768
WIRE 1088 784 1024 784
WIRE 1024 800 1024 784
WIRE 64 832 64 816
WIRE 128 832 64 832
WIRE 64 848 64 832
WIRE 656 848 656 736
WIRE 752 848 752 816
WIRE 752 848 656 848
WIRE 832 848 752 848
WIRE 960 848 912 848
WIRE -128 896 -176 896
WIRE 0 896 -48 896
WIRE 752 896 752 848
WIRE 1024 928 1024 896
WIRE 576 944 576 832
WIRE 576 944 528 944
WIRE 592 944 576 944
WIRE 688 944 672 944
WIRE 64 976 64 944
WIRE 352 1008 352 784
WIRE 752 1008 752 992
WIRE 752 1008 352 1008
RECTANGLE Normal 224 544 -336 80 2
RECTANGLE Normal 848 544 224 80 2
RECTANGLE Normal 224 1040 -336 544 2
RECTANGLE Normal 1264 1040 224 544 2
SYMBOL res -32 880 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL voltage -96 -112 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 12 0 1n 1n 1 2 1)
SYMBOL npn 688 896 R0
SYMATTR InstName Q8
SYMATTR Value 2N3904
SYMBOL npn 512 736 R0
SYMATTR InstName Q7
SYMATTR Value 2N3904
SYMBOL diode -128 320 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value 1N4148
SYMBOL res 0 352 R0
SYMATTR InstName R1
SYMATTR Value 10k
SYMBOL res 1008 672 R0
SYMATTR InstName R12
SYMATTR Value 10k
SYMBOL res 736 720 R0
SYMATTR InstName R16
SYMATTR Value 10k
SYMBOL res 560 224 R0
SYMATTR InstName R2
SYMATTR Value 10k
SYMBOL voltage 240 -112 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value PULSE(0 12 0.5 1n 1n 1 2 1)
SYMBOL npn 0 848 R0
SYMATTR InstName Q1
SYMATTR Value 2N3904
SYMBOL res 928 832 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R13
SYMATTR Value 1k
SYMBOL diode 512 352 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D3
SYMATTR Value 1N4148
SYMBOL res 688 928 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R14
SYMATTR Value 10k
SYMBOL res 48 720 R0
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL npn 960 800 R0
SYMATTR InstName Q6
SYMATTR Value 2N3904
SYMBOL diode 512 464 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D4
SYMATTR Value 1N4148
SYMBOL diode -128 208 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL res 480 768 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R15
SYMATTR Value 10k
SYMBOL voltage -240 -112 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12
FLAG 16 480 0
FLAG -96 16 0
FLAG -240 16 0
FLAG -240 -128 Vcc
FLAG 576 192 Vcc
FLAG 240 16 0
FLAG -96 -112 Signal_1
FLAG 240 -112 Signal_2
FLAG -192 192 Signal_1
FLAG 384 368 Signal_1
FLAG -192 304 Signal_2
FLAG 384 480 Signal_2
FLAG 672 480 AND_out
FLAG 112 192 OR_out
FLAG 64 688 Vcc
FLAG 64 976 0
FLAG -176 896 Signal_1
FLAG 128 832 NOT_out
FLAG 1024 640 Vcc
FLAG 1024 928 0
FLAG 752 704 Vcc
FLAG 336 784 Signal_1
FLAG 528 944 Signal_2
FLAG 1088 784 XOR_out
TEXT 656 -16 Left 2 !.tran 3
TEXT 488 104 Left 2 ;AND gate
TEXT -112 104 Left 2 ;OR gate
TEXT -160 -312 Left 4 ;Logic gates with diodes and transistors
TEXT -104 584 Left 2 ;NOT gate
TEXT 560 592 Left 2 ;XOR gate