Nepedia
Back to Discover
Independent Reader
💻

Subtractor

technology Maturity 7-9 Next article →

Computers use digital circuits to do math. One type of circuit is a subtractor. It is used to take numbers away.

Half Subtractor Vektor
Half Subtractor Vektor

A half subtractor is a simple part. It works with two bits. These are the inputs. One input is the minuend. The other is the subtrahend. The circuit gives two outputs. One is the difference. The other is the borrow out. A borrow out happens if the second bit is bigger.

Half subtractor using NAND
Half subtractor using NAND

Sometimes math needs more bits. A full subtractor is used for this. It works with three bits. It uses the two main bits. It also uses a borrow in. This borrow in comes from a previous step. The full subtractor finds the difference and a new borrow out.

Full-sub-Fixed
Full-sub-Fixed

In a full subtractor, a borrow out is set if the second bit is bigger. This is like how we subtract on paper. If we borrow, we add 2 to the current digit. This helps the circuit find the right answer.

161 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:Half Subtractor Vektor.svg
Half Subtractor Vektor.svg
File:Half subtractor using NAND.jpg
Half subtractor using NAND.jpg
File:Full-sub-Fixed.svg
Full-sub-Fixed.svg
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.