title: how can i convert hexadecimal number to binary using bit-mask
body: <pre><code>int main()
  {
      double hexa_number;
      double bitmask = 0x80;
      double i;
      printf("Enter 8 bit number in hexadecimal form: ");
      scanf("%lf",&amp; hexa_number);
      for( i = 0; i &lt;= 8; i++)
      {
          if(hexa_number&amp;(bitmask &gt;&gt; i))
              printf("1");
          else
              printf("0");
      }
      return 0;
  }
  </code></pre>
  
  <p>plus Displaying the binary representation of this number, 
    along with a count of the number of 0’s and 1’s in the binary number.
    i found other ways to convert it but not with bitmask</p>