title: Storing the hex value FF in an unsigned 8 bit integer produces garbage instead of -1
body: <p>Behold my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
    uint8_t no_value = 0xFF;
    std::cout &lt;&lt; "novalue: " &lt;&lt; no_value &lt;&lt; std::endl;
    return 0;
  }
  </code></pre>
  
  <p>Why does this output: novalue: ▒ </p>
  
  <p>On my terminal it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/l1nz3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l1nz3.png" alt="enter image description here"></a></p>
  
  <p>I was expecting -1. </p>
  
  <p>After all, if we:</p>
  
  <p><a href="https://i.stack.imgur.com/gU7oE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gU7oE.png" alt="enter image description here"></a> </p>
  
  <p>we get:</p>
  
  <p><a href="https://i.stack.imgur.com/jW2ZO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jW2ZO.png" alt="enter image description here"></a></p>