
How Do Transistors Multiply Numbers? From Physical Switches to Mathematical Intelligence#
A transistor switches a voltage. Circuits of those switches AND bits, shift them, and add them. That is how 13 times 11 becomes 143.
1. A transistor knows no mathematics#
A MOSFET is a semiconductor device whose gate voltage controls the conductivity of a channel between its source and drain. Digital circuits use this behavior to switch electrical signals. We interpret two ranges of voltage as logical states: low as 0 and high as 1. The precise voltages depend on the circuit technology.
Nature does not assign these mathematical meanings to voltages. Humans do. A transistor simply behaves according to semiconductor physics. Carefully arranged transistors, however, can implement logical and arithmetic operations.
2. From physics to mathematics#
| Layer | Capability |
|---|---|
| Semiconductor physics | Control movement of charge carriers |
| Transistors | Electrical switching |
| Logic gates | AND, OR, XOR, NOT |
| Arithmetic circuits | Addition and multiplication |
| Processor | Instruction execution, registers and control |
| Software | Algorithms and applications |
Each layer introduces an abstraction without replacing the underlying physical laws.
3. Multiplication of two single bits#
Binary multiplication of two individual digits is identical to logical AND.
| A | B | A × B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
A conventional static CMOS AND gate uses six transistors: four form a NAND gate and two form an inverter. In the NAND, two PMOS transistors are connected in parallel between the supply and output, and two NMOS transistors are connected in series between the output and ground. With both inputs high, the NMOS path conducts and the NAND output goes low. Inverting that signal produces a high AND output. For any other input combination, the NAND output is high and the AND output is low, after signals settle.
No software is required for the gate to follow this rule: its connectivity implements the truth table.
Interactive one-bit multiplier
4. What does an 8-bit processor mean?#
An 8-bit processor typically has a native data-processing width of eight bits. It does not contain just eight transistors. Each bit position has a place value, from 128 at the left to 1 at the right.
| Position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Weight | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Number 13 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
Thus 13 = 8 + 4 + 1. Eight bits give 256 distinct patterns, representing unsigned integers from 0 through 255. Signed numbers use other interpretations, such as two’s complement; this article focuses on unsigned multiplication.
5. Multiplication on paper versus in silicon#
In school we multiply each decimal digit, shift the partial products and add them. Binary multiplication follows the same principle, but every multiplier digit is either zero or one.
00001101 (13)
× 00001011 (11)
----------
00001101 (13)
00011010 (26)
00000000 (0)
01101000 (104)
----------
10001111 (143)
The upper four multiplier bits are zero and contribute nothing. In decimal notation, 13 × 11 = 13 × (1 + 2 + 8) = 13 + 26 + 104 = 143.
| Mathematical operation | Hardware implementation |
|---|---|
| Multiply individual bits | AND gates |
| Shift partial products | Wiring or shift registers |
| Add partial products | Binary adders |
6. How does a computer shift a number?#
A left shift by one position doubles an unsigned number if no significant bits are discarded. Two positions multiply it by four; three by eight. In a dedicated parallel multiplier, the shifted positions can be established by wiring each partial product directly to the appropriate weight column. No separate shift operation is necessary there.
Interactive binary left shift
7. How does a computer add numbers?#
A half adder accepts two bits and returns a sum and carry. The sum is XOR; the carry is AND.
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
A full adder accepts a third bit, the incoming carry. It uses two XOR gates, two AND gates and an OR gate in a common implementation.
Interactive full adder
Connecting adders lets us combine partial products of larger numbers. No individual transistor understands addition.
8. Putting everything together: an 8-bit multiplier#
Every bit of A can be ANDed with every bit of B, generating 64 partial-product bits in a straightforward parallel design. The bit produced from positions i and j has weight 2 raised to the power i + j. An addition network combines these weighted bits into a 16-bit result.
The following experiment generates all 64 AND outputs, places them in eight shifted rows, and reduces those rows with explicit binary full-adder logic. It is an educational functional simulation, not a transistor timing model or a simulation of one exact array topology.
Interactive 8-bit multiplier
In real combinational hardware, the gates respond concurrently to inputs, with finite propagation delays. A result is reliable after the circuit settles. Clocked implementations may capture results in registers or divide the computation into pipeline stages.
9. Why do two 8-bit numbers produce a 16-bit number?#
The largest unsigned 8-bit number is 255. Multiplying 255 × 255 gives 65,025, or binary 1111111000000001. Sixteen bits are sufficient to preserve every unsigned 8-bit product.
| Input A | Input B | Full product width |
|---|---|---|
| 4-bit | 4-bit | 8-bit |
| 8-bit | 8-bit | 16-bit |
| 16-bit | 16-bit | 32-bit |
| 32-bit | 32-bit | 64-bit |
| 64-bit | 64-bit | 128-bit |
Keeping only the lower eight bits produces the result modulo 256. A processor may instead return a wider register pair or compute the product in software.
10. How many transistors are needed?#
One illustrative unsigned array multiplier uses 64 AND gates, 8 half adders and 48 full adders.
| Component | Quantity | Transistors per unit (assumed) | Total |
|---|---|---|---|
| AND | 64 | 6 | 384 |
| Half adder | 8 | 14 | 112 |
| Full adder | 48 | 28 | 1,344 |
| Total | 120 | 1,840 |
These are illustrative cell counts, not universal transistor requirements. The 14-transistor half adder assumes an 8-transistor XOR and a 6-transistor AND; other XOR and full-adder implementations differ in signal integrity, area and power. Registers, buffering and control are excluded. The interactive simulator above uses a simpler row-by-row ripple-add algorithm, not this exact array cell count.
11. Do all processors multiply in the same way?#
| Technique | Principle | Typical advantage |
|---|---|---|
| Repeated addition | Add repeatedly | Simple concept |
| Shift and add | Shift and conditionally add | Reuses arithmetic hardware |
| Array multiplier | Regular parallel partial-product array | Regular layout |
| Booth recoding | Recode multiplier digits | Fewer partial-product rows in radix-4 and higher variants |
| Wallace tree | Reduce partial products in parallel | High speed |
| Dadda tree | Schedule partial-product reduction | Efficient compression |
Designers trade off area, speed, power and complexity. Some 8-bit processors have no dedicated multiplier and execute software routines instead. The mathematics is unchanged; the physical implementation changes.
12. What happens when we write a program?#
a = 13
b = 11
c = a * b
print(c)
A language runtime or compiler resolves the operation, which may use native multiplication instructions or arithmetic routines. Python integers, for example, support arbitrary precision, so larger values may involve multiple machine-word operations. The processor supplies data and control signals to arithmetic hardware, whose transistor networks ultimately change electrical states.
13. Where is the knowledge of multiplication stored?#
Is it in the electrons, the semiconductor material, the electrical energy, the circuit connections or the software?
In a dedicated multiplier, the multiplication rule is embodied in the circuit’s connectivity and physical behavior. In a programmable implementation, the instruction sequence also determines the operation. Rearranging similar components can yield a circuit that adds, compares, stores or multiplies information. The organization determines the collective behavior.
14. From multiplication to artificial intelligence#
Neural networks rely heavily on operations of the form y = w1*x1 + w2*x2 + ... + wn*xn: multiplication followed by addition. GPUs and AI accelerators execute such operations in parallel, using integer and floating-point formats. Their circuits are more sophisticated than our example, but the connection from physical switching to arithmetic is still fundamental.
15. Is computation an emergent property?#
| Entity | Collective capability |
|---|---|
| Semiconductor material | Controlled conductivity |
| Transistors | Switching |
| Transistor networks | Logic |
| Logic networks | Arithmetic |
| Arithmetic and control circuits | Programmable computation |
| Hardware, data and algorithms | AI capabilities |
An individual transistor cannot multiply two 8-bit numbers. A properly organized collection can. In this functional sense, computation can be regarded as a collective or emergent capability. This does not establish that intelligence or consciousness is fully explained by emergence; those are deeper and distinct questions.
Conclusion: When matter begins to compute#
A transistor does not know mathematics. An electron does not know the meaning of a number. A wire does not know that a left shift represents multiplication by two.
Yet, by arranging physical entities according to carefully designed relationships, their collective behavior implements mathematical rules. We have not taught matter mathematics. We have organized matter so its natural behavior corresponds to our abstractions.
Is computation fundamentally mathematical or physical? Is information independent of its physical representation? How much of what we call intelligence arises from the way components are organized rather than from individual components?
Understanding how transistors multiply numbers opens a window into the relationship between matter, mathematics, information and intelligence.
Further reading#
- Nand2Tetris — From NAND to a computer
- MIT OpenCourseWare — Computation Structures
- David Money Harris and Sarah L. Harris, Digital Design and Computer Architecture.
Hashtags#
#Transistors #DigitalElectronics #BinaryArithmetic #ComputerArchitecture #Multiplication #LogicGates #CMOS #ComputerScience #HowComputersWork #ArtificialIntelligence

Comments: