Combinational circuit design problems
Combinational blocks are the vocabulary of every larger design. These problems build each one from gates, then build bigger ones out of smaller ones: a 4 to 1 mux from three 2 to 1 muxes, a 4 to 16 decoder from 2 to 4 decoders.
146 problems18 free to solve29 easy, 76 medium, 41 hard
The RTL problems write the same blocks in Verilog, where the questions shift to priority, defaults and the latches a missing else infers.
What these problems cover
- Multiplexers, and any function built from one
- Decoders and encoders with enables, and cascading them
- Priority encoders
- Magnitude comparators
- Code converters and seven segment decoders
- Combinational always blocks without inferred latches
Free to start
Solve these with a free account. Every other statement on this page is free to read.
Problems by track
Combinational Building Blocks42
- Build a Half Adder from Gates
- Full Adder from Half Adders
- Carry-Out of a 1-bit Full Adder (Gate-Level)
- NAND-only Full Adder
- 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
- Signed Overflow Detection in Two's Complement Addition
- 4-Bit Ripple Carry Adder
Combinational RTL15
- The Incomplete Sensitivity List Fallback
- Intermediate Variables in Combinational Blocks
- Priority Routing via If Else
- Tristate Bus Driver
- Instruction Decoder using Casez
- Parameterized Equality Comparator
- Decoder with Enable Logic
- Binary to Gray Code Datapath
- Find First One Priority Encoder
- Variable Indexed Part Select
- Signed Arithmetic and Sign Extension
- Bitwise versus Logical Negation
Digital Foundations1
Gate-Level Logic1
Latches and Flip-Flops2
Counters6
Shift Registers13
- 4-Bit SISO with Shift Enable
- 4-Bit PISO: MUX-at-D Construction
- PISO: Programmable Start Position
- PISO vs. Multiplexer: Design Trade-off Analysis
- PIPO with LOAD and SHIFT Capability
- PIPO: Load and Shift Priority When Both Asserted
- 4-Bit Universal Shift Register: Four-Mode Design
- 4-Bit Bidirectional Shift Register: Basic Construction
- Universal Shift Register
- Bidirectional SR: Inverted DIR Signal Debug
- Bidirectional SR: Serial Inputs at Both Ends
- Bidirectional SR: Barrel-Shift Emulation
Finite State Machines2
Arithmetic and ALU Design5
Datapath and Storage7
Clocking and Synchronization6
Fault Testing and Verification5
Interface and Communication Circuits3
Interview Circuit1
Verilog Syntax and Language Basics1
Synthesis Intuition2
Datapath Design4
Pipelining1
Clock Domain Crossing and Synchronization1
Interview Circuit1
More problems27
- 1-Bit Magnitude Comparator
- 2:4 Decoder with Active-High Enable
- D Latch from a 2:1 MUX
- Four-Bit Bus Multiplexer
- The Deeply Nested Latch
- 4-bit Equality Comparator (Gate-Level)
- 4-to-1 Multiplexer from 2-to-1 Mux Primitives
- 4-to-2 Priority Encoder from Gates
- Debug 1:4 Demultiplexer
- Debug 3:8 Decoder Enable Logic
- Debug 7-Segment Decoder Segment G
- Debug 8:1 MUX Function Generator
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
- How is a combinational circuit checked?
- Against its truth table. Circuit problems run every input combination the test vectors list; Verilog problems run the testbench and show each case you got wrong.
- Why does my Verilog mux synthesize a latch?
- An output not assigned on every path through a combinational always block has to remember its old value. Give it a default or cover every case, and the schematic view will show the latch disappear.