2.5 KiB
2.5 KiB
Lecture 1 (12:00)
Addition
| Binary Base | 2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
|---|---|---|---|---|---|---|---|---|
| Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Int1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 |
| Int2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
| Overflow | 1 | 1 | ||||||
| Result | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| Decimal | 26 |
Multiplication
| Binary Base | 2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
|---|---|---|---|---|---|---|---|---|
| Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Int1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| Factor | 1 | |||||||
| Result | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| Decimal | 6 |
- Multiply binary shift to the left. Example is x2
- Multiplying by non powers of 2, split and multiply.
| Binary Base | 2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
|---|---|---|---|---|---|---|---|---|
| Decimal | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Int1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 |
| Factor Decimal | 6 | |||||||
| Result 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
| Result 2 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
| Overflow | 1 | 1 | ||||||
| Total | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 |
| Denary | 114 |
- Example of 19x6, which simplifies into
(19x4) + (19x2), which is shown above by doing two binary shifts and adding them together.


