Kits
›
Cómo cuenta un procesador
RU
EN
ES
Contenido
Introduction
History: how machines learned to add
Lesson 1. Gates and the half adder: 1 + 1 = 10
1.1. The idea: adding one digit
1.2. Building
1.3. Check
Lesson 1 paste (Cmd+I)
Lesson 2. The full adder and 4 bits: the carry runs through the digits
2.1. The idea: column addition
2.2. Building
2.3. Check
Lesson 2 paste (Cmd+I)
Lesson 3. Negative numbers and subtraction: two's complement
3.1. The idea: numbers on a circle
3.2. Flags
3.3. Building
3.4. Check
Lesson 3 paste (Cmd+I)
Lesson 4. 8 bits and comparison: CMP is subtraction
4.1. The idea: two halves
4.2. The idea: comparison is subtraction
4.3. Building
4.4. Check
Lesson 4 paste (Cmd+I)
Lesson 5. The ± calculator: the minus on a lamp, the magnitude on the display
5.1. The idea: the magnitude is one more subtraction
5.2. Building
5.3. Check
Lesson 5 paste (Cmd+I)
Lesson 6 (bonus). Decimal math: add six
6.1. The idea: a digit in four bits
6.2. Why the display is in HEX mode
6.3. Building
How to set the digits
6.4. Check
Lesson 6 paste (Cmd+I)
Summary
All the parts
Instructions in pictures
Lesson 2 in pictures
← Back to the lesson: Lesson 2. The full adder and 4 bits: the carry runs through the digits
2
4 bits
the full adder FA and four digits in a chain
kh
HB-02
A
0
A3
1
A2
1
A1
1
A0
B
1
B3
0
B2
0
B1
1
B0
16
S
7 + 9 = 16
IN
12×
OUT
7×
HA
2×
1
OR
1×
1
0
8×
4b
0
A
3×
∞
Ctrl
+
G
FA
ADDER4
© 2026 Daniil Khanin · khanin.info · HB-02
13
CANVAS
FA
1
Delete
0
A
0
B
HA
A
A
B
B
S
S
C
C
S
C
2
IN
3×
OUT
2×
HA
2×
1
OR
1×
1
11×
A
B
CI
S
CO
HA
A
A
B
B
S
s1
C
c1
HA
A
s1
B
CI
S
S
C
c2
OR
I0
c1
I1
c2
O0
CO
© 2026 Daniil Khanin · khanin.info · HB-02
14
FA …
ADDER4
3
Ctrl
+
G
Library
…
Chip N
2×
Library
…
FA
Enter
FA
A
B
CI
S
CO
4
IN
9×
OUT
5×
A0
A1
A2
A3
B0
B1
B2
B3
CI
S0
S1
S2
S3
CO
5
FA
3×
15×
FA
A
A0
B
B0
CI
CI
S
S0
CO
c1
FA
A
A1
B
B1
CI
c1
S
S1
CO
c2
FA
A
A2
B
B2
CI
c2
S
S2
CO
c3
© 2026 Daniil Khanin · khanin.info · HB-02
15
ADDER4 …
CANVAS
6
FA
1×
5×
FA
A
A3
B
B3
CI
c3
S
S3
CO
CO
7
Ctrl
+
G
Library
…
Chip N
2×
Library
…
ADDER4
Enter
ADDER4
A0
A1
A2
A3
B0
B1
B2
B3
CI
S0
S1
S2
S3
CO
8
0
5×
5×
0
A0
0
A1
0
A2
0
A3
0
B0
© 2026 Daniil Khanin · khanin.info · HB-02
16
CANVAS …
9
0
3×
3×
0
B1
0
B2
0
B3
10
ADDER4
1×
14×
ADDER4
A0
A0
A1
A1
A2
A2
A3
A3
B0
B0
B1
B1
B2
B2
B3
B3
CI
GND
S0
S0
S1
S1
S2
S2
S3
S3
CO
S4
11
4b
0
A
3×
4b
DEC
A
4b
DEC
B
8b
DEC
S
A
0
A3
0
A2
1
A1
1
A0
B
0
B3
1
B2
0
B1
0
B0
7
S
A
0
A3
1
A2
1
A1
1
A0
B
1
B3
0
B2
0
B1
1
B0
16
S
© 2026 Daniil Khanin · khanin.info · HB-02
17
← Back to the lesson
Lesson 2. The full adder and 4 bits: the carry runs through the digits