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 0 in pictures
← Back to the lesson: Lesson 0. Gates from transistors: for those who start from scratch
0
Gates (optional)
NOT, NAND, NOR, AND, OR, XOR from transistors
kh
HB-03
NOT
NAND
NOR
AND
OR
XOR
VCC
1×
GND
1×
IN
11×
OUT
6×
P
11×
N
11×
∞
Ctrl
+
G
NOT
NAND
NOR
AND
OR
XOR
© 2026 Daniil Khanin · khanin.info · HB-03
4
CANVAS
NOT
1
VCC
1×
GND
1×
2×
VCC
VCC
GND
GND
2
IN
1×
OUT
1×
P
1×
N
1×
6×
I0
O0
VCC
O0
G
P
I0
O0
GND
G
N
I0
© 2026 Daniil Khanin · khanin.info · HB-03
5
NOT …
NAND
3
Ctrl
+
G
Library
…
Chip N
2×
Library
…
NOT
Enter
NOT
I0
O0
4
IN
2×
OUT
1×
P
2×
N
1×
9×
I0
I1
O0
VCC
O0
G
P
I0
VCC
O0
G
P
I1
O0
mid
G
N
I0
© 2026 Daniil Khanin · khanin.info · HB-03
6
NAND …
NOR
5
N
1×
3×
mid
GND
G
N
I1
6
Ctrl
+
G
Library
…
Chip N
2×
Library
…
NAND
Enter
NAND
I0
I1
O0
7
IN
2×
OUT
1×
P
2×
N
1×
9×
I0
I1
O0
VCC
mid
G
P
I0
mid
O0
G
P
I1
O0
GND
G
N
I0
© 2026 Daniil Khanin · khanin.info · HB-03
7
NOR …
AND
8
N
1×
3×
O0
GND
G
N
I1
9
Ctrl
+
G
Library
…
Chip N
2×
Library
…
NOR
Enter
NOR
I0
I1
O0
10
IN
2×
OUT
1×
P
2×
N
1×
9×
I0
I1
O0
VCC
n
G
P
I0
VCC
n
G
P
I1
n
mid
G
N
I0
© 2026 Daniil Khanin · khanin.info · HB-03
8
AND …
11
N
2×
P
1×
9×
mid
GND
G
N
I1
VCC
O0
G
P
n
O0
GND
G
N
n
12
Ctrl
+
G
Library
…
Chip N
2×
Library
…
AND
Enter
AND
I0
I1
O0
© 2026 Daniil Khanin · khanin.info · HB-03
9
OR
13
IN
2×
OUT
1×
P
2×
N
1×
9×
I0
I1
O0
VCC
mid
G
P
I0
mid
n
G
P
I1
n
GND
G
N
I0
14
N
2×
P
1×
9×
n
GND
G
N
I1
VCC
O0
G
P
n
O0
GND
G
N
n
15
Ctrl
+
G
Library
…
Chip N
2×
Library
…
OR
Enter
OR
I0
I1
O0
© 2026 Daniil Khanin · khanin.info · HB-03
10
XOR
16
IN
2×
OUT
1×
OR
1×
NAND
1×
AND
1×
9×
I0
I1
O0
OR
I0
I0
I1
I1
O0
o
NAND
I0
I0
I1
I1
O0
n
AND
I0
o
I1
n
O0
O0
17
Ctrl
+
G
Library
…
Chip N
2×
Library
…
XOR
Enter
XOR
I0
I1
O0
© 2026 Daniil Khanin · khanin.info · HB-03
11
← Back to the lesson
Lesson 0. Gates from transistors: for those who start from scratch