Python 3 Script to Implement Full Adder in Digital Logic

Python 3 Script to Implement Full Adder in Digital Logic

Python 3 Script to Implement Full Adder in Digital Logic

# 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)
    C
    # Calculating value of C-Out
    C_Out = Bin&(not(A ^ B))| not(A)&B

    # printing the values
    print("Sum = ", Sum)
    print("C-Out = ", C_Out)


# Driver code
A = 0
B = 0
C = 1
# passing three inputs of fulladder as arguements to get result function
getResult(A, B, C)
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment