title: What are 0x01 and 0x80 representative of in C bitwise operations?
body: <p>I'm trying to reverse the order of bits in C (homework question, subject: bitwise operators).  I found <a href="https://stackoverflow.com/questions/2602823/in-c-c-whats-the-simplest-way-to-reverse-the-order-of-bits-in-a-byte">this</a> solution, but I'm a little confused by the hex values used -- 0x01 and 0x80.</p>
  
  <pre><code>  unsigned char reverse(unsigned char c) {
       int shift;
       unsigned char result = 0;
  
       for (shift = 0; shift &lt; CHAR_BITS; shift++) {
          if (c &amp; (0x01 &lt;&lt; shift))
              result |= (0x80 &gt;&gt; shift);
       }
       return result;
    }
  </code></pre>
  
  <p>The <a href="http://www.deitel.com/Books/C/CHowtoProgram5e/tabid/1704/Default.aspx" rel="nofollow noreferrer">book</a> I'm working out of hasn't discussed these kinds of values, so I'm not really sure what to make of them.  Can somebody shed some light on this solution?  Thank you!</p>