Phase II
Data and Memory
Trace a Java value from source literal to bits, arithmetic, conversion, and output.
Declare and initialize Java's primitive types, then connect each numeric type to its representation. Derive signed integer ranges from fixed-width two's complement. Inspect IEEE 754 precision, rounding, subnormal values, infinities, and NaN. Finish by tracing widening, narrowing, constant-expression conversion, and numeric promotion through complete expressions.
When you finish this phase you can
- Declare all eight primitive types and explain range, precision, and literal syntax
- Treat char as a UTF-16 code unit and avoid assuming a boolean storage size
- Decode fixed-width two's complement and predict integer overflow
- Read normal and special IEEE 754 values and explain binary rounding
- Choose an equality strategy that matches the numeric domain
- Predict widening, narrowing, constant-expression conversion, and promotion
- Explain why some widening primitive conversions lose precision
- 2.1Variables, Types, Literals, KeywordsStore values in variables and choose a type that fits the data.Primitive typesVariableStandard input
- 2.2How Numbers Live in MemorySee how Java stores whole numbers and decimal approximations as bits.Two's complementFloating point
- 2.3Type Conversion, Promotion, CastingPredict when Java changes a numeric type and what information the conversion can lose.Type promotion