Assignment 2 - Number Representations
In theory, a variable is an abstract concept. In implementation, a variable occupies a fixed storage. It is important
to know how variables differ in storage, because this affects how variables can be used in different computations.
This assignment will help develop a thorough understanding of the (signed and unsigned) integer datatype.
These activities require the use of your "Programming in C" zyBook:
Read sections 2.1 - 2.4 (inclusive) of chapter 2, "Number Representations".
Pay careful attention to how variables are allocated a limited memory space, and how values
are stored in the memory space as strings of bits.
Complete all participation and challenge activities listed in these sections:
- 2.1 Binary
- 2.2 Variables (int)
- 2.3 Integer overflow
- 2.4 Unsigned
The online nature of the zyBook encourages you to try things out and gives you immediate feedback.
There is no limit on how many attempts you can make on the zyBook activities, and all that will be
counted for your grade is completion of the required activities. Note however that your solutions are
not permanently stored by the system, so if you refresh the current page or move to a different page,
your answers will be lost. This feature is intentional, so that students can practice their
understanding of the material as many times as they wish to.
What to turn in
Nothing. The system will keep track of all completed tasks for each individual student.