
INTEGER CHEAT SHEET Integers- A set of positive and negative whole numbers. They can be represented on a number line.
If it is odd, he will lose 10 times the number that comes up. He tosses a 3. Express the results as an integer. It will be – 12o tonight. The weatherman predicts it will be 25o warmer by noon …
Modular Arithmetic 27 Casting Integers in C !!! Number literals: 37 is signed, 37U is unsigned Integer Casting: bits unchanged, just reinterpreted.
The range of an unsigned number is 0 → 2w - 1, where w is the number of bits in our integer. For example, a 32-bit int can represent numbers from 0 to 232 - 1, or 0 to 4,294,967,295.
Concepts: Define “base-b expansion” of an integer. Convert integers from decimal to binary, octal, hexadecimal and vice versa.
An integer programming problem in which all variables are required to be integer is called a pure integer pro-gramming problem. If some variables are restricted to be integer and some are not …
Final thoughts Integers can be represented uniquely in any specified base Integer arithmetic can be computed in other bases, and even pen-and-paper algorithms can be useful in computing …