Lesson 2 - Binary Additions
Lesson 2 - Binary Additions
At the start of every lesson we get ourselves ready to learn so that we can learn lots in
every lesson and make huge progress in every lesson. We show that we are ready to
learn by:
7 6
3
00000111
7 6
4
00010110
22 21
5
00010110
22 21
6
00001110
11 12
13 14
7
00001110
11 12
13 14
8
10000011
128 131
129 132
9
10000011
128 131
129 132
10
Converting from decimal to binary
Try these conversions from decimal to binary. 128 64 32 16 8 4 2 1
1.65
2.129
11
Converting from decimal to binary
Try these conversions from decimal to binary. 128 64 32 16 8 4 2 1
● 65
● 160
12
Binary Additions
In decimal, 0 + 0 = 0
14
The four golden rules of binary addition
Rule 2 0
0+1=1 + 1
1
In decimal, 0 + 1 = 1
15
The four golden rules of binary addition
Rule 3 1
1 + 1 = 10 + 1
1 0
In decimal, 1 + 1 = 2
128 64 32 16 8 4 2 1
16
The four golden rules of binary addition
Rule 4 1
1 + 1 + 1 = 11 1
+ 1
1 1
In decimal, 1 + 1 + 1 = 3
128 64 32 16 8 4 2 1
17
Binary addition
111 + 11 = 1010 in binary
7 + 3 = 10 in decimal 1 1 1
+ 1 1
= 1 0 1 0
1 1
Rules
●0 + 0 = 0
●0 + 1 = 1
●1 + 1 = 10
●1 + 1 + 1 = 11
Binary addition: try it yourself!
A. 100 + 1 = ?
B. 110 + 11 = ?
C. 101 + 100 = ?
D.11 + 111 = ? +
E. 1010 + 1111 = ? =
Rules
●0 + 0 = 0
●0 + 1 = 1
●1 + 1 = 10
●1 + 1 + 1 = 11
42
Binary addition: solutions
A. 100 + 1 = 101
B. 110 + 11 = 1001
C. 101 + 100 = 1001
D.11 + 111 = 1010 +
E. 1010 + 1111 = 11001 =
Rules
●0 + 0 = 0
●0 + 1 = 1
●1 + 1 = 10
●1 + 1 + 1 = 11
43
BINARY ADDITION – Overflow
The Rules
11 1 1. 0 + 0 = 0
2. 0 + 1 = 1
10010110
3. 1 + 1 = 0 Carry 1
4. 1 + 1 + 1 = 1 Carry 1
+ 1 0 00 1 1 0 0
= 10 0 1 0 0 0 1 0
Carry Bit -
overflow
Overflow:
Overflow errors occur when a calculation gives a bigger result
than your computer can handle.
An overflow is an additional bit for the processor to process.
This overflow is beyond the amount the CPU can process.
A 16-bit processor can only process 16 bits at a time. If the CPU
receives 17 bits an overflow has occurred, and the instruction
will not be executed
The effects of an overflow error can vary. It might make the
program crash, or it might just ignore the extra digit on the left
and produce an unexpected result