first commit
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
## Lecture 1 (12:00) - Twos Compliment
|
||||
|
||||
- First field becomes -128
|
||||
- Overflow happens when:
|
||||
- Both numbers are positive or negative
|
||||
- Sign is different to sign of input
|
||||
|
||||
| -128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | Output |
|
||||
|------|----|----|----|---|---|---|---|--------|
|
||||
| 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 10 |
|
||||
| | | | | | | | | |
|
||||
| 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | Invert |
|
||||
| | | | | | | | 1 | 1 |
|
||||
| | | | | | | 1 | | Overflow |
|
||||
| 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | -10 |
|
||||
|
||||
-10x10 = -10 x (8+2) = (-10 x 8) + (-10 x 2)
|
||||
|
||||
| -128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|
||||
|------|----|----|----|---|---|---|---|------|
|
||||
| 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | -10 |
|
||||
| 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | <<< |
|
||||
| | | | | | | | | |
|
||||
| 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | -10 |
|
||||
| 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | < |
|
||||
| | | | | | | | | |
|
||||
| 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | -80 |
|
||||
| 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | -20 |
|
||||
| 1 | 1 | | | | | | | Overflow |
|
||||
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | -100 |
|
@@ -0,0 +1 @@
|
||||
Computer Science with Cyber Security
|
@@ -0,0 +1 @@
|
||||
George Wilkinson
|
Reference in New Issue
Block a user