You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers binary addition, binary subtraction using two's complement, overflow, and bit shifting (logical and arithmetic shifts). These are core skills for the OCR H446 specification.
Binary addition follows the same rules as denary addition, but with only two digits (0 and 1).
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
When both bits are 1, the sum is 0 and the carry is 1 (just like 1+1=2 in denary, which is "10" in binary).
If there is also a carry-in of 1: 1 + 1 + 1 = 1 with carry 1.
Carry: 1 1 1 1 1 1
0 1 1 0 1 0 1 1 (107)
+ 0 0 1 1 0 1 0 1 ( 53)
─────────────────
1 0 1 0 0 0 0 0 (160)
Verification: 107 + 53 = 160. Correct.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.