title: What are the max and min numbers a short type can store in C?
body: <p>I'm having a hard time grasping data types in C. I'm going through a C book and one of the challenges asks what the maximum and minimum number a <code>short</code> can store.</p>
  
  <p>Using <code>sizeof(short);</code> I can see that a short consumes 2 bytes. That means it's 16 bits, which means two numbers since it takes 8 bits to store the binary representation of a number. For example, 9 would be <code>00111001</code> which fills up one bit. So would it not be 0 to 99 for unsigned, and -9 to 9 signed?</p>
  
  <p>I know I'm wrong, but I'm not sure why. It says <a href="http://www.lix.polytechnique.fr/~liberti/public/computing/prog/c/C/CONCEPT/data_types.html" rel="noreferrer">here</a> the maximum is (-)32,767 for signed, and 65,535 for unsigned.</p>
  
  <blockquote>
    <p>short int, 2 Bytes, 16 Bits, -32,768 -> +32,767 Range (16kb)</p>
  </blockquote>