Introduction to Information Science and Technology

SI100B · Electrical Engineering

Lecture 4: Arithmetic Circuits

Xin Lou

School of Information Science and Technology · Fall 2026
Where We Are

Course Overview

Diagram
Today:Arithmetic Circuits
SI100B · EE | Lecture 4: Arithmetic Circuits
1 / 37
Where We Are

Running a Large Model

How much arithmetic does one token need?

SI100B · EE | Lecture 4: Arithmetic Circuits
2 / 37
Adders and Bit Width

Full Adder: Recap

A full adder adds two bits and a carry-in, producing a sum and a carry-out.

SI100B · EE | Lecture 4: Arithmetic Circuits
3 / 37
Adders and Bit Width

Carry Propagate Adders

Each sum bit depends on all previous carries.

SI100B · EE | Lecture 4: Arithmetic Circuits
4 / 37
Adders and Bit Width

Ripple-Carry Adder

Chaining full adders lets each carry bit ripple from right to left.

SI100B · EE | Lecture 4: Arithmetic Circuits
5 / 37
Adders and Bit Width

Example: 4-bit Ripple-Carry Adder

The carry moves one stage per step, so the final sum appears at T = 4.

SI100B · EE | Lecture 4: Arithmetic Circuits
6 / 37
Adders and Bit Width

Multi-Bit Signals and Bit Width

A bus bundles multiple wires together; its bit width sets how many bits travel at once.

SI100B · EE | Lecture 4: Arithmetic Circuits
7 / 37
Adders and Bit Width

Pascal’s Calculator, 1642

1642

Pascal designs a calculator with automatic carry.

SI100B · EE | Lecture 4: Arithmetic Circuits
8 / 37
Adders and Bit Width

Babbage’s Difference Engine

1991

Built from Babbage’s plans: tables by repeated addition.

SI100B · EE | Lecture 4: Arithmetic Circuits
9 / 37
Shift and Multiplication

Shift Left: Multiply by 2

Moving every binary digit one place left and putting a 0 on the right multiplies by 2.

SI100B · EE | Lecture 4: Arithmetic Circuits
10 / 37
Shift and Multiplication

Napier’s Bones, 1617

1617

Napier’s rods help people multiply by hand.

SI100B · EE | Lecture 4: Arithmetic Circuits
11 / 37
Shift and Multiplication

The Slide Rule

c. 1622

Logarithms turn multiplication into addition.

SI100B · EE | Lecture 4: Arithmetic Circuits
12 / 37
Shift and Multiplication

Multiplication: Shift and Add

Four 4-bit partial products add up to an 8-bit product.

SI100B · EE | Lecture 4: Arithmetic Circuits
13 / 37
Shift and Multiplication

Binary Multiplication: General Form

Every bit of the multiplier selects one shifted copy of the multiplicand.

SI100B · EE | Lecture 4: Arithmetic Circuits
14 / 37
Shift and Multiplication

Partial Product Generation

Each partial product is X AND Yᵢ: a copy of X when Yᵢ = 1, a row of zeros when Yᵢ = 0.

SI100B · EE | Lecture 4: Arithmetic Circuits
15 / 37
Shift and Multiplication

The Array Multiplier

4 × 4 two-input ANDs and three 4-bit adders.

SI100B · EE | Lecture 4: Arithmetic Circuits
16 / 37
Shift and Multiplication

Adding in Parallel

Independent additions run at the same time to combine partial products faster.

SI100B · EE | Lecture 4: Arithmetic Circuits
17 / 37
Shift and Multiplication

Busicom and the Intel 4004

1971

Intel builds the first microprocessor for a calculator.

SI100B · EE | Lecture 4: Arithmetic Circuits
18 / 37
Shift and Multiplication

HP-35, 1972

1972

The first handheld scientific calculator sells for $395.

SI100B · EE | Lecture 4: Arithmetic Circuits
19 / 37
Shift and Multiplication

Multiplication in Early Processors

1978

Multiplying two 16-bit numbers takes 118–133 clock cycles.

SI100B · EE | Lecture 4: Arithmetic Circuits
20 / 37
Multiply-Accumulate

Multiply-Accumulate

A MAC unit multiplies two numbers and adds the product to a running total.

SI100B · EE | Lecture 4: Arithmetic Circuits
21 / 37
Multiply-Accumulate

One Token, Billions of Multiply-Adds

Each generated token takes about one multiply and one add per active parameter.

SI100B · EE | Lecture 4: Arithmetic Circuits
22 / 37
Multiply-Accumulate

From ENIAC to Cray-1

SI100B · EE | Lecture 4: Arithmetic Circuits
23 / 37
Multiply-Accumulate

The Race for FLOPS

TOP500 No. 1 systems grew from 60 GFLOP/s (1993) to 2.2 EFLOP/s (LineShine, June 2026).

SI100B · EE | Lecture 4: Arithmetic Circuits
24 / 37
Multiply-Accumulate

Many MACs in Parallel

A grid of MAC units runs many multiply-adds at the same time.

SI100B · EE | Lecture 4: Arithmetic Circuits
25 / 37
Multiply-Accumulate

Systolic Array

Data flows between neighboring MACs; Google’s TPU v1 used a 256 × 256 array.

SI100B · EE | Lecture 4: Arithmetic Circuits
26 / 37
Multiply-Accumulate

Strassen’s Algorithm, 1969

Strassen showed two 2 × 2 matrices can be multiplied using 7 products instead of 8.

SI100B · EE | Lecture 4: Arithmetic Circuits
27 / 37
Multiply-Accumulate

AI Finds Faster Matrix Multiplication

AI systems found fewer multiplications for 4 × 4 matrices in different number systems.

SI100B · EE | Lecture 4: Arithmetic Circuits
28 / 37
Multiply-Accumulate

NVIDIA Tensor Core

Tensor Cores compute small matrix multiply-adds (D = A \times B + C) in one unit.

SI100B · EE | Lecture 4: Arithmetic Circuits
29 / 37
Multiply-Accumulate

Bitcoin Mining ASICs

14 TH/s

Custom chips built only to compute Bitcoin hashes.

SI100B · EE | Lecture 4: Arithmetic Circuits
30 / 37
Comparators and the ALU

Comparator

A comparator checks whether two numbers are equal or which one is smaller.

SI100B · EE | Lecture 4: Arithmetic Circuits
31 / 37
Comparators and the ALU

Arithmetic Logic Unit

An ALU combines arithmetic and logic operations in one processor block.

SI100B · EE | Lecture 4: Arithmetic Circuits
32 / 37
Comparators and the ALU

ALU: Units and a Selector

All units compute in parallel, and a selector picks the result chosen by the instruction.

SI100B · EE | Lecture 4: Arithmetic Circuits
33 / 37
Comparators and the ALU

The 74181 ALU, 1970

1970

A 4-bit ALU on one chip: 16 arithmetic and 16 logic functions.

SI100B · EE | Lecture 4: Arithmetic Circuits
34 / 37
Wrap-Up

Key Ideas

Full adders chain into multi-bit adders, and hardware multipliers add shifted copies.

Many MACs in parallel power AI matrix math, and an ALU picks one result from its units.

SI100B · EE | Lecture 4: Arithmetic Circuits
35 / 37
Wrap-Up

Homework 2

Details to be announced

SI100B · EE | Lecture 4: Arithmetic Circuits
36 / 37
Wrap-Up

Next: Memory

Diagram
Next:Memory
Where are the bits stored?