Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
  • Combinational Design25
    • Combinational Timing Overview
    • Muxes, Decoders and Encoders
    • Arithmetic Blocks
      • Adder Building Blocks
      • Ripple Carry and Carry Lookahead
      • Shift-Add Multiplier
      • Wallace-Tree Multiplier Intuition
    • Comparators and Shifters
    • Tri-State and Shared Buses
    • Latch Inference
    • Arithmetic Datapaths
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Combinational Design
  1. Topics
  2. RTL Design
  3. Combinational Design
  4. Arithmetic Blocks

Part 2 · Combinational · Intermediate

Arithmetic Blocks

Write + and * with intent: what hardware they become, what they cost, and when the tool picks the architecture.

  • 4topics
  • 4lessons

Topics in this section

  1. 1Adder Building Blocks1 lesson
  2. 2Ripple Carry and Carry Lookahead1 lesson
  3. 3Shift-Add Multiplier1 lesson
  4. 4Wallace-Tree Multiplier Intuition1 lesson
On this page

    A ripple-carry adder is small and slow, a prefix adder is larger and fast, and multipliers range from tiny shift-add to big trees. Writing a + b or a * b hides that choice: synthesis picks the architecture, so give it clear operators, deliberate widths and a real constraint.

    Operators plus constraints feed synthesis, which selects an adder or multiplier architecture.
    You state the function; constraints decide the architecture.

    Lessons in this topic

    4 lessons, about 19 min

    1. 1Adder Building BlocksYou can build a full adder and a ripple adder, turn them into a subtractor by inverting b and setting carry-in, and read carry and overflow flags correctly.4 min
    2. 2Ripple Carry and Carry LookaheadYou can write generate and propagate equations, combine groups in a prefix network, and compare ripple and lookahead depth.6 min
    3. 3Shift-Add MultiplierYou can form the partial products of a multiply, compare array, sequential and tree styles, and explain why signed multiply is not the unsigned circuit.4 min
    4. 4Wallace-Tree Multiplier IntuitionYou can reduce rows with carry-save adders, follow bit weights through a compressor, and estimate the number of levels for a given row count.5 min
    Check yourself If you write assign y = a + b; and the design fails timing in the adder, what are your options in order of effort?

    (1) Check widths and signedness: an accidental extra-wide operand makes a bigger adder. (2) After checking the requirement, the constraint and the failing report, try a tighter constraint as a supported experiment and compare timing and area afterwards; a faster architecture is not guaranteed. (3) Restructure the arithmetic (reduce the number of operands, use carry-save form). (4) Pipeline the operation.

    Interview

    Common questions: “How is a full adder built?”, “Why is a ripple-carry adder slow?”, “How does a multiplier work?”, “How would you build a fast N-bit adder?” This topic gives you the vocabulary for all four.

    Do and avoid

    Do

    Avoid

    Write a + b with deliberate widths

    Widening an operand by accident and paying for a bigger adder

    Constrain the clock so the tool can pick a faster adder

    Hand-instantiating full adders to beat synthesis

    Revision sheet

    The whole topic on one page, taken from each lesson's Remember box. Read it before an interview, or print it.

    Adder Building Blocks

    • Full adder: sum = a ^ b ^ cin, cout = majority(a, b, cin).

    • Subtract with y = a + (b ^ {N{sub}}) + sub.

    • On subtract, cout = 1 means no borrow. Signed overflow uses the effective b after the XOR.

    Rule of thumb: in production RTL write a + b and a - b; build adders by hand only to understand them.

    Ripple Carry and Carry Lookahead

    • g = a & b and p = a ^ b. Then c(i+1) = g(i) | p(i) & c(i).

    • Ripple depth grows linearly with N; a prefix adder grows near log N at the cost of area and wiring.

    • Carry-skip and carry-select adders sit between the two: more area for a shorter worst path.

    Rule of thumb: write a + b and constrain it; let the tool pick the adder.

    Shift-Add Multiplier

    • An N x N multiply has N partial products and a 2N-bit result.

    • The bare loop is combinational and promises no cycle count. A sequential version reuses one adder over W cycles.

    • Signed operands need sign-extension tricks or Baugh-Wooley, because the sign bit has negative weight.

    Wallace-Tree Multiplier Intuition

    • A carry-save adder turns three rows into two (a sum vector and a carry vector) with no carry propagation, and keeps the total value.

    • Each level cuts the rows by 2/3, so depth grows like log 1.5 of the row count.

    • Only the last step is a real carry-propagate adder.

    Rule of thumb: write a * b and let synthesis choose the tree.

    Practise it

    • Mini project: a 32-bit leading-zero counter and normaliser

    • Code lab: Build a full adder

    • Code lab: Build an 8-bit ripple-carry adder

    • Practice question: An iterative shift-and-add multiplier

    • Interview: run a mock interview on this topic

    PreviousNext: Adder Building Blocks

    Up next

    Up nextAdder Building Blocks

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Combinational Timing Overview
    • Muxes, Decoders and Encoders
    • Comparators and Shifters