title: Check if a number is divisible by 3
body: <p>Write code to determine if a number is divisible by 3.  The input to the function is a <strong>single</strong> bit, 0 or 1, and the output should be 1 if the number received so far is the binary representation of a number divisible by 3, otherwise zero.</p>
  
  <p>Examples:</p>
  
  <pre><code>input  "0":       (0)  output 1
  inputs "1,0,0":   (4)  output 0
  inputs "1,1,0,0": (6)  output 1
  </code></pre>
  
  <p>This is based on an interview question.  I ask for a drawing of logic gates but since this is stackoverflow I'll accept any coding language.  Bonus points for a hardware implementation (verilog etc).</p>
  
  <p><strong>Part a (easy):</strong> First input is the MSB.</p>
  
  <p><strong>Part b (a little harder):</strong> First input is the LSB.</p>
  
  <p><strong>Part c (difficult):</strong> Which one is faster and smaller, (a) or (b)?  (Not theoretically in the Big-O sense, but practically faster/smaller.)  Now take the slower/bigger one and make it as fast/small as the faster/smaller one.</p>