title: converting hex into binary in qt
body: <p>I have to read a raw data from MODbus apps and convert it into hex. In the MODbus, it  displays in binary and hex. Lets say I want to read 5 bits = <code>00011</code> and when i have converted it to hex it become 0x03 but then when I convert it from hex to binary again. It displays in my UI like this = <code>11</code> only, which the 3 remaining zero <code>000</code> is disappear. This is my coding:      </p>
  
  <pre><code>if (my_arguments.num_of_points &lt;=8) 
  {
      for(int x = 0; x &lt; 1; x++)
      {
          block33.append(block22[9+x]);
      }
  }
  
  hexVal = block33.toHex(); //for converting to binary
  stringValue = "0x " + block33.toHex().toUpper();  //display hex raw value
  
  QString hexadecimalNumber = hexVal;
  
  bool ok = false;
  
  QString binaryNumber = QString::number(hexadecimalNumber.toLongLong(&amp;ok, 16),2);
  
  ui-&gt;textEdit-&gt;append(binaryNumber);
  
  ui-&gt;textEdit-&gt;setText("RawValue in Hex = " + hex_rawValue );
  </code></pre>
  
  <p>Output =</p>
  
  <pre><code>  RawValue in Hex = 03
  
     11                  //but i read 5 bits so it should show `00011
  </code></pre>