title: stroll, strol functions not giving correct output for long_min
body: <p>For the following code</p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  int main()
  {
     bitset&lt;64&gt;b(numeric_limits&lt;long&gt;::min());
     string s=b.to_string();
     char *ptr=new char [s.size()+1];
     strcpy(ptr,s.c_str());
     long l1=strtol(ptr,NULL,2);
     cout&lt;&lt;"l1= "&lt;&lt;l1&lt;&lt;endl;
    long l2=strtoul(ptr,NULL,2);
     cout&lt;&lt;"l2= "&lt;&lt;l2&lt;&lt;endl;
     cout&lt;&lt;strtoul(ptr,NULL,2)&lt;&lt;endl;
  }
  </code></pre>
  
  <p>The output is</p>
  
  <pre><code>l1= 9223372036854775807
  l2= -9223372036854775808
  9223372036854775808
  </code></pre>
  
  <p>Why is <code>l1</code> not <code>long_min</code> and why is <code>l2</code>? I've read that the string can contain <code>+</code>/<code>-</code> sign in the beginning for ato*,strto* functions. But negative numbers in binary don't have any <code>-</code> sign in 2's complement that computer uses. I'm confused.</p>