Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Four-bit adder and synthesized structure

Hardware interview practice

Four-bit adder and synthesized structure

EasyRTL ArithmeticSystemVerilog

Write a synthesizable 4-bit unsigned adder with carry-in and carry-out, then explain the ripple-carry structure and its critical path.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Starting point

Question code

module add4 (
  input  logic [3:0] a, b,
  input  logic       cin,
  output logic [3:0] sum,
  output logic       cout
);
Reviewed example

Work through one case

Input
a=4'd15, b=4'd1, cin=0
Expected output
cout=1, sum=4'd0

The fifth result bit must not be discarded.

What to cover

Requirements

  1. Preserve the complete 5-bit result.
  2. Describe a four-stage full-adder carry chain.
  3. Explain propagate and generate terms.
  4. Contrast ripple carry with a carry-lookahead structure.
asic.fyi · Learn silicon end to end.info@asic.fyi