title: Java Working with bits
body: <p>Let me start by saying I have never really worked with bits before in programming. I have an object that can be in 3 states and I want to represent those states using a 3 bit array. <BR>
  For example: <BR><BR>
  I have a race car and it can go forward,left, and right at a stand still the bits would be 000<BR>
  If the car was moving forward  the bits would be 010 if forward and left it would be 110 etc...
  <BR><BR>
  How would I set the bits and how could I read them back to get the values? </p>