title: how to access a specific bit in an int variable in x86 assembly to check if it is 0 or 1?
body: <p>how to access a specific bit in an int variable in x86 assembly to check if it is 0 or 1?</p>
  
  <p>I thought this would work, but it doesn't</p>
  
  <pre><code>int main()
  {
    int num = 3; //stored as a 32 bit binary I assumed something like ...011
  
    //now I need to test the 2nd bit of num
    __asm  
    {  
      test num, 1 // By the way, how would I check the ZF flag?
    }
  }
  </code></pre>