---
title: "Comment by Robin Mason on \"Binary Search\" | Hashnode"
description: "To your attention writer, the line &quot;This causes an overflow error. In C++ any value which is greater than 2147483647 (2^33 - 1) gets started back with (-2^"
url: "https://hashnode.com/posts/binary-search/63c7f48216cfbf7c0f2b412f/comment/63e4b915d0024cf4f3e75cd2"
---

[Discussion](https://hashnode.com/posts/binary-search/63c7f48216cfbf7c0f2b412f)

Comment [Binary Search](https://hashnode.com/posts/binary-search/63c7f48216cfbf7c0f2b412f)

[Robin Mason](https://hashnode.com/@robmon)

[Feb 9, 2023](https://hashnode.com/posts/binary-search/63c7f48216cfbf7c0f2b412f/comment/63e4b915d0024cf4f3e75cd2)

To your attention writer, the line "This causes an overflow error. In C++ any value which is greater than 2147483647 (2^33 - 1) gets started back with (-2^33)" looks completely wrong and misleading. The idea you are trying to convey is appreciable but the information you have provided is not to the mark. It is -2^31 and not -2^33. This value is contradictory in itself as signed integer in C++ cannot hold values beyond -2^31. Overflow takes values from extreme positive to lowest possible value depending on whether the integer is signed or not. I request you to avoid such mistakes for yet-to-come corpus.

[Aman Nadaf](https://hashnode.com/@iRatherFear)

[Feb 9, 2023](https://hashnode.com/posts/binary-search/63c7f48216cfbf7c0f2b412f/comment/63e4b915d0024cf4f3e75cd2#reply-63e4c25dd0024cf4f3e75e54)

Thank you for noticing i have updated the post.
