Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def adder(a, b, c_in):
- half = lambda a, b: a^b, a&b
- xor1 = a^b
- xor2 = xor1^c_in
- and1 = xor1&c_in
- and2 = a&b
- cOut = and1|and2
- return xor2, cOut
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement