Group 1: Numeric Types and Memory Models
This group of topics relate to understanding how different types of numbers are stored in memory.
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.
- List the fundamental C/C++ integer types in order of (potentially) increasing size
- 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:
- Week 1 Lesson 1 (Goal 1A)
- Week 1 Lesson 2 (Goal 1B, Goal1C, Goal 1D)
- Homework 0 Written Questions (Goal 1A, Goal 1C)
(When logged in, completion status appears here.)