AS & A Level Computer Science (9618)

A Level · Topic 13

Represent real numbers and organize files

Reason about floating-point precision, user-defined types, and file access.

Lessons distinguish AS topics 1–12 from A Level topics 13–20. Examples include Cambridge pseudocode and Python.

Separate range from precision

A floating-point representation stores a mantissa and an exponent. The exponent changes the scale; the mantissa carries significant information. With a fixed number of bits, increasing exponent space usually leaves fewer bits for precision.

A value can be within range but not exactly representable. Rounding creates a small representation error which may accumulate through calculations. Normalization gives a consistent form and makes effective use of the available mantissa bits.

Match storage to access patterns

A record groups related fields. Enumerations restrict a value to named alternatives, while other user-defined types express a domain's structure. Choosing the type is part of modeling the problem, not just a way to shorten declarations.

Sequential processing reads records in order. Direct access finds a location without reading every preceding record. A hash-based organization needs a collision policy because different keys can map to the same location. Consider searches, updates, and storage overhead together.

Check yourself

Does being within floating-point range imply an exact representation?Show answer

No. The finite mantissa limits precision, so a representable range can still contain values requiring rounding.

References used to build these lessons

We used these official documents as references when building this course's lessons. They are the sources for the syllabus structure and course requirements.

Cambridge International · 9618 · Exams 2027–2029