title: Wrap around explanation for signed and unsigned variables in C?
body: <p>I read a bit in C spec that unsigned variables(in particular <em>unsigned short <code>int</code></em>) perform some so called <em>wrap around</em> on integer overflow, although I couldn't find anything on signed variables except that I left with <strong>undefined behavior</strong>.</p>
  
  <p>My professor told me that their values also get wrapped around (maybe he just meant gcc). I thought the bits just get truncated and the bits I left with give me some weird value!</p>
  
  <p>What wrap around is and how is it different from just truncating bits.</p>