Browse Source

fix 064_builtins: @addWithOverflow() explanation

The last two examples do not overflow, because the
result is small enough. This was probably just a typing
error in the original explanation.
DerTee 3 years ago
parent
commit
f67216f19f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      exercises/064_builtins.zig

+ 2 - 2
exercises/064_builtins.zig

@@ -49,8 +49,8 @@ pub fn main() void {
     //    1101 + 1 = 1110      No.
     //    1101 + 1 = 1110      No.
     //    1110 + 1 = 1111      No.
     //    1110 + 1 = 1111      No.
     //    1111 + 1 = 0000      Yes! (Real answer is 10000)
     //    1111 + 1 = 0000      Yes! (Real answer is 10000)
-    //    0000 + 1 = 0001      Yes!
-    //    0001 + 1 = 0010      Yes!
+    //    0000 + 1 = 0001      No.
+    //    0001 + 1 = 0010      No.
     //
     //
     // Also, check out our fancy formatting! b:0>4 means, "print
     // Also, check out our fancy formatting! b:0>4 means, "print
     // as a binary number, zero-pad right-aligned four digits."
     // as a binary number, zero-pad right-aligned four digits."