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

  • Logic Synthesis Glossary
  • Logic Synthesis Cheatsheet
  • Synthesis Foundations14
  • Logic Optimisation and Mapping20
  • Constraints and Timing15
  • Sequential, FSM and Memory19
  • Datapath Synthesis14
    • Adders and Carry Structures
    • Multipliers and Compressors
      • Partial Products and the Array Multiplier
      • Booth Radix-4 Recoding
      • Compressor Trees
      • Signed Multiplication and Sign Extension
      • Truncation, the Final Adder, and Equivalence
    • Resource Sharing and Arithmetic Inference
  • Area, Power and Test14
  • Verification, ECO and Handoff15
  • Flows and Debugging15
  • Interview and Judgment11
Loading lesson

‹Multipliers and Compressors
  1. Topics
  2. Logic Synthesis
  3. Datapath Synthesis
  4. Multipliers and Compressors
  5. Booth Radix-4 Recoding

Part 5 · Datapath Synthesis · Intermediate

Booth Radix-4 Recoding

Radix-4 Booth recoding halves the rows, with an exhaustive Python check.

On this page

    Recoding triplets

    Radix-4 Booth scans overlapping triplets of multiplier bits, with an implied zero below bit 0. Each triplet becomes one signed digit, so two multiplier bits yield one partial product.

    Digits stay within -2 to +2. That bound is what keeps each multiple to a shift, a negation, or both.

    Triplet (b1, b0, b-1)

    Digit

    Multiple

    000

    0

    0

    001

    +1

    +x

    010

    +1

    +x

    011

    +2

    +2x

    100

    -2

    -2x

    101

    -1

    -x

    110

    -1

    -x

    111

    0

    0

    A worked product

    Take x = 6 (0110) and y = -5 (1011). Two triplets give two rows, and their sum equals -30.

    Diagram
    x = 6 = 0110, y = -5 = 1011 (4-bit two's complement), y[-1] = 0
    group 0 = (y1, y0, y-1) = (1, 1, 0) -> -2 x 1 + 1 + 0 = -1
    group 1 = (y3, y2, y1) = (1, 0, 1) -> -2 x 1 + 0 + 1 = -1
    pp0 = -1 x 6 = -6 (shift 0)
    pp1 = -1 x 6 = -6, shifted left 2 = -24
    total = -6 + -24 = -30 = 6 x -5
    rows: 2 instead of 4

    Fewer rows, wider rows

    Radix-4 halves the row count: 8 rows become 4. Each recoded row needs the doubling bit, which sign extension to the full product width absorbs.

    The same recoding covers the sign bit, so no separate sign row is needed. The Python check below proves that on every signed 4-bit pair.

    Exhaustive Python check

    The program recodes every signed 4-bit pair and compares against integer multiply. It also pins the digit bound and the halved row counts.

    example.py
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    import sys
    
    def booth_digits(yy, n):
        ds = []
        for i in range(n // 2):
            b1 = (yy >> (2 * i + 1)) & 1
            b0 = (yy >> (2 * i)) & 1
            bp = (yy >> (2 * i - 1)) & 1 if i > 0 else 0
            ds.append(-2 * b1 + b0 + bp)
        return ds
    
    def booth_mul(xs, ys, n):
        yy = ys & ((1 << n) - 1)
        total = 0
        for i, d in enumerate(booth_digits(yy, n)):
            total += d * xs * (1 << (2 * i))
        return total
    
    bad = 0
    for xs in range(-8, 8):
        for ys in range(-8, 8):
            if booth_mul(xs, ys, 4) != xs * ys:
                bad += 1
    if bad != 0:
        print("FAIL: " + str(bad) + " signed 4-bit products differ")
        sys.exit(1)
    for yy in range(16):
        for d in booth_digits(yy, 4):
            if d < -2 or d > 2:
                print("FAIL: digit out of range")
                sys.exit(1)
    if len(booth_digits(0, 4)) != 2:
        print("FAIL: 4-bit width needs 2 rows")
        sys.exit(1)
    if len(booth_digits(0, 8)) != 4:
        print("FAIL: 8-bit width needs 4 rows")
        sys.exit(1)
    print("PASS: radix-4 Booth matches integer multiply on all 256 signed 4-bit pairs; 8-bit needs 4 rows, not 8")

    Common pitfall

    Dropping the implied zero below bit 0 corrupts only the lowest triplet, so small tests pass and wider ones fail. Forgetting the extra doubling bit corrupts only extreme values such as -8 times -2.

    Interview

    Likely probes: why triplets overlap, and what each digit costs.

    • The overlap shares one bit between neighbours, so n bits give n / 2 digits.

    • Digits 0, +1 and -1 need at most a negation; +2 and -2 add a shift.

    • The check above is exhaustive at 4 bits: 16 x 16 = 256 pairs.

    Check yourself How many partial products does radix-4 Booth give for 8 bits, and why?

    Four. Each digit consumes two multiplier bits, so 8 bits give 4 rows instead of 8.

    Check yourself The triplet reads 100. What is the digit, and what multiple does it select?

    The digit is -2. It selects -2x, a shift plus a negation.

    Related topics

    • Previous: Partial products and the array

    • Next: Compressor trees

    Previous

    77 / 139

    Next: Compressor Trees

    Up next

    Up nextCompressor Trees

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Signed Multiplication and Sign Extension
    • Truncation, the Final Adder, and Equivalence