title: Convert Byte String to Int in Scheme
body: <p>I have code like this to convert hex into byte string</p>
  
  <pre><code>(define (word-&gt;bin s)
    (let ((n (string-&gt;number s)))
      (bytes (bitwise-and (arithmetic-shift n -24) #xFF)
      (bitwise-and (arithmetic-shift n -16) #xFF)
      (bitwise-and (arithmetic-shift n -8) #xFF)
      (bitwise-and n #xFF))))
  (word-&gt;bin "#x10000002")
  </code></pre>
  
  <p>I'm thinking of a similar function to convert binary into integers, then print it. The end result is the binary translated to hex. Some helpful links:
  <a href="http://download.plt-scheme.org/doc/372/html/mzscheme/mzscheme-Z-H-11.html#node_sec_11.2.1" rel="nofollow noreferrer">http://download.plt-scheme.org/doc/372/html/mzscheme/mzscheme-Z-H-11.html#node_sec_11.2.1</a></p>
  
  <p><a href="http://docs.plt-scheme.org/reference/bytestrings.html#(def._((quote._~23~25kernel)._bytes-~3estring/utf-8))" rel="nofollow noreferrer">http://docs.plt-scheme.org/reference/bytestrings.html#(def.<em>((quote.</em>~23~25kernel)._bytes-~3estring/utf-8))</a></p>