Blocking.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <html lang="en">
  2. <head>
  3. <title>Blocking - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="Concrete-Syntax.html#Concrete-Syntax" title="Concrete Syntax">
  9. <link rel="prev" href="Bit-String-Encoding.html#Bit-String-Encoding" title="Bit String Encoding">
  10. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  11. <meta http-equiv="Content-Style-Type" content="text/css">
  12. <style type="text/css"><!--
  13. pre.display { font-family:inherit }
  14. pre.format { font-family:inherit }
  15. pre.smalldisplay { font-family:inherit; font-size:smaller }
  16. pre.smallformat { font-family:inherit; font-size:smaller }
  17. pre.smallexample { font-size:smaller }
  18. pre.smalllisp { font-size:smaller }
  19. span.sc { font-variant:small-caps }
  20. span.roman { font-family:serif; font-weight:normal; }
  21. span.sansserif { font-family:sans-serif; font-weight:normal; }
  22. --></style>
  23. </head>
  24. <body>
  25. <div class="node">
  26. <a name="Blocking"></a>
  27. <p>
  28. Previous:&nbsp;<a rel="previous" accesskey="p" href="Bit-String-Encoding.html#Bit-String-Encoding">Bit String Encoding</a>,
  29. Up:&nbsp;<a rel="up" accesskey="u" href="Concrete-Syntax.html#Concrete-Syntax">Concrete Syntax</a>
  30. <hr>
  31. </div>
  32. <h4 class="subsection">2.2.2 Blocking</h4>
  33. <p>After the bit string is obtained as described above, it is grouped into
  34. blocks of six. Continuing with the example, the string
  35. <pre class="example"> 111111101011110010001001100010100010100100100
  36. </pre>
  37. <p class="noindent">would be grouped as
  38. <pre class="example"> 111111 101011 110010 001001 100010 100010 100100 100
  39. </pre>
  40. <p class="noindent">Because the number of bits isn't a multiple of six, the last group has to
  41. be padded with zeros, to give
  42. <pre class="example"> 111111 101011 110010 001001 100010 100010 100100 100000
  43. </pre>
  44. <p class="noindent">Each of these six bit substrings is then treated as a binary number,
  45. with the most significant bit on the left. The numbers expressed in
  46. decimal are
  47. <pre class="example"> 63 43 50 9 34 34 36 32
  48. </pre>
  49. <p class="noindent"><a name="index-character-codes-153"></a>The character codes for the characters to be written are obtained by
  50. adding sixty to each of these numbers, so as to ensure that they will be
  51. printable characters. The resulting character codes are
  52. <pre class="example"> 123 103 110 69 94 94 96 92
  53. </pre>
  54. <p class="noindent">which implies that the tree in the example could be written to a file as
  55. <code>{gnE^^`\</code>.
  56. </body></html>