title: Convert Hex string to Binary string C#
body: <p>I am trying to convert hex string into binary. My code looks as follows:</p>
  
  <pre><code>sw.Write(Convert.ToString(Convert.ToInt32(value, 16), 2));
  </code></pre>
  
  <p>However this works for most of the values; But when I convert hex string 0x101 to binarystring, my result is 100000001, rathen than 000100000001. Please help me.</p>