MAC vs BSA — Gate-Level Energy

Each square represents one logic gate. Every gate that fires draws power. Count the gates. See the difference.

Sum of Products vs Sum of Shifts
Two fundamentally different approaches to weighted accumulation. Both compute the same answer — 13 × 11 = 143 — but one uses brute-force long multiplication (sum of partial products) while the other decomposes the weight into powers of two (sum of shifts). The gate count tells the story.

🏭 Sum of Products: Long Multiplication in Silicon

The same pencil-and-paper method you learned in school — implemented in 3,200 logic gates
      1101  (13)
    × 1011  (11)
    ──────
      1101  ← partial product 0  (×1, shift 0)
     1101·  ← partial product 1  (×1, shift 1)
    0000··  ← partial product 2  (×0, shift 2)
   1101···  ← partial product 3  (×1, shift 3)
  ────────
  10001111  ← add all rows + carry propagation
      = 143 ✓
  • 1 Read each bit of the multiplier to decide which rows to generate 240 gates
  • 2 Generate every partial product row — one AND gate per bit pair 700 gates
  • 3 Feed all rows into the Wallace Tree to reduce them with carry-save adders — the single largest block 1,000 gates
  • 4 Final carry-propagate addition to resolve all remaining carries 300 gates
  • 5 Normalize the result, round, handle exceptions (NaN, overflow, underflow) 370 gates
  • 6 Store result in pipeline registers for the next clock cycle 300 gates
3,200 gates → 4.6 pJ (Horowitz 45nm)

🧮 Sum of Shifts: The Abacus Principle

Don't multiply — decompose the weight into powers of two, then shift and add
  13 = 16 − 4 + 1
     = 2⁴ − 2² + 2⁰       ← 3 terms (R=3)

  13 × 11
     = (2⁴ − 2² + 2⁰) × 11
     = (11 << 4) − (11 << 2) + (11 << 0)
     =   176     −    44     +    11
     =   143 ✓

  Three shifts. Two adds. Zero multiplies.
  • 1 Barrel-shift the input by the first exponent (e=4) — this is just moving wires, near-zero energy 20 gates
  • 2 Check the sign bit — add or subtract? Just an XOR on each bit 16 gates
  • 3 Accumulate into a single integer adder — the only real computation 24 gates
  • 4 Control & sequencing — SRAM coefficient read, cycle counter FSM, accumulator latch ~20 gates
  • Repeat for remaining terms (shift by e=2, then e=0). Same 80 gates, reused each cycle 0 extra
80 gates fired × 3 cycles → 0.15 pJ
Same answer: 143. The MAC fires 3,200 gates once. The BSA fires 80 gates three times — same hardware, reused.
The MAC exists because we chose to multiply. BSA asks: what if we never multiply at all?

⚡ It Gets Better: Dynamic-R and QAT

The example above used R=3 terms for the weight 13. But real neural network weights aren't random — after Quantization-Aware Training (QAT), the training process pushes weights toward exact powers of two. Most weights need only 1 or 2 terms. The average across billions of parameters:
Worst case (R_max)
8 cycles per weight
R = 8
Actual mean (LLMs)
1.6 cycles per weight
R̄ = 1.6
Now combine Dynamic-R with attention sparsity (most attention values are near-zero and can be skipped). This creates two-dimensional sparsity — savings multiply:
Sparsity Dimension What It Skips Reduction
Dynamic-R (weight rows) Unnecessary shift-add terms per weight 5× (1.6 vs 8 cycles)
CSC Attention (columns) Near-zero attention entries 10× (at 10% density)
Combined (2D sparsity) Both — compound savings ~50× → 2% of dense FP32
A BSA PE with Dynamic-R fires its ~80 active gates an average of 1.6 times per weight, not 8.
Combined with attention sparsity, total compute drops to ~2% of dense FP32.
Validated on 8 production LLMs — Mistral, LLaMA, Gemma, Phi-3, Qwen, DeepSeek, Falcon — with perplexity loss < 0.3.

🧮 The Name Was Never an Accident

Sibacus — from abacus. The abacus was humanity's first computing tool, and it worked on exactly this principle: positional shift and accumulate. No multiplication. Just slide beads to new positions and count the result. The MAC was a 50-year detour into brute-force arithmetic. BSA is a return to the most energy-efficient computational principle ever discovered — now implemented in silicon instead of wooden beads.

Multiply-Accumulate (MAC)
32-bit
3,200 gates
Numeric Precision
IEEE 754 FP32
32effective bits
Fixed format — hardware locked to this precision
Cumulative Energy
0.00pJ
0
Operations
Gates / Op
pJ / Op
Bits / pJ
Bit-Shift Accumulate (BSA)
~1 bit
80 gates
Numeric Precision
Coarse — binary decisions
~1effective bits
Tunable at runtime — increase R for more precision, same hardware
Cumulative Energy
0.00pJ
0
Operations
Gates / Op
pJ / Op
Bits / pJ
Run an operation to see the energy savings
Gate Types — Each square = 1 logic gate consuming voltage on every clock cycle it fires
AND — Partial products
OR — Carry propagation
XOR — Adder / negation
MUX — Barrel shifter routing
ADD — Integer accumulation
FF — Flip-flop / register
CTRL — Control logic
NORM — Normalize / round
WIRE — Shift-by-wiring (near-zero energy)
💾 Weight Encoding Footprint — Bits Per Weight
A memory architect's question: how many bits does each weight cost in storage? BSA's compact encoding stores weights in fewer bits than FP16 — meaning less data to move across memory interfaces.

Conventional Formats

Fixed-width values — every weight costs the same number of bits regardless of its actual information content.
FP32
32 bits per weight
32 b
FP16
16 bits
16 b
INT8
8 bits
8 b
Every weight pays the full format width even if the actual value is simple (e.g., 1.0 still costs 32 bits in FP32). Still requires a hardware multiplier to compute with.

BSA Encoding

Variable-width tuples — simple weights (near powers of two) cost fewer bits. Each term is just a 1-bit sign + 4-bit exponent.
Fixed R=2
E-Core (validated RTL)
10 bits
10 b
Dynamic-R mean
R̄ = 1.6 (post-QAT LLMs)
~11 bits (3b prefix + 1.6×5b)
~11 b
R_i = 1 weight
60% of all LLM weights
8 bits (3b prefix + 1×5b)
8 b
Average BSA weight: ~11 bits31% smaller than FP16. No multiplier needed to compute. The R_i prefix is a 3-bit counter that tells the PE how many shift-adds to execute.

📦 Real-World Impact: 7B Parameter LLM

Total model storage at 50% weight sparsity (3.5B non-zero weights). Index overhead: ~12 bits per non-zero entry.
FP16 dense
14.0 GB
14.0 GB
FP16 sparse (50%)
12.25 GB
12.3 GB
INT8 sparse (50%)
8.75 GB
8.8 GB
BSA Fixed-R=2 sparse
9.6 GB
9.6 GB
BSA Dynamic-R sparse
10.1 GB — no multiplier needed
10.1 GB
BSA sparse is slightly larger than INT8 sparse (more precision per weight) but 27% smaller than FP16 sparse. The critical difference: INT8 still needs a hardware multiplier (~1,200 gates). BSA needs only a barrel shifter + adder (~1,095 gates total PE, of which ~80 fire per cycle). Total system cost (storage × compute) favors BSA.
📊 Sparse Compute: 1D vs 2D — The BSA Compound Advantage
Standard sparse formats (CSR/CSC) skip zero entries — this is structural sparsity. BSA adds a second dimension: arithmetic sparsity — even non-zero weights execute fewer cycles. The two dimensions multiply.

🏭 Conventional Sparse (FP16 + CSC)

One dimension of savings: skip zero entries. Non-zero weights still need a full MAC operation.
Structural sparsity
CSC skips zero attention entries
÷ 10
×
Arithmetic sparsity
MAC takes same cycles for all values
÷ 1
10%
of dense FP16 compute

🧮 BSA 2D Sparse (Dynamic-R + CSC)

Two dimensions of savings: skip zeros AND process non-zeros faster. Both multiply together.
Structural sparsity
CSC skips zero attention entries
÷ 10
×
Arithmetic sparsity
Dynamic-R: mean 1.6 vs max 8 cycles
÷ 5
2%
of dense FP32 compute
5× more sparse compute reduction At 10% attention density, conventional sparse achieves 10% of dense baseline. BSA achieves 2% — because Dynamic-R adds a second sparsity dimension that hardware multipliers physically cannot exploit. A MAC unit takes the same number of cycles whether the weight is 0.999 or 0.001. A BSA PE finishes the simple weight in 1 cycle and the complex weight in 3.