Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
7400 Series TTL solution in Creative category for Boolean Algebra by Tinus_Trotyl
def boolean(x, y, operation):
NAND = lambda a, b: not(a and b) # 7400 - TTL Quad NAND Gate
return eval( {"conjunction":
"NAND(NAND(x, y), 1)",
"disjunction":
"NAND(NAND(x, 1), NAND(y, 1))",
"exclusive" :
"NAND(NAND(x, NAND(x, y)), NAND(y, NAND(x, y)))",
"implication":
"boolean(NAND(x, 1), y, 'disjunction')",
"equivalence":
"NAND(boolean(x, y, 'exclusive'), 1)" }
[operation] )
Oct. 13, 2017