Home / Learn Verilog / Restoring Divider
Restoring Divider
Long division in hardware.
Quick summaryLong division in hardware.
How to think about this
The basic idea
Shift in one bit at a time, subtract the divisor; keep result if non-negative else restore.
Why this comes up
Integer division unit.
The mechanics
N iterations for N bits.
Where it is used
- Everyday RTL design
- FPGA and ASIC projects
- Testbenches and debugging
Try it
Divide 8 by 4 bitsVerilog: edit and run
Correct: 13 remainder 1.
Quick check
1. Restoring divider yields...
Both.