Versions Compared

Key

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

...

Memory that is byte-sized (8 bits) can contain a value that is one of 28 possible combinations of bits (i.e., one of 256 combinations). This gives byte-sized values a range of 0 to 255. Since the Spin language performs all mathematic operations using 32-bit signed math, any byte-sized values will be internally treated as positive long-sized values. However, the actual numeric value contained within a byte is subject to how a computer and user interpret it. For example, you may choose to use the Sign-Extend 7 or Post-Clear ('~)' in a Spin expression to convert a byte value that you interpret as "signed" (-128 to +127) to a signed long value.