Alterna · учебный материал
Duplicate arithmetic
Double arithmetic: addition, subtraction, multiplication, division, column with animation of transfer. EEG No. 10, EGE No.14.
Что в этом материале
- Tables of arithmetical operations
- Column: step-by-step animation
- Multiplicity and division
- Arrhymetics in Arbitrary numeral system
- Communication with the processor
- Mini test
Содержание и основные понятия
Back to the table of contents
Alterna · Chapter 14 · page 14.3
Duplicate arithmetic
Adding, subtracting, multiplying, dividing is exactly like decimal, just numbers two.
Duplicate arithmetic
The rules are simple: just four combinations for addition and four for subtraction.
GEF
PIF
OGE No.10
EGE No. 14
01
Tables of arithmetical operations
If you look at the cell, you'll see the results big, just four rules for each operation.
Add
+
0
1
0
0
1
1
1
10
Check any table box.
Subtract
−
0
1
0
0
You can't!
1
1
0
Check any table box.
Duplicate
×
0
1
0
0
0
1
0
1
Check any table box.
Relationship to decimal point arithmetic
The binary build is working.
Just like that.
:: If the sum of the figures ≥ 2, write the balance of the division by 2 and the unit goes to the following level (transfer), subtracting is similar but with borrowing: if the upper figure is less than the lower figure, "sustained" 1 of the following entry (=2 in binary).
02
Column: step-by-step animation
Adding and subtracting two binary numbers with transport lighting
➕
Column: addition / subtract
Red loan (for deduction), green (for addition)
Operation
A (dual)
B (dual)
03
Multiplicity and division
In short: Multiplicity is a series of shifts; division is a set of subtractions
Multiplicity
It works like a 10th, we take the right of the second multiplier, we multiply it by the first, we write it with a shift.
Example: 11012 x 112
1101
× 11
─────
1101 (×1)
1101 (×1, со сдвигом на 1)
─────
100111₂
(= 13 × 3 = 39 = 100111₂)
Division: 1101102 102
110110₂ = 54₁₀. Делитель: 10₂ = 2₁₀.
54 ÷ 2 = 27, остаток 0
110110₂ ÷ 10₂ =
11011₂
, остаток 0.
Проверка: 11011₂ = 27₁₀. 27 × 2 = 54 ✓
05
Arrhymetics in Arbitrary numeral system
The column works the same way in any counting system.
Principle
The rules are the same as the decimal or the binary rules: folding the numbers apart, moving the senior level, changing the base only, moving at the sum ≥ q (and not ≥ 10 or ≥ 2).
Example: A316 + F716
3 + 7 = A (10₁₀, < 16 — без переноса)
A + F = 10 + 15 = 25₁₀ = 1×16 + 9 → пишем 9, перенос 1
Результат:
19A₁₆
Проверка: 163₁₀ + 247₁₀ = 410₁₀ = 19A₁₆ ✓
🧮
Column in Arbitrary numeral system
Basis
Operation
A
B
06
Communication with the processor
Chapter 25 will show you in detail — here is the answer.
Do You Know?
Processor subtracts through
additional code
: A − B = A + (−B)
I don't know.
Therefore, the ALU (Arifmatic Logistic System) only has a build-up scheme, and it is used to subtract it.
Chapter 15
.
07
Mini test
📝
5 random assignments