CS 70

Group 1: Numeric Types and Memory Models

  • LHS Cow speaking

    This group of topics relate to understanding how different types of numbers are stored in memory.

  • RHS Cow speaking

    Beyond being an important idea in computer science, understanding how variables work in C++ will be hugely helpful to you later this semester, when you'll be writing more complicated programs!

Topics

You will know that you have achieved this group of learning objectives when you are able to

  • Goal 1A: Memory Diagrams:
    • Draw a single-variable memory model using the CS70 memory model style.
    • Indicate which variable attributes are drawn "inside the box," which are drawn “outside the box”, and why.
    • Indicate which details are abstracted away, and why.
  • Goal 1B: Numeric Types Fundamentals:
    • List the fundamental C/C++ integer types in order of (potentially) increasing size
      • And likewise for floating-point types.
    • Observe that different computing platforms adopt different memory models.
    • Highlight the key differences between unsigned and signed integers.
  • Goal 1C: Promotion and Conversion:
    • Contrast promotion with conversion.
    • Identify when promotion & conversion happen between numeric types.
  • Goal 1D: Using Numeric Types:
    • Recognize common errors in the use of these types.
    • Choose numeric types appropriately for their intended use.

Need More Practice?

This group of goals are addressed in the following places:

(When logged in, completion status appears here.)