Thirty small steps into a computer
The OpenKernel course
Understand an idea, try it in a visible CPU, and solve a challenge checked by the machine. Start with three instructions and finish with your own tiny programs.
No account or installation. A lesson is completed only when your program passes every challenge case. Progress and badges stay in this browser.
Start lesson 1 → Open the free lab
Your progress
Progress is loaded in your browser.
Complete a unit to earn its badge. Badges record checked challenges, not visits.
Private browsing, clearing site data, or a different device may remove your local record. You can take any lesson in any order.
Unit 1 · about 20 minutes
Meet the Machine
Explain fetch/execute, registers, PC, output and stopping.
0 of 3 checked challenges complete
- Your First Emoji Program · 5 minutes
Move a number into the CPU, print it, and stop.
- Understanding Registers · 8 minutes
Use the eight fast workspaces without losing a value.
- Following the Program Counter · 7 minutes
Read a trace and separate source lines from instruction addresses.
Unit 2 · about 28 minutes
Arithmetic and Input
Build integer calculations with saved inputs and test cases.
0 of 3 checked challenges complete
- Emoji Math · 9 minutes
Combine addition, subtraction, and multiplication as ordered steps.
- Division and Remainders · 9 minutes
Explain floor division and signed remainder, including negatives.
- A Two-input Calculator · 10 minutes
Build a reusable calculator instead of a fixed answer.
Unit 3 · about 28 minutes
Byte Memory
Distinguish values from addresses and read/write byte storage.
0 of 3 checked challenges complete
- Memory: The Computer’s Notebook · 10 minutes
Store and actually retrieve a byte after overwriting R0.
- Addresses in Registers · 9 minutes
Use an address as data and read a lookup table.
- Bytes and Boundaries · 9 minutes
See why memory wraps while registers do not.
Unit 4 · about 29 minutes
Decisions and Flags
Use comparison, remainder and labeled paths to express decisions.
0 of 3 checked challenges complete
- Conditional Logic: Making Decisions · 10 minutes
Compare values, then branch on a stored flag.
- Even or Odd · 9 minutes
Use remainder and a branch to classify input.
- A Memory-backed Decision · 10 minutes
Make a decision from stored data and record the result.
Unit 5 · about 34 minutes
Repetition and Counters
Use bounded loops, zero cases, counters and accumulators.
0 of 3 checked challenges complete
- Loops: Repeating Things · 10 minutes
Pair LOOP with RETURN and treat zero repeats correctly.
- Building a Counter · 12 minutes
Print 1 to 10 and generalize the count.
- Sum One to N · 12 minutes
Keep an accumulator separate from the loop counter.
Unit 6 · about 42 minutes
Algorithms with State
Describe and inspect factorial, Fibonacci and reverse-copy invariants.
0 of 3 checked challenges complete
- Factorial and Loop Invariants · 12 minutes
Use a multiplicative accumulator and explain why 0! is 1.
- The Fibonacci Sequence · 15 minutes
Keep two previous values and update them in a safe order.
- Reverse a Memory Buffer · 15 minutes
Copy a buffer backward using source and destination pointers.
Unit 7 · about 39 minutes
The Stack and Functions
Use LIFO data, call frames and save/restore conventions.
0 of 3 checked challenges complete
- Stack Operations: Last In, First Out · 12 minutes
Save values on the data stack and restore them in reverse order.
- Calling a Subroutine · 12 minutes
Reuse code and return to the instruction after CALL.
- Preserving a Caller’s State · 15 minutes
Use a save/restore convention when a function needs scratch space.
Unit 8 · about 39 minutes
Bits and Representation
Select and toggle bits and explain signed 32-bit behavior.
0 of 3 checked challenges complete
- Bit Masks and Flags · 12 minutes
Select individual bits with AND and set them with OR.
- Toggling Bits · 12 minutes
Use XOR’s reversible change to update a saved setting.
- Signed Bits and the Largest Value · 15 minutes
Understand NOT and test a signed difference with a sign mask.
Unit 9 · about 45 minutes
Scheduling, Cores and Events
Distinguish scheduling policy, work partition and handler state restoration.
0 of 3 checked challenges complete
- Cooperative Scheduling · 15 minutes
Take turns between tasks and distinguish policy from CPU instructions.
- Partitioning Work Across Cores · 15 minutes
Divide independent jobs and combine their results.
- Interrupts and Handlers · 15 minutes
Handle an event and restore the interrupted foreground value.
Unit 10 · about 56 minutes
Build Small Programs
Combine the instruction set into a game, buffer utility and job dispatcher.
0 of 3 checked challenges complete
- A Tiny Target Game · 18 minutes
Build a three-round game with stored state and scoring.
- A Stack-powered Buffer Utility · 18 minutes
Combine input, loops, the stack, and indexed storage.
- Your Own Mini Operating System · 20 minutes
Dispatch queued jobs to reusable services and record their results.