The Switch: Computation as Indirect Control

Developed and . Updated .

Computation from first principles

Computation begins when one signal controls which other signal can pass.

This is indirect control: the control does not become the answer. It changes the available path, and a selected value becomes the answer.

Software calls it if-then-else. Digital logic calls it a multiplexer. Physical systems realize it with transistors, relays, valves, fields, and movable gates.

Beneath Code Lies A Physical Choice

Computation organizes communication, medicine, transport, science, work, and everyday life. Yet its familiar layers—code, data, algorithms, interfaces, and processors—can hide the elementary action from which those systems grow.

I started programming in 1994 and spent the next twenty-six years following that action beneath each new abstraction. A CPU already contains a vast constructed machine. Stored code waits without acting. Data can persist without changing.

The decisive event occurs when one condition chooses what another event will do.

A Movable Gate Creates Indirection

A rigid channel sends a flow wherever its fixed walls lead. Replace one section with a movable gate, and the channel acquires a choice.

A separate control flow pushes the gate between two stable positions. That control never needs to join the selected stream; it changes which route the stream can use.

At least two influences meet:

The control acts on the gate; the gate acts on another flow. A modest cause determines which larger cause continues.

The Same Move In Code

The same operation takes one line of code:

result = chooseRight ? rightValue : leftValue;

chooseRight supplies control. When it changes, the expression selects a different branch. The expression returns one of the two data values, not the control itself.

leftValue  ──┐
             ├── selected value
rightValue ──┘
        ▲
        │
   chooseRight

A pointer follows the same shape: its value chooses where the program finds another value. Delegation follows it when a high-level signal selects the prepared person or process that acts next. Across each case, one value controls access to another.

A Cow Can Explain The Selector

Picture black and white cows as zeroes and ones approaching two sides of a gate. While the gate favors the left path, the left herd supplies the output sequence.

One cow arrives along the control path and nudges the gate into its other stable position. The left route closes, the right route opens, and a different herd supplies the downstream sequence.

The control cow carries none of the output answers. It changes which herd can carry them.

A Physical Switch Performs Three Jobs

The logical symbol compresses three physical requirements:

  1. Recognize a usable control condition. A transistor responds continuously along a transfer curve; a relay, mechanical gate, or fluidic device follows its own physical response. The surrounding design establishes ranges that later stages can read reliably as one state or the other.
  2. Change the usable transfer path. The control alters conductivity, position, pressure, magnetization, or some other property that determines which signal can reach the output.
  3. Settle into a usable state. The device must finish its transition, drive the load, tolerate noise, and hold long enough for the next stage to read it.

The selected path carries energy from its own signal source, so the control can govern a substantial downstream effect. When a circuit must restore levels or amplify, active devices draw energy from a supply and let the control govern that available flow.

Physics Supplies The Repeatable Choice

Moving charge, changing fields, overcoming friction, and driving a load consume energy. Reversible and adiabatic designs can recover part of that energy, while reliability, speed, leakage, and control shape the rest of the design.

A 2:1 multiplexer defines logical behavior: either control state selects one input and rejects the other. Relay contacts, transistor networks, mechanical gates, and fluidic devices realize that behavior through different physics.

The wonder lies in repeatability. A controlled physical transition can redirect a larger information-bearing path billions of times and compose with millions of similar choices.

From One Choice To A Network

One selector chooses between two values. Selector trees let each control pattern choose among many values. Constants and variables at the leaves express Boolean functions. Feedback and explicit storage let earlier choices affect later ones.

If-then-else therefore precedes the CPU as a useful primitive. A CPU assembles selection, state, arithmetic, timing, and routing into a powerful general machine, but selection supplies its recurring act of control.

Signal restoration and distribution carry that act across distance. Storage carries it across time. Clocking organizes causality. Inputs and outputs connect it to the physical world. Power delivery and cooling sustain it. Each layer extends the selector into a computer.

One Flow Chooses Another

Indirect control makes the physical root of a digital explanation tangible. A control value chooses another value. A movable gate chooses another flow. A multiplexer chooses another signal.

Boolean networks repeat and organize that move until it becomes arithmetic, memory, protocol, graphics, or a program.

One flow chooses another, and a machine begins.