Each cross-point of this 4×4 grid holds a nanoscale memristor — a two-terminal device whose electrical conductance G physically encodes one synaptic weight and stays put even with power off. Row wires carry the input voltages V₁…V₄; column wires collect the output. By Ohm's law the current through the memristor at row i, column j is Iᵢⱼ = Vᵢ·Gᵢⱼ. By Kirchhoff's current law all the currents landing on a column simply add: Iⱼ = Σᵢ Vᵢ·Gᵢⱼ. That sum is exactly one row of a matrix-vector product — computed by physics, for the whole 4×4 grid at once, the instant voltages are applied.
Iⱼ = Σᵢ Vᵢ · Gᵢⱼ (Ohm + Kirchhoff, all columns at once)
- Crossbar mode — every memristor conducts simultaneously; the output vector appears in one physical "step", however large the grid.
- Von Neumann mode — the same 16 multiply-accumulates, but done one at a time by a CPU shuttling weights out of separate memory, the way an ordinary computer would. Watch the step counter and clock climb.
- This is the core idea behind in-memory / analog AI accelerators: skip moving data between memory and a separate compute unit (the "von Neumann bottleneck") and let the physical wiring itself do the arithmetic.
Real devices use resistive memory (ReRAM), phase-change memory or magnetic tunnel junctions as the memristive element, arranged in exactly this row/column grid to run neural-network inference with a fraction of the energy of a GPU doing the same multiply-adds sequentially.