Introduction to Circuitry
Do you know how your smartphone or computer actually "thinks"? It might seem like magic inside: complex algorithms are running, neural networks are operating, and games are launching. But at the deepest, hardware level, a processor can neither read, nor calculate, nor understand commands. It understands only one thing: whether there is an electrical current or not.
All digital electronics communicate in a language of two states. If there is voltage running through a wire (it lights up), it's a logical one ("1", true). If there is no voltage, it's a logical zero ("0", false).
Circuitry is the engineering art of connecting wires and tiny mechanisms so that complex logic emerges from primitive zeros and ones. These mechanisms are called logic gates. Each gate performs one very simple task: it looks at the incoming signals and, following strict rules, decides whether to let the current pass through or not.
By combining tens, hundreds, and millions of such elements, engineers teach a machine to add numbers, remember passwords, and display graphics on a screen. In this library, we will break down the basic gates that serve as the building blocks for any modern processor.
What is circuit design
Circuit design is the science of building complex devices from the simplest elements — wires, switches, and gates. Imagine a construction set: from identical bricks you can build both a tiny house and a whole city. In the same way, engineers assemble adders, registers, memory, and finally an entire processor from a few basic gates.
In the Ershov Computer simulator you will walk this path from scratch: you start with a single wire in level 1.1 and finish with a processor that can execute programs.
Two states: 0 and 1
The whole digital world is built on two signals. One such signal is called a bit. On its own a bit is almost useless, but eight bits grouped together form a byte — and a byte can store 256 different values, from 0 to 255. Why 256? Because each of the 8 bits can be either 0 or 1: 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 28 = 256.
Here is what the first sixteen numbers look like in binary:
| Decimal | Binary (4 bits) |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| 10 | 1010 |
| 11 | 1011 |
| 12 | 1100 |
| 13 | 1101 |
| 14 | 1110 |
| 15 | 1111 |
Notice the pattern: the rightmost bit flips every time, and each next bit flips half as often. It's worth memorizing this table — you'll need it in many levels.
How gates become a processor
A single gate answers the simplest question: "Let the current through or not?". But connect several gates and they start solving tasks: AND and OR gates together with inverters can add bits, adders form the ALU — the block that makes the processor a "mathematician", and memory elements grow into registers and RAM.
Here's an important secret: gates work in parallel. When a signal changes on an input, it instantly spreads through all connected gates at once — there is no "execution queue" inside a circuit. This parallelism is what lets a processor perform billions of operations per second.
What you will learn from this library
Each article is one step on the road from zeros and ones to a real processor:
- 0 and 1: The Language Machines Speak — how a transistor stores one bit and why a byte can count to 255.
- Logic Gates — AND, OR, NOT — the three basic rules that all digital logic rests on.
- De Morgan's Laws — how to build any gate from a single universal one.
- Exclusive OR (XOR) — the gate that detects a difference and knows how to add bits.
- Binary Math for Beginners — how a processor counts in binary.
Summary
1. A processor understands only two states: current present (1) and no current (0).
2. Logic gates are the rules by which complex logic is assembled from zeros and ones.
3. Eight bits make a byte, which stores 256 values — from 0 to 255.
4. Gates work in parallel, so a circuit computes all bits at once.
5. Simple gates grow into adders, memory, and eventually a whole processor.
In level 1.1 you will draw the very first wire — send a signal 1 from a source to a receiver and watch the "light turn on" at the output. From this moment on, you start building your own processor.