title: Binary of a number
body: <p>Is there a simply way to convert decimal/ascii 6 bit decimal numbers from 1 to 100 to binary representation?
  To be more specific im interested in 6 bit binary ascii. So I made this to get int 32.
  For example &quot;u&quot; is changed to 61 instead 117 in standard decimal ascii.
  Then this 61 is needed to be &quot;111101&quot; instead of traditional &quot;01110101&quot; but after this 48 + 8 math it's not important as now it's normal binary, just with 6 bits used.</p>
  <pre><code>foreach (char c in partToDecode)
                          {
                              var sum = c - 48;
                              if (sum&gt;40)
                              {
                                  sum = sum - 8;
                              }
  </code></pre>
  <p>Found this, but i don't have a clue how to traspose it to c#</p>
  <pre><code>void binary(unsigned n) {
     unsigned i;
     // Reverse loop
     for (i = 1 &lt;&lt; 31; i &gt; 0; i &gt;&gt;= 1)
         printf(&quot;%u&quot;, !!(n &amp; i));
  }
  
  . . .
  
  binary(65);
  </code></pre>