title: Checking UINT8_t values as a boolean?
body: <p>I have several UINT8_T values and I may be confused here but can I use their values as a conditional statement in objective C? so if I have 00000001 then bool digitalOutput1 should be set to true?</p>
  
  <p>Sorry if this is unclear... Please feel free to ask for any clarification.</p>
  
  <p>How I traverse the UINT8_T object is as such:</p>
  
  <pre><code>  uint8_t value = input.value; //This is a value from an outside source
    for(UISwitch *temp in switchArrayIn){
      temp.on = (value &amp; 1)
      value &gt;&gt;= 1;
  }
  </code></pre>
  
  <p>so I am shifting down each bit to check if each value has a 1 or a 0, and if it does have a 1 - turn on a switch output; if it does not - turn it off.</p>
  
  <p><strong>Basically what I am asking is if I am traversing a UINT8_T variable/instance that has a value assigned to it, whatever that may be. Can I use it as a conditional statement in comparison to boolean values? i.e.;</strong></p>
  
  <pre><code> bool test = TRUE;
      uint8_t = 00000001;
     for(int i = 0; i&lt;7; i++){
      if(test == (value &amp; i)){
     // do something
  }
  </code></pre>