Number system and binary code problems
How a circuit stores a number decides what its arithmetic looks like. These problems cover the representations a digital course teaches, and then build the converters between them.
73 problems5 free to solve20 easy, 33 medium, 20 hard
The circuit problems make the point concrete: a BCD counter that has to skip six states, a Gray code counter whose outputs change one bit at a time, a converter from excess 3 back to BCD.
What these problems cover
- Binary, octal, hexadecimal and binary fractions
- BCD and excess 3 codes, and converting between them
- Gray code and why encoders and FIFOs use it
- Sign magnitude, one's complement and two's complement
- Overflow in signed and unsigned addition
Free to start
Solve these with a free account. Every other statement on this page is free to read.
Problems by track
Digital Foundations32
- Hex Nibble to Binary
- Binary to Hex
- Decimal to Binary Using Repeated Division
- Binary Fraction to Decimal
- Decimal Fraction to Binary
- Decimal to Octal
- Octal to Binary via Grouping
- Hex to Octal via Binary
- BCD vs Binary: Identify the Valid Code
- Decimal to BCD Encoding
- BCD Addition with Carry Correction
- Why the BCD Correction Factor Is 6
Combinational Building Blocks3
Latches and Flip-Flops1
Counters19
- Mod-10 Counter: Synchronous Reset Decode
- Mod-60 Counter
- BCD Decade Counter: Synchronous Reset Construction
- BCD Counter: Full Decade Waveform
- BCD Counter: Carry Out for Cascade
- Two-Digit BCD Counter
- BCD Counter: Self-Correction from Invalid States
- BCD Counter: State 12 Lockup Debug
- BCD Counter: Reset at 8 Instead of 10 Debug
- BCD Counter with Enable: Count Preservation
- 4-Digit BCD Counter: 0000 to 9999
- BCD Counter Gate Count Analysis: Simplified vs. Binary
Arithmetic and ALU Design4
Interview Circuit1
Datapath Design1
Memory and Storage1
Clock Domain Crossing and Synchronization6
More problems5
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
- Are these conversion drills?
- Some are, for the representations themselves. Most turn the representation into a circuit, such as a code converter or a counter that counts in that code, and check it on the simulator.