Factorio combinators: how the circuit network maps to real logic
Factorio's circuit network carries signals on red and green wires. According to the official wiki, a signal is a channel (an item, a fluid or a virtual signal) holding a signed 32-bit integer that wraps around on overflow, and broadcasts on the same channel add up. Four combinators process them: the constant combinator broadcasts fixed values, the arithmetic combinator computes a result (+, -, *, /, %, exponent, bit shifts and bitwise AND, OR and XOR), the decider combinator compares signals with >, <, =, >=, <= or != and outputs a constant or the input count, and the selector combinator filters signals, for example picking the largest or the smallest. So one combinator already does what takes many real gates, and the logic it stands on sits one level below.
How combinators map to logic
The wiki's combinator tutorial describes a decider reading the Everything signal as a logical AND (true only if every input passes) and one reading Anything as a logical OR, and since version 2.0.7 one decider can combine several conditions with AND and OR. A combinator whose output feeds back to its own input holds a value, which is how Factorio builds memory and set/reset latches (the tutorial's example switches a pump on at 20,000 light oil and off at 5,000), and the same feedback makes a clock that counts up and resets. The arithmetic combinator's bitwise AND, OR and XOR work on all 32 bits of a signal at once. Timing comes in ticks: a combinator's output reaches the network on the following tick, and the game updates 60 times a second. (digiwleea is an independent project, not affiliated with Wube Software.)
How real logic gates differ
In a chip a wire carries a single bit, 0 or 1, and each gate does one small thing: NOT, AND, OR. What a decider does in one step, comparing two numbers, is a magnitude comparator built from dozens of gates, and an arithmetic combinator's addition is a chain of full adders with a carry rippling through it. Two outputs driving one wire do not add up either: they fight, and in CMOS that is a short circuit. Real gates have no shared tick, just a small delay each, so timing is designed, not counted. digiwleea lets you build those layers yourself, from transistors to gates, adders, comparators, latches and clocks, up to an 8-bit CPU.
| Factorio | digiwleea | |
|---|---|---|
| What a wire carries | Many channels, each a signed 32-bit integer | One bit: 0 or 1 |
| Basic element | Combinators: constant, arithmetic, decider, selector | Gates built from transistors |
| Two outputs on one wire | Their values add up | A short circuit |
| Timing | One tick per combinator, 60 ticks a second | Each gate's own small delay |
| Memory | A combinator fed back to itself | A latch: gates fed back to each other |
Factorio circuits and the real circuits behind them
- Decider on Everything (AND) or Anything (OR). The gates: AND, OR, and a decider that outputs a signal only when its input is 0 behaves as NOT.
- Decider comparing two signals. In hardware, a magnitude comparator, as in the 7485 chip.
- Arithmetic +, -, *. A ripple-carry adder, an adder-subtractor and a 4-bit multiplier.
- Bitwise AND, OR, XOR and shifts. One gate per bit, which you can try in the bitwise calculator; shifts are a barrel shifter.
- Set/reset latch and memory cell. The SR latch, the D latch and a 4-bit register.
- Clock and counter. A synchronous counter and a frequency divider.
- Signed 32-bit values that wrap. Two's complement and overflow.
No sign-up is needed to start: open the lab and place your first transistor, or read the free theory course. The account (and the AI tutor) are optional.
See for yourself: build a logic gate from transistors in the simulator, then follow the path from sand to an 8-bit CPU.
Open the digiwleea lab →Frequently asked
Can you make logic gates in Factorio?
Yes, with decider combinators: a condition on the Everything signal acts like AND, one on Anything like OR, and a decider that outputs a signal only when its input is 0 acts as NOT. The arithmetic combinator also has bitwise AND, OR and XOR, which work on all 32 bits of a value at once.
How do you make a memory cell in Factorio?
Feed a combinator's output back into its input. The wiki's combinator tutorial shows such a cell holding its value while the other inputs are zero, and a set/reset latch that switches on at one level and off at another.
Why do Factorio combinator circuits have a delay?
A combinator's output reaches the circuit network on the following tick, and the game runs 60 ticks a second, so each combinator in a chain adds a tick. Real gates have a delay too, measured in nanoseconds or less, which limits how fast a chip can be clocked.
Is Factorio's circuit network like real digital logic?
In spirit. Signals are whole numbers rather than single bits, so one combinator can add or compare numbers; in hardware that takes many 1-bit gates, wired as adders and comparators. The ideas of gating, feedback memory and clocks carry straight over.