Skip to content

Commit db47b97

Browse files
authored
Merge pull request #2 from EdmanCoding/EdmanCoding-patch-2
Update chapter-02.md
2 parents 3a98da0 + 0a1ebb0 commit db47b97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solutions/chapter-02.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
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.
141141
---
142142
24. Create two 16-bit unsigned integers such that their sum causes an overflow.
143-
1. 0111 1111 1111 1111 + 0000 0000 0000 0001
143+
1. 1111 1111 1111 1111 + 0000 0000 0000 0001
144144
---
145145
25. Why does the sum of a negative 2’s complement number and a positive 2’s complement number never generate an overflow?
146146
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.

0 commit comments

Comments
 (0)