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 1 in pictures
← Back to the lesson: Lesson 1. Memory: the latch and the D flip-flop
1
Memory
latch → D flip-flop: writing on the clock edge
kh
HB-03
1
D
1
CLK
DFF
D
CLK
Q
nQ
Q
IN
6×
OUT
6×
NOR
2×
0
NOT
2×
0
AND
2×
0
0
2×
1×
∞
Ctrl
+
G
SRLatch
DLatch
DFF
© 2026 Daniil Khanin · khanin.info · HB-03
12
SRLatch
1
IN
2×
OUT
2×
NOR
2×
0
6×
R
S
Q
nQ
NOR
I0
R
I1
nQ
O0
Q
NOR
I0
S
I1
Q
O0
nQ
2
Ctrl
+
G
Library
…
Chip N
2×
Library
…
SRLatch
Enter
SRLatch
R
S
Q
nQ
© 2026 Daniil Khanin · khanin.info · HB-03
13
DLatch
3
IN
2×
OUT
2×
NOT
1×
0
AND
2×
0
8×
D
EN
Q
nQ
NOT
I0
D
O0
nD
AND
I0
D
I1
EN
O0
setD
AND
I0
nD
I1
EN
O0
rstD
4
SRLatch
1×
4×
SRLatch
R
rstD
S
setD
Q
Q
nQ
nQ
© 2026 Daniil Khanin · khanin.info · HB-03
14
DLatch …
DFF
5
Ctrl
+
G
Library
…
Chip N
2×
Library
…
DLatch
Enter
DLatch
D
EN
Q
nQ
6
IN
2×
OUT
2×
NOT
1×
0
DLatch
2×
9×
D
CLK
Q
nQ
NOT
I0
CLK
O0
nCLK
DLatch
D
D
EN
nCLK
Q
mid
nQ
DLatch
D
mid
EN
CLK
Q
Q
nQ
nQ
© 2026 Daniil Khanin · khanin.info · HB-03
15
DFF …
CANVAS
7
Ctrl
+
G
Library
…
Chip N
2×
Library
…
DFF
Enter
DFF
D
CLK
Q
nQ
8
0
2×
DFF
1×
1×
7×
0
D
0
CLK
DFF
D
D
CLK
CLK
Q
Q
nQ
nQ
Q
1
D
1
CLK
Q
CLK 0 → 1: Q = D
0
D
1
CLK
Q
D = 0, CLK = 1: Q
© 2026 Daniil Khanin · khanin.info · HB-03
16
← Back to the lesson
Lesson 1. Memory: the latch and the D flip-flop