Kits
›
The Fractal Machine
RU
EN
ES
Contents
Introduction
History: patterns that repeat themselves
Lesson 0. Gates from transistors: for those who start from scratch
0.1. The idea: a transistor is a switch
0.2. Building
0.3. Check
Lesson 0 paste (Cmd+I)
Lesson 1. Memory: the latch and the D flip-flop
1.1. The idea: a loop that holds
1.2. Building
1.3. Check
Lesson 1 paste (Cmd+I)
Lesson 2. The counter: six flip-flops count to 63
2.1. The idea: add 1 in a column
2.2. Building
2.3. Check
Lesson 2 paste (Cmd+I)
Lesson 3. The raster scan: the screen dot by dot
3.1. The idea: the beam runs along the rows
3.2. Building
Try the patterns
3.3. Check
Lesson 3 paste (Cmd+I)
Lesson 4. The Sierpinski triangle: a fractal from ten gates
4.1. The idea: not a single common bit
4.2. Building
4.3. Check
Lesson 4 paste (Cmd+I)
Lesson 5. The chaos game: a triangle from chance
5.1. The idea: a half-way step
5.2. The idea: a step is a shift
5.3. Building
5.4. Check
Lesson 5 paste (Cmd+I)
Lesson 6 (bonus). Munching Squares: a living pattern from 1962
6.1. The idea: (x XOR y) < t
6.2. Building
6.3. Check
Lesson 6 paste (Cmd+I)
Summary
All the parts
Instructions in pictures
Lesson 4 in pictures
← Back to the lesson: Lesson 4. The Sierpinski triangle: a fractal from ten gates
4
The Sierpinski triangle
(x AND y) = 0 — a fractal from ten gates
kh
HB-03
(x AND y) = 0
AND
6×
0
OR
4×
0
NOR
1×
0
∞
© 2026 Daniil Khanin · khanin.info · HB-03
27
CANVAS
1
Delete
XOR
I0
x3
I1
y3
O0
pix
2
AND
3×
0
9×
AND
I0
x0
I1
y0
O0
a0
AND
I0
x1
I1
y1
O0
a1
AND
I0
x2
I1
y2
O0
a2
3
AND
3×
0
9×
AND
I0
x3
I1
y3
O0
a3
AND
I0
x4
I1
y4
O0
a4
AND
I0
x5
I1
y5
O0
a5
© 2026 Daniil Khanin · khanin.info · HB-03
28
CANVAS …
4
OR
3×
0
9×
OR
I0
a0
I1
a1
O0
o01
OR
I0
a2
I1
a3
O0
o23
OR
I0
a4
I1
a5
O0
o45
5
OR
1×
0
NOR
1×
0
6×
OR
I0
o01
I1
o23
O0
o03
NOR
I0
o03
I1
o45
O0
pix
729
© 2026 Daniil Khanin · khanin.info · HB-03
29
← Back to the lesson
Lesson 4. The Sierpinski triangle: a fractal from ten gates