Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion solutions/chapter-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
1. If the two unsigned number added and leftmost digit of the sum will be 1 this means an overflow occured. Because unsigned numbers are positive and leftmost digit is 0.
---
24. Create two 16-bit unsigned integers such that their sum causes an overflow.
1. 0111 1111 1111 1111 + 0000 0000 0000 0001
1. 1111 1111 1111 1111 + 0000 0000 0000 0001
---
25. Why does the sum of a negative 2’s complement number and a positive 2’s complement number never generate an overflow?
1. When adding a negative and a positive 2's complement number, overflow is not possible because the result will always be within the range of representable values for the given bit width.
Expand Down