Some kinds of arithmetic problems
Here are some kinds of arithmetic problems you might want to try out.
1. Make up some short random sequences of bits and:
- convert them to base ten, both in accordance with the signed and the
unsigned interpretations
- add pairs of them and convert the result to base ten, and verify that you
get the same thing as converting them to base ten first; make some of them
negative too
- perform the two's-complement algorithm, then use the signed
interpretation to verify that you actually got the arithmetic negation
2. Do calculations with overflow.
3. For various additions, determine which of the condition code flags are set
or cleared.
4. Look at the arithmetic-oriented questions on previous years' midterms
and exams.
[CSC 258 additional problems]
[main course page]