Booth radix-4 and B4G3 multipliers

Project, 2026

Interactive Booth radix-4 multiplier with inputs negative 77 and 93 and the four encoded digits of B
Timeline
Jul 2026
Tools
SystemVerilog, Icarus Verilog, Verilator

Overview

Two signed 8x8 multipliers in SystemVerilog, both exhaustively verified over all 65,536 signed input pairs. One is a standard modified Booth radix-4 design. The other implements B4G3, an encoding from an IEEE ARITH 2024 paper. They share an identical back end, so any cost or delay difference between them comes from the encoder.

Background

This line of work started with a shift-and-add 4x4 multiplier and a radix-2 Booth encoder. B4G3 comes from Langhammer, Pasca and Kucherenko, “Multiplier Architecture with a Carry-Based Partial Product Encoding” (ARITH 2024). The paper claims that trimming −2A from the interior digit set makes a multiplier cheaper on FPGAs and ASICs. I implemented the architecture so that claim can be tested against a matched baseline, and wrote that baseline too.

See it multiply

Type two numbers from −128 to 127. Booth radix-4 reads B in overlapping 3-bit windows and turns it into four digits. Each digit picks one partial product from 0, ±A and ±2A, so 8 bits need four partial products instead of eight. Switch to B4G3 to see a computed carry take the place of the overlapping bit.

Encoding

Encode B into four digits

  1. Digit 0: b1 0, b0 1, b-1 0, selects +A
  2. Digit 1: b3 1, b2 1, b1 0, selects −A
  3. Digit 2: b5 0, b4 1, b3 1, selects +2A
  4. Digit 3: b7 0, b6 1, b5 0, selects +A

Each digit reads its two bits of B plus the bit just below. Digits come from 0, ±A, ±2A.

Partial products, each shifted by 2i

  1. d0 times A times 4 to the 0: −77
  2. d1 times A times 4 to the 1: 308
  3. d2 times A times 4 to the 2: −2464
  4. d3 times A times 4 to the 3: −4928

Shown in two's complement; dim bits are sign extension. The RTL inverts negative rows and adds their +1s in one extra row.

−77 × 93 = −7161

The logic here is ported from the encoders in both repos, and this site's tests check it against plain multiplication for all 65,536 pairs.

Architecture

Both designs run the same pipeline. Only the first step differs.

Encode B into four digitsBooth: overlapping windowsB4G3: carries from a prefix networkSelect four partial productsone's complement: invert, never negateAdd the sign vector row Kevery +1 correction in one rowReduce five rows to twothree csa16 carry-save stagesFinal carry-propagate add16-bit signed product
The shared datapath. Everything after the encoder is identical in the two repos.

The two designs differ in exactly three places:

  • B4G3 encoders take a computed carry instead of the overlapping bit below.
  • B4G3 needs a prefix network on B to produce those carries. Standard Booth needs none.
  • B4G3 needs a special signed top digit that keeps −2A. In standard Booth all four units are identical, because the top window already holds B[7].

The hard parts

Negation without a carry chain per row

Negating a partial product the obvious way costs a carry-propagate add for each row. Both designs invert the magnitude instead and collect the matching +1 corrections into a single sign-vector row, which the compression tree adds once.

The inputs that broke earlier revisions

The shared testbench opens with 15 named corner cases, each picked because it broke a revision of these designs: −128 × −128, A = −128 forcing the −2A overflow, B = −128 exercising the top digit's sign, and the band B = −86 to −97, where an earlier B4G3 revision failed. Then it sweeps every signed pair against the golden A × B.

Honest limits

  • Neither repo has synthesis results yet. The pair is set up for a fair cost comparison, but it does not report one, so the paper's claim is still untested here.
  • Both designs are 8x8 only.

Results

Both designs pass: 65,551 checks (the 15 corner cases plus all 65,536 pairs) with 0 mismatches on Icarus Verilog 12. One testbench verifies both, because each top module is booth_multiplier(A, B, product).

Code: booth-radix4-multiplier and b4g3-multiplier.

Takeaways

A baseline isolates one change only if everything else matches. Sharing the back end means a synthesis run on the pair will measure the encoder and nothing else.