Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Memory that is word-sized (16 bits) can contain a value that is one of 216 possible combinations of bits (i.e., one of 65,536 combinations). This gives word-sized values a range of 0 to 65,535. Since the Spin language performs all mathematic operations using 32-bit signed math, any word-sized values will be internally treated as positive long-sized values. However, the actual numeric value contained within a word is subject to how a computer and user interpret it. For example, you may choose to use the Sign-Extend 15 or Post-Set '~~' operator in a Spin expression to convert a word value that you interpret as "signed" (-32,768 to +32,767) to a signed long value.