Lab 4.
Subtract with
borrows.
On a 3D digital logic trainer with a real breadboard, build the half and full subtractor from gates and chain them into a 4-bit subtractor. Then subtract with full adders the way a computer does: invert B and add one.
Read the concepts first →Your details
Free to use, no sign up. Your name is only printed on your own lab sheet, and your work is saved in this browser so you can continue later. Nothing is sent to a server.
Full Subtractor and 4-Bit Binary Subtractor
This virtual lab builds subtractors on a 3D digital logic trainer with a real breadboard. You make a half subtractor and a full subtractor from gates, chain them into a 4 bit subtractor, and read the difference and borrow bits on the LEDs.
Then you subtract the way a computer does: invert every bit of B and add one with full adders, which is two's complement subtraction. The last task turns the 74283 into an adder and subtractor with one control line and XOR gates, the same idea used inside a processor's arithmetic unit.

What you do on this bench
- Build a half subtractor and a full subtractor and fill in their truth tables.
- Chain them into a 4 bit parallel subtractor.
- Build a 4 bit subtractor from full adders by inverting B and setting the first carry to 1.
- Wire the 74283 with XOR gates on B so one switch selects add or subtract.
- Check results that are positive, zero and negative.
On the bench
- Digital logic trainer with 16 toggle switches, 16 LEDs, pulse switches, a clock and a two digit seven segment display
- Full size breadboard with power rails and jumper wires that are wired pin by pin
- Cabinet of TTL chips with real pinouts (7400 series)
- Logic probe, multimeter and a binder of chip data sheets
Free, runs in the browser, no sign up and nothing to install. A computer with a graphics card gives the smoothest 3D view.
Questions students ask
What are the full subtractor equations?
Difference = A XOR B XOR Bin, and Borrow = A'B + A'Bin + B Bin. The borrow is 1 when the bits being taken away are larger than A.
How do adders subtract?
A - B equals A plus the two's complement of B. The two's complement is every bit of B inverted, plus one, so the adder's carry input supplies the extra one.
What does the carry out mean after a subtraction?
With two's complement subtraction of unsigned numbers, a carry out of 1 means the result is positive or zero; a carry out of 0 means B was larger and the result is negative.
Read the concepts page for this lab · All Digital Logic Design virtual labs · All articles