DigiFlop

Three-bit subtraction: A, B, and a borrow coming in.

Verilog Coding Exercise · Combinational I
Full Subtractor
Three-bit subtraction: A, B, and a borrow coming in.

Subtracts B and an incoming borrow Bin from A, producing DIFF and BOUT — the building block for multi-bit binary subtraction.

Boolean expressionsDIFF = A ⊕ B ⊕ Bin, BOUT = A′B + A′Bin + B·Bin
▶ Try the interactive version