title: how does a modulus allow a negative number to be encoded
body: <p>if x represents the value to be encoded and y is the number of decimal places to encode a decimal</p>
  
  <pre><code>integer_to_big_endian(x * 10**y) % 2**64
  </code></pre>
  
  <p>how would the modulus ensure that negative numbers can also be encoded?</p>
  
  <p>Wouldn't a % of anything bigger than 2**64 give a remainder</p>
  
  <p>So I'm guessing if x * 10 ** y is bigger than 2**64, then you change x * 10 ** y to be big endian so the binary encoding of x * 10 ** y has the most significant byte stored first the modulus will cut off any other bits?</p>