* Z:\home\khalils\Downloads\files\data\raw_asc\0960c8dd6afe_4_Bit_Adder.asc
* Generated by LTspice 26.0.1 for Windows.
* Adding in Binary
* 111 (carry)
* 11100
* +
* 10110
* 110010
* All Operations
* 0 + 0 = 00\n0 + 1 = 01\n1 + 0 = 01\n1 + 1 = 10
* A
* B
* 1 + 0 + 0 = 01\n1 + 0 + 1 = 10\n1 + 1 + 0 = 10\n1 + 1 + 1 = 11
* carry
* A
* B
* Carry
* Sum
* Carry
* Full Adder
* 1110 A\n+\n0100 B\n--------\n10010
* Starting with the least significant bit.
* 0
* 1
* 2
* 3
* 4 Bit Adder
A1 N002 0 0 0 N007 0 N004 0 XOR
A2 N004 0 0 0 N009 0 N006 0 XOR
A3 N007 0 0 0 N002 0 N015 0 AND
A4 N009 0 0 0 N004 0 N011 0 AND
A5 N011 0 0 0 N015 0 N013 0 OR
A6 N003 0 0 0 N008 0 N005 0 XOR
A7 N005 0 0 0 N010 0 Sum0 0 XOR
A8 N008 0 0 0 N003 0 N016 0 AND
A9 N010 0 0 0 N005 0 N012 0 AND
A10 N012 0 0 0 N016 0 N014 0 OR
A11 N017 0 0 0 N019 0 N018 0 XOR
A12 N018 0 0 0 N014 0 Sum1 0 XOR
A13 N019 0 0 0 N017 0 N022 0 AND
A14 N014 0 0 0 N018 0 N020 0 AND
A15 N020 0 0 0 N022 0 N021 0 OR
A16 N023 0 0 0 N025 0 N024 0 XOR
A17 N024 0 0 0 N021 0 Sum2 0 XOR
A18 N025 0 0 0 N023 0 N028 0 AND
A19 N021 0 0 0 N024 0 N026 0 AND
A20 N026 0 0 0 N028 0 N027 0 OR
A21 N029 0 0 0 N031 0 N030 0 XOR
A22 N030 0 0 0 N027 0 Sum3 0 XOR
A23 N031 0 0 0 N029 0 N033 0 AND
A24 N027 0 0 0 N030 0 N032 0 AND
A25 N032 0 0 0 N033 0 Cout 0 OR
VB1 N019 0 0
VCin N010 0 0
VA0 N003 0 0
VB0 N008 0 0
VA1 N017 0 1
VB2 N025 0 1
VA3 N029 0 1
VA2 N023 0 1
VB3 N031 0 0
.tran 1
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1116 3096
WIRE 336 304 144 304
WIRE 368 720 272 720
WIRE 464 720 368 720
WIRE -1264 736 -1264 656
WIRE -1104 736 -1264 736
WIRE -1008 736 -1104 736
WIRE 640 736 528 736
WIRE 720 736 640 736
WIRE -832 752 -944 752
WIRE -752 752 -832 752
WIRE 1024 752 784 752
WIRE -448 768 -688 768
WIRE 416 784 272 784
WIRE 464 784 416 784
WIRE -1424 800 -1424 656
WIRE -1056 800 -1424 800
WIRE -1008 800 -1056 800
WIRE 688 800 592 800
WIRE 720 800 688 800
WIRE -784 816 -880 816
WIRE -752 816 -784 816
WIRE 592 880 592 800
WIRE 592 880 272 880
WIRE 688 880 688 800
WIRE 720 880 688 880
WIRE -880 896 -880 816
WIRE -880 896 -1504 896
WIRE -784 896 -784 816
WIRE -752 896 -784 896
WIRE 864 896 784 896
WIRE -608 912 -688 912
WIRE -1504 928 -1504 896
WIRE 864 928 864 896
WIRE 896 928 864 928
WIRE -608 944 -608 912
WIRE -576 944 -608 944
WIRE 640 944 640 736
WIRE 720 944 640 944
WIRE 1024 944 960 944
WIRE -832 960 -832 752
WIRE -752 960 -832 960
WIRE -448 960 -512 960
WIRE 416 976 416 784
WIRE 464 976 416 976
WIRE -1056 992 -1056 800
WIRE -1008 992 -1056 992
WIRE 896 992 528 992
WIRE -576 1008 -944 1008
WIRE 368 1040 368 720
WIRE 464 1040 368 1040
WIRE -1104 1056 -1104 736
WIRE -1008 1056 -1104 1056
WIRE -448 1184 -448 960
WIRE -448 1184 -1584 1184
WIRE -1344 1408 -1344 1328
WIRE -1184 1408 -1344 1408
WIRE -1088 1408 -1184 1408
WIRE -912 1424 -1024 1424
WIRE -832 1424 -912 1424
WIRE -448 1440 -768 1440
WIRE -1504 1472 -1504 1328
WIRE -1136 1472 -1504 1472
WIRE -1088 1472 -1136 1472
WIRE -864 1488 -960 1488
WIRE -832 1488 -864 1488
WIRE -1584 1568 -1584 1184
WIRE -960 1568 -960 1488
WIRE -960 1568 -1584 1568
WIRE -864 1568 -864 1488
WIRE -832 1568 -864 1568
WIRE -688 1584 -768 1584
WIRE -688 1616 -688 1584
WIRE -656 1616 -688 1616
WIRE -912 1632 -912 1424
WIRE -832 1632 -912 1632
WIRE -432 1632 -592 1632
WIRE -1136 1664 -1136 1472
WIRE -1088 1664 -1136 1664
WIRE -656 1680 -1024 1680
WIRE -1184 1728 -1184 1408
WIRE -1088 1728 -1184 1728
WIRE -432 1856 -432 1632
WIRE -432 1856 -1568 1856
WIRE -1328 2080 -1328 2000
WIRE -1168 2080 -1328 2080
WIRE -1072 2080 -1168 2080
WIRE -896 2096 -1008 2096
WIRE -816 2096 -896 2096
WIRE -512 2112 -752 2112
WIRE -1488 2144 -1488 2000
WIRE -1120 2144 -1488 2144
WIRE -1072 2144 -1120 2144
WIRE -848 2160 -944 2160
WIRE -816 2160 -848 2160
WIRE -1568 2240 -1568 1856
WIRE -944 2240 -944 2160
WIRE -944 2240 -1568 2240
WIRE -848 2240 -848 2160
WIRE -816 2240 -848 2240
WIRE -672 2256 -752 2256
WIRE -672 2288 -672 2256
WIRE -640 2288 -672 2288
WIRE -896 2304 -896 2096
WIRE -816 2304 -896 2304
WIRE -448 2304 -576 2304
WIRE -1120 2336 -1120 2144
WIRE -1072 2336 -1120 2336
WIRE -640 2352 -1008 2352
WIRE -1168 2400 -1168 2080
WIRE -1072 2400 -1168 2400
WIRE -448 2544 -448 2304
WIRE -448 2544 -1584 2544
WIRE -1344 2768 -1344 2688
WIRE -1184 2768 -1344 2768
WIRE -1088 2768 -1184 2768
WIRE -912 2784 -1024 2784
WIRE -832 2784 -912 2784
WIRE -528 2800 -768 2800
WIRE -1504 2832 -1504 2688
WIRE -1136 2832 -1504 2832
WIRE -1088 2832 -1136 2832
WIRE -864 2848 -960 2848
WIRE -832 2848 -864 2848
WIRE -1584 2928 -1584 2544
WIRE -960 2928 -960 2848
WIRE -960 2928 -1584 2928
WIRE -864 2928 -864 2848
WIRE -832 2928 -864 2928
WIRE -688 2944 -768 2944
WIRE -688 2976 -688 2944
WIRE -656 2976 -688 2976
WIRE -912 2992 -912 2784
WIRE -832 2992 -912 2992
WIRE -528 2992 -592 2992
WIRE -1136 3024 -1136 2832
WIRE -1088 3024 -1136 3024
WIRE -656 3040 -1024 3040
WIRE -1184 3088 -1184 2768
WIRE -1088 3088 -1184 3088
SYMBOL Digital\\and -976 960 R0
SYMATTR InstName A8
SYMBOL voltage -1424 672 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VB0
SYMATTR Value 0
SYMBOL voltage -1344 1344 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VA1
SYMATTR Value 1
SYMBOL Digital\\and -720 864 R0
SYMATTR InstName A9
SYMBOL Digital\\and -1040 2304 R0
SYMATTR InstName A18
SYMBOL Digital\\or -624 2944 R0
SYMATTR InstName A25
SYMBOL Digital\\xor -1040 1376 R0
SYMATTR InstName A11
SYMBOL Digital\\xor -1024 2048 R0
SYMATTR InstName A16
SYMBOL voltage -1344 2704 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VA3
SYMATTR Value 1
SYMBOL Digital\\or 928 896 R0
SYMATTR InstName A5
SYMBOL Digital\\and -1056 2992 R0
SYMATTR InstName A23
SYMBOL Digital\\and 752 848 R0
SYMATTR InstName A4
SYMBOL voltage -1488 2016 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VB2
SYMATTR Value 1
SYMBOL voltage -1504 912 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Cin
SYMATTR Value 0
SYMBOL Digital\\xor -784 1392 R0
SYMATTR InstName A12
SYMBOL Digital\\and 496 944 R0
SYMATTR InstName A3
SYMBOL Digital\\xor -960 704 R0
SYMATTR InstName A6
SYMBOL Digital\\and -1056 1632 R0
SYMATTR InstName A13
SYMBOL Digital\\xor -704 720 R0
SYMATTR InstName A7
SYMBOL Digital\\xor 512 688 R0
SYMATTR InstName A1
SYMBOL voltage -1504 2704 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VB3
SYMATTR Value 0
SYMBOL Digital\\and -800 1536 R0
SYMATTR InstName A14
SYMBOL Digital\\and -784 2208 R0
SYMATTR InstName A19
SYMBOL Digital\\or -608 2256 R0
SYMATTR InstName A20
SYMBOL Digital\\or -624 1584 R0
SYMATTR InstName A15
SYMBOL Digital\\xor 768 704 R0
SYMATTR InstName A2
SYMBOL Digital\\xor -1040 2736 R0
SYMATTR InstName A21
SYMBOL Digital\\or -544 912 R0
SYMATTR InstName A10
SYMBOL voltage -1264 672 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VA0
SYMATTR Value 0
SYMBOL voltage -1504 1344 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VB1
SYMATTR Value 0
SYMBOL Digital\\and -800 2896 R0
SYMATTR InstName A24
SYMBOL Digital\\xor -768 2064 R0
SYMATTR InstName A17
SYMBOL voltage -1328 2016 R180
WINDOW 0 24 96 Left 2
WINDOW 3 24 16 Left 2
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName VA2
SYMATTR Value 1
SYMBOL Digital\\xor -784 2752 R0
SYMATTR InstName A22
FLAG -1424 576 0
FLAG -1264 576 0
FLAG -1504 1008 0
FLAG -1504 1248 0
FLAG -1344 1248 0
FLAG -448 768 Sum0
FLAG -1488 1920 0
FLAG -1328 1920 0
FLAG -448 1440 Sum1
FLAG -512 2112 Sum2
FLAG -1504 2608 0
FLAG -1344 2608 0
FLAG -528 2800 Sum3
FLAG -528 2992 Cout
TEXT 96 88 Left 4 ;Adding in Binary
TEXT 168 216 Left 2 ;111  (carry)
TEXT 184 248 Left 2 ;11100
TEXT 152 272 Left 2 ;+
TEXT 184 280 Left 2 ;10110
TEXT 168 320 Left 2 ;110010
TEXT 680 88 Left 3 ;All Operations
TEXT 776 176 Left 2 ;0 + 0 = 00\n0 + 1 = 01\n1 + 0 = 01\n1 + 1 = 10
TEXT 776 136 Left 2 ;A
TEXT 824 136 Left 2 ;B
TEXT 728 304 Left 2 ;1 + 0 + 0 = 01\n1 + 0 + 1 = 10\n1 + 1 + 0 = 10\n1 + 1 + 1 = 11
TEXT 640 336 Left 2 ;carry
TEXT 248 720 Left 2 ;A
TEXT 248 784 Left 2 ;B
TEXT 208 872 Left 2 ;Carry
TEXT 1040 752 Left 2 ;Sum
TEXT 1048 944 Left 2 ;Carry
TEXT 568 632 Left 3 ;Full Adder
TEXT -1928 544 Left 4 ;1110    A\n+\n0100    B\n--------\n10010
TEXT -1536 512 Left 2 ;Starting with the least significant bit.
TEXT -1848 496 Left 2 ;0
TEXT -1872 496 Left 2 ;1
TEXT -1896 496 Left 2 ;2
TEXT -1920 496 Left 2 ;3
TEXT -1930 1066 Left 2 !.tran 1
TEXT -1176 360 Left 5 ;4 Bit Adder