Arithmetic circuit and ALU design problems
Arithmetic is where gate count and delay start to matter. These problems build the half adder and full adder, chain them into a ripple carry adder, then make it faster with carry lookahead and carry select.
125 problems15 free to solve22 easy, 65 medium, 38 hard
From there they move to subtraction, overflow and signed numbers, BCD addition and its correction step, array multipliers and an ALU with a function select, in circuits and in Verilog.
What these problems cover
- Half and full adders and subtractors
- Ripple carry, carry lookahead and carry select adders
- Two's complement subtraction, overflow and saturation
- BCD adders and their correction logic
- Array multipliers and accumulators
- ALU slices and ALUs with flags
Free to start
Solve these with a free account. Every other statement on this page is free to read.
Problems by track
Arithmetic and ALU Design32
- Two's Complement Inverter
- Adder Subtractor Mode Control
- Signed Overflow Detection
- Sign Extension Array
- Generate and Propagate Logic
- 4-bit Carry Lookahead Block
- Carry Select Adder Multiplexer Stage
- Ripple Carry Critical Path Analysis
- 1-Bit ALU Slice
- ALU Zero Flag Logic
- ALU Less Than Flag Logic
- ALU Flag Evaluation Branch Logic
Digital Foundations18
- Binary Fraction to Decimal
- BCD Addition with Carry Correction
- Why the BCD Correction Factor Is 6
- Sign-Magnitude Representation
- The Two Zeros Problem in Sign-Magnitude
- Two's Complement: Encode a Negative Decimal
- Positional Weight Reasoning: Why the MSB of Two's Complement Is Negative
- Two's Complement Range Asymmetry
- Negating the Most Negative Two's Complement Number
- Two's Complement Subtraction via Addition
- Two's Complement Shortcut: Rightmost-1 Rule
- Sign Extension
Combinational Building Blocks16
- Build a Half Adder from Gates
- Full Adder from Half Adders
- Carry-Out of a 1-bit Full Adder (Gate-Level)
- Debug a Full Adder Where Sum and Carry Outputs Are Swapped at the Output Pins
- Build a Half Subtractor
- Full Subtractor from Half Subtractors
- Debug a Full Subtractor with Wrong Borrow Expression
- 4-Bit 2's Complement Adder/Subtractor
- Debug 2-Bit Adder/Subtractor
- 4-Bit Ripple Carry Adder
- BCD Adder with Dual Correction Conditions
- Build a 4-Bit Magnitude Comparator Using Cascaded 1-Bit Stages
Counters1
Shift Registers1
Datapath and Storage1
Clocking and Synchronization3
Interview Circuit4
Verilog Syntax and Language Basics4
Combinational RTL3
Sequential RTL1
FSM Coding1
Synthesis Intuition6
Datapath Design13
- 8-bit ALU with Flags
- Signed versus Unsigned Comparison ALU
- 4x4 Array Multiplier from Gates
- 16-bit Sequential Multiplier
- Absolute Value with Bit Growth
- 8-bit Combinational Popcount
- Two's Complement Overflow in Subtraction
- Two's Complement Overflow Detection
- Q8.8 Truncation with Round Half Up
- Q8.8 Truncation with Convergent Rounding
- Fixed Point Multiplication with Saturation
- Four-Sample Moving Average
Pipelining3
Debug and Verification1
More problems17
- Four-Bit Bus Adder
- Half Adder Using Only XOR and AND
- Odd Parity Bit Generator for 3-bit Data
- 2x2 Combinational Multiplier
- 4-Bit Overflow Detector
- Debug Full Adder Carry Logic
- Excess-3 to BCD Converter
- Floor(Log2(N)) for 4-bit Input
- Full Adder Using Only NAND Gates
- 1-bit ALU with Function Select (AND / OR / XOR / ADD)
- 16-Bit Ripple Carry Adder
- 4-Bit Carry Lookahead Adder
How your answer is checked
Circuit problems run on the circuit simulator against the problem's test vectors, clocked cycle by cycle when they are sequential. Verilog problems are compiled with Icarus Verilog and run against a testbench, with the waveform and the Yosys schematic beside the result. Analysis questions are checked against their answer key.
Questions
- Do these check speed or only correctness?
- Correctness first: every case in the test vectors or testbench has to pass. Some problems then ask about the critical path or gate count, and RTL problems show the cell count Yosys gets from your design.
- Which order should I solve them in?
- The Arithmetic and ALU Design track orders them, from the full adder to the ALU. The Datapath Design track continues in Verilog.