title: reading certain digits from binary data
body: <p>I have one python script which i am trying to convert and stuck in one place and unable to proceed. Please check where ever i have mentioned "Stuck here" in below code. any help would be appreciated</p>
  
  <p>Original Python script:</p>
  
  <pre><code>import hashlib
  meid = raw_input("Enter an MEID: ").upper()
  s = hashlib.sha1(meid.decode('hex'))
  #decode the hex MEID (convert it to binary!)
  pesn = "80" + s.hexdigest()[-6:].upper()
  #put the last 6 digits of the hash after 80
  print "pESN: " + pesn
  </code></pre>
  
  <p>My C# conversion:</p>
  
  <pre><code>UInt64 EsnDec = 2161133276;
  string EsnHex=string.Format("{0:x}", EsnDec);
  string m = Convert.ToString(Convert.ToUInt32(EsnHex, 16), 2);
  /*---------------------------------------------
  Stuck here. Now m got complete binary data
  and i need to take last 6 digits as per python
  script and prefix "80". 
  ---------------------------------------------*/
  Console.WriteLine(m);
  Console.Read();
  </code></pre>