Python program to implement Full Adder Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Prerequisite : Full Adder in Digital LogicGiven three inputs of Full Adder A, B,C-IN. The task is to implement the Full Adder circuit and Print output i.e sum and C-Out of three inputs.Full Adder : A Full Adder is a logical circuit that performs an addition operation on three one-bit binary numbers. The full adder produces a sum of the three inputs and carry value. Logical Expression :SUM = C-IN XOR ( A XOR B )C-0UT = A B + B C-IN + A C-INTruth Table : Examples :Input : 0 1 1Output: Sum = 0, C-Out = 1According to logical expression Sum= C-IN XOR (A XOR B ) i.e 1 XOR (0 XOR 1) =0 , C-Out= A B + B C-IN + A C-IN i.e., 0 AND 1 + 1 AND 1 + 0 AND 1 = 1 Input : 1 0 0Output: Sum = 1, C-Out = 0Approach :We take three inputs A ,B and C-in .Applying C-IN XOR (A XOR B ) gives the value of sumApplying A B + B C-IN + A C-IN gives the value of C-OutBelow is the implementation : Python # python program to implement full adder # Function to print sum and C-Out def getResult(A, B, C): # Calculating value of sum Sum = C ^ (A ^ B) # Calculating value of C-Out C_Out = ( C &( not ( A ^ B ))) | (not A) & B # printing the values print("Sum = ", Sum) print("C-Out = ", C_Out) # Driver code A = 1 B = 0 C = 0 # passing three inputs of fulladder as arguments to get result function getResult(A, B, C) Output :Sum = 1C-Out = 0 Comment More info V vikkycirus Follow Improve Article Tags : Technical Scripter Digital Logic Explore Number SystemsBase Conversions for Number System8 min read1's and 2's complement of a Binary Number8 min readBCD or Binary Coded Decimal6 min readError Detection Codes: Parity Bit Method5 min readBoolean Algebra and Logic GatesLogic Gates - Definition, Types, Uses8 min readBasic Conversion of Logic Gates6 min readRealization of Logic Gate Using Universal gates6 min readCanonical and Standard Form6 min readTypes of Integrated Circuits7 min readMinimization TechniquesMinimization of Boolean Functions4 min readIntroduction of K-Map (Karnaugh Map)4 min read5 variable K-Map in Digital Logic5 min readVarious Implicants in K-Map5 min readDon't Care (X) Conditions in K-Maps4 min readQuine McCluskey Method8 min readTwo Level Implementation of Logic Gates9 min readCombinational CircuitsHalf Adder in Digital Logic3 min readFull Adder in Digital Logic5 min readHalf Subtractor in Digital Logic4 min readFull Subtractor in Digital Logic3 min readParallel Adder and Parallel Subtractor5 min readSequential Binary Multiplier12 min readMultiplexers in Digital Logic10 min readEvent Demultiplexer in Node.js3 min readBinary Decoder in Digital Logic5 min readEncoder in Digital Logic7 min readCode Converters - Binary to/from Gray Code5 min readMagnitude Comparator in Digital Logic7 min readSequential CircuitsIntroduction of Sequential Circuits7 min readDifference between Combinational and Sequential Circuit4 min readLatches in Digital Logic7 min readFlip-Flop types, their Conversion and Applications7 min readConversion of Flip-FlopConversion of S-R Flip-Flop into D Flip-Flop1 min readConversion of S-R Flip-Flop into T Flip-Flop1 min readConversion of J-K Flip-Flop into T Flip-Flop1 min readConversion of J-K Flip-Flop into D Flip-Flop4 min readRegister, Counter, and Memory UnitCounters in Digital Logic4 min readRipple Counter in Digital Logic5 min readRing Counter in Digital Logic7 min readGeneral Purpose Registers8 min readShift Registers in Digital Logic8 min readComputer Memory9 min readRandom Access Memory (RAM)11 min readRead Only Memory (ROM)8 min readLMNs and GATE PYQsLMN - Digital Electronics14 min readDigital Logic and Design - GATE CSE Previous Year Questions2 min read Like