title: How to convert 64 bit binary string in to a decimal number in tcl?
body: <p>I'm trying to convert a 64 bit binary string value () in to an integer but I'm apparently hitting the tcl limit and getting:</p>
  
  <pre><code>integer value too large to represent
  </code></pre>
  
  <p>Binary String:</p>
  
  <pre><code>000000000000101000000000000010100000000000000100
  </code></pre>
  
  <p>The proc I'm using to convert from binary to integer is:</p>
  
  <pre><code>  proc binary2decimal {bin} {
       binary scan [binary format B64 [format %064d $bin]] I dec
       return $dec
    }
  </code></pre>
  
  <p>I tried  using 64 for formatting and also tried LI to no avail. I read about "wide" but did not understand if it could be applied here.</p>
  
  <p>P.S: I'm using tcl 8.4</p>