Ershov's Algorithm

Build your own computer — from logic gates to a working processor

Start Learning

What is this

"Ershov's Algorithm" is a browser-based engineering simulator where you build your own computer step by step from absolute zero. Starting with the simplest logic gates, you'll construct increasingly complex blocks: memory, flip-flops, an arithmetic-logic unit, and finally a full 8-bit processor that you'll program yourself in assembly. This game turns complex computer architecture into a visual puzzle, helping you forever lose your fear of the "black box" of computing.

What's inside

1

Let there be light!

Source → receiver. Your first wire.

2

Negation

NOT gate from a single NAND.

3

Perfect pair

AND gate from NAND and NOT.

4

At least one

OR gate via De Morgan's laws.

5

Strict choice

Exclusive OR (XOR).

6

Half Adder

Sum (XOR) + Carry (AND).

7

Full Adder

A, B, CarryIn → Sum, CarryOut.

8

8-bit Adder

Cascade of 8 adders. Buses.

9

Crossroads

MUX: digital 2-to-1 switch.

10

Loopback

SR latch from NOR. Foundation of memory.

11

Smart memory

D flip-flop. Captures on clock edge.

12

Register

8-bit register from 8 DFFs. One byte.

13

Heart of math

ALU: ADD, AND, OR, XOR, NOT, SHL, SHR.

14

Program Counter

PC from register and ALU. Address sequencing.

15

Decoder

Instruction → control signals.

16

FINALE: The Ershov Computer

Harvard processor. Build and program it!

Video overview coming soon

What you'll learn

Step-by-step learning

Step-by-step learning

16 levels take you from a simple wire through AND, OR, NOT gates, adders, flip-flops, registers, and an ALU to a fully working 8-bit processor. Each level unlocks new components.

Visual programming

Visual programming

No boring code at the start. Just an interactive canvas: drag elements, connect them, watch signals flow. Understanding comes through your hands — you literally see how every gate works.

Real architecture

Real architecture

You'll build a Harvard architecture processor — separate instruction and data memory, an ALU with 8 operations, general-purpose registers, a program counter. This is a simplified model of a real computer.

How it works

Build circuits from logic gates right in your browser. Drag components onto the canvas, connect them with wires, and see results instantly. The built-in checker compares your circuit against the truth table — you immediately see which bits match and which don't.

Simulator interface

Advanced level

The game doesn't end with simple circuits. After building the basic processor, ROM and RAM modules, data buses, and instruction decoders await. You'll program your processor in a built-in assembler — writing real programs for the architecture you built with your own hands.

Advanced circuits

AI Tutor

An AI assistant lives in the right sidebar. It analyzes your circuit, finds errors, and asks guiding questions to help you figure things out on your own. If you're truly stuck — it will show you a step-by-step solution.

AI Tutor

Who is this for

Students

Students

Computer science in practice. Live circuits you can touch with your mouse instead of dry theory.

Undergraduates

Undergraduates

The perfect companion for a computer architecture course. All key concepts from gates to pipelining.

Enthusiasts

Enthusiasts

For everyone who always wanted to understand how computers really work, from silicon to code.

CPUThis is a CPU. Design your own!
Start Learning