Logic Simulator -
View Project README
🌙
# Macro Definitions (using only NAND as a primitive gate) # Checksum (Parity) Circuit Example Solution # Computes the parity (XOR of all bits) of input X # Macro definitions (using only NAND as a primitive gate) NOT(x) := NAND(x, x) AND(x,y) := NOT(NAND(x, y)) OR(x,y) := NAND(NOT(x), NOT(y)) XOR(x,y) := OR(AND(NOT(x), y), AND(x, NOT(y))) # Use a D flip-flop to accumulate the running parity # At each step, parity = XOR of previous parity and current bit Y = XOR(D(Y, 0), X)
Inputs (X=101;Y=11):
Steps:
▶
Simulate
Outputs
×
×
Log
×
Score Result
×