title: Python - Confused by if statement if bits&0x20==0x20
body: <p>I'm confused about the '&amp;' in the below if statement.
  Is the fist if saying "if bits <em>and</em> 0x10 = 0x10"</p>
  
  <pre><code>def lcd_byte(bits, mode):
    if bits&amp;0x10==0x10:
      GPIO.output(LCD_D4, True)
    if bits&amp;0x20==0x20:
      GPIO.output(LCD_D5, True)
    if bits&amp;0x40==0x40:
      GPIO.output(LCD_D6, True)
     if bits&amp;0x80==0x80:
      GPIO.output(LCD_D7, True)
  </code></pre>