8000 added binary calculations · How2PlayGithub/igcseCompSci@c31e44d · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit c31e44d

Browse files
added binary calculations
1 parent d3d03e4 commit c31e44d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

theory/05calculations.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
Take the binary sequence `1101110` and `11011110`. To add them together:
1616
1. Convert both the bytes into 8 bits. In our case, it'll be `01101110` and `11011110`
1717
2. Add the values. If the answer is 2, carry it over into the next column
18+
1819
| Carry | 1 | 1 | 1 | 1 | 1 | 1 | 1 | | |
1920
|--------|----------|---|---|---|---|---|---|---|---|
2021
| Byte 1 | | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 |
2122
| Byte 2 | | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 |
2223
| | Overflow | | | | | | | | |
23-
| Answer | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
24+
| Answer | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
2425

2526
## Logical shifts
2627
- A logical shift means to move a binary digit to either the left or the right

0 commit comments

Comments
 (0)
0