Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

3 byte numbers

Peter Tillema edited this page Sep 15, 2018 · 3 revisions

ICE uses 3 bytes, or 24 bits, to store all numbers and perform mathematical operations. This means the biggest number you can have is 2^24−1, so 16,777,215. You cannot have more than this number. If you go over this number, you get what is known as 'rollover'. This means your result will be modulo 16777216 (the remainder when you divide by 16777216). An example of this is: 16777215+10 = 9. That equation went over the 3-byte limit, so it 'rolled over' (looped back around) to 0, then continued the operation. The same can happen backwards: 0-10 = 16777206. Later in this guide we will introduce you to some control over whether a number is stored in 3-byte, 2-byte, or 1-byte.

Clone this wiki locally