* Z:\home\khalils\Downloads\files\data\raw_asc\d578a2f75afd_ADC.asc
* Generated by LTspice 26.0.1 for Windows.
* 2-Bit Analog-Digital-Converter\nOutput shows logical state\nCreated by AblL
D1 C ULED1 1N4148
XU2 Vin Ut2 Ub 0 ULED2 LM339 ;pnba In+)In-)V+)V-)OUT
R1 Ub Ut3 9.7k
R8 Ub Uh 40k
D2 A ULED1 1N4148
D3 ULED1 0 LUW-W5AP
R3 Ut2 Ut1 10.2k
V1 Vin 0
D4 ULED2 0 LUW-W5AP
XU1 Vin Ut3 Ub 0 C LM339 ;pnba In+)In-)V+)V-)OUT
R4 Ut1 0 9.6k
XU3 Vin Ut1 Ub 0 A LM339 ;pnba In+)In-)V+)V-)OUT
R9 Uh 0 10k
R6 Ub ULED2 1k
R2 Ut3 Ut2 10.4k
R7 Ub A 1k
R5 Ub C 1k
XU4 Uh ULED2 Ub 0 A LM339 ;pnba In+)In-)V+)V-)OUT
V2 Ub 0 5V
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.dc V1 0 6 0.2
.inc lib/LM339.LIB
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1136 860
WIRE -48 112 -48 32
WIRE 64 112 -48 112
WIRE 96 112 64 112
WIRE 256 128 256 96
WIRE 256 128 160 128
WIRE 320 128 256 128
WIRE 560 128 320 128
WIRE 736 128 624 128
WIRE 880 128 736 128
WIRE 976 128 880 128
WIRE -192 144 -256 144
WIRE -80 144 -192 144
WIRE 96 144 -80 144
WIRE -368 160 -368 144
WIRE -368 160 -512 160
WIRE -512 176 -512 160
WIRE -368 176 -368 160
WIRE -256 176 -256 144
WIRE 128 176 128 160
WIRE -48 192 -48 112
WIRE 736 192 736 128
WIRE -512 272 -512 256
WIRE -512 272 -560 272
WIRE -368 272 -368 256
WIRE -256 272 -256 256
WIRE -512 288 -512 272
WIRE -48 320 -48 272
WIRE 64 320 -48 320
WIRE 96 320 64 320
WIRE 256 336 256 304
WIRE 256 336 160 336
WIRE 384 336 256 336
WIRE 528 336 384 336
WIRE 880 336 528 336
WIRE 976 336 880 336
WIRE -80 352 -80 144
WIRE 96 352 -80 352
WIRE -512 384 -512 368
WIRE 128 384 128 368
WIRE -48 400 -48 320
WIRE 528 432 528 336
WIRE 544 432 528 432
WIRE 736 448 736 256
WIRE 736 448 608 448
WIRE 544 464 528 464
WIRE 576 496 576 480
WIRE -48 528 -48 480
WIRE 64 528 -48 528
WIRE 96 528 64 528
WIRE 256 544 256 512
WIRE 256 544 160 544
WIRE 384 544 256 544
WIRE 736 544 736 448
WIRE 736 544 384 544
WIRE -80 560 -80 352
WIRE 96 560 -80 560
WIRE 128 592 128 576
WIRE -48 608 -48 528
WIRE -48 704 -48 688
IOPIN 128 96 In
IOPIN 128 304 In
IOPIN 128 512 In
IOPIN 256 16 In
IOPIN 256 224 In
IOPIN 256 432 In
IOPIN 576 416 In
IOPIN 528 464 In
IOPIN -48 -48 In
IOPIN -368 144 Out
IOPIN -560 272 Out
SYMBOL Misc\\EuropeanResistor 240 208 R0
SYMATTR InstName R6
SYMATTR Value 1k
SYMBOL Opamps\\opamp2 576 384 R0
SYMATTR InstName U4
SYMATTR Value LM339
SYMBOL Misc\\EuropeanResistor -64 592 R0
SYMATTR InstName R4
SYMATTR Value 9.6k
SYMBOL Misc\\EuropeanResistor -64 176 R0
SYMATTR InstName R2
SYMATTR Value 10.4k
SYMBOL Misc\\EuropeanResistor -64 384 R0
SYMATTR InstName R3
SYMATTR Value 10.2k
SYMBOL Misc\\EuropeanResistor -528 160 R0
SYMATTR InstName R8
SYMATTR Value 40k
SYMBOL voltage -256 160 R0
SYMATTR InstName V1
SYMATTR Value ""
SYMBOL voltage -368 160 R0
SYMATTR InstName V2
SYMATTR Value 5V
SYMBOL diode 560 144 R270
WINDOW 3 0 32 VBottom 2
WINDOW 0 72 32 VTop 2
SYMATTR Value 1N4148
SYMATTR InstName D1
SYMBOL Opamps\\opamp2 128 64 R0
SYMATTR InstName U1
SYMATTR Value LM339
SYMBOL Opamps\\opamp2 128 272 R0
SYMATTR InstName U2
SYMATTR Value LM339
SYMBOL Misc\\EuropeanResistor 240 0 R0
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL LED 960 128 R0
WINDOW 3 40 75 Left 2
SYMATTR Value LUW-W5AP
SYMATTR InstName D3
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL Opamps\\opamp2 128 480 R0
SYMATTR InstName U3
SYMATTR Value LM339
SYMBOL Misc\\EuropeanResistor -528 272 R0
SYMATTR InstName R9
SYMATTR Value 10k
SYMBOL Misc\\EuropeanResistor -64 -64 R0
SYMATTR InstName R1
SYMATTR Value 9.7k
SYMBOL Misc\\EuropeanResistor 240 416 R0
SYMATTR InstName R7
SYMATTR Value 1k
SYMBOL diode 752 256 R180
WINDOW 3 24 0 Left 2
WINDOW 0 24 64 Left 2
SYMATTR Value 1N4148
SYMATTR InstName D2
SYMBOL LED 960 336 R0
WINDOW 3 40 75 Left 2
SYMATTR Value LUW-W5AP
SYMATTR InstName D4
SYMATTR Description Diode
SYMATTR Type diode
FLAG 128 176 0
FLAG 128 96 Ub
FLAG 128 384 0
FLAG 128 304 Ub
FLAG 128 592 0
FLAG 128 512 Ub
FLAG 256 16 Ub
FLAG 256 224 Ub
FLAG 256 432 Ub
FLAG 576 496 0
FLAG 576 416 Ub
FLAG 528 464 Uh
FLAG -48 -48 Ub
FLAG -48 704 0
FLAG -256 272 0
FLAG -368 272 0
FLAG -368 144 Ub
FLAG -192 144 Vin
FLAG -512 384 0
FLAG -560 272 Uh
FLAG 64 528 Ut1
FLAG 64 320 Ut2
FLAG 64 112 Ut3
FLAG 384 544 A
FLAG 384 336 B
FLAG 320 128 C
FLAG 976 192 0
FLAG 976 400 0
FLAG 880 128 ULED1
FLAG 880 336 ULED2
TEXT -504 536 Left 2 !.dc V1 0 6 0.2
TEXT -504 560 Left 2 !.inc lib/LM339.LIB
TEXT -504 448 Left 2 ;2-Bit Analog-Digital-Converter\nOutput shows logical state\nCreated by AblL