A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Fixed-Point Number Representation

College Depth 80 in the knowledge graph ☐ I know this ☆ Set as goal
232topics build on this
333prerequisites beneath it
See this on the map →
Binary Number SystemBinary Arithmetic→→Two's Complement Representation
representation numbers fixed-point

Core Idea

Fixed-point representation stores numbers with a fixed number of digits before and after the decimal point, encoded as integers scaled by a power of 2. This approach trades range for precision and is simpler to implement in hardware than floating-point arithmetic.

How It's Best Learned

Start with decimal fixed-point (e.g., 2 digits after decimal), convert to binary, then implement basic arithmetic operations.

Common Misconceptions

Fixed-point precision is uniform across all values, unlike floating-point. The decimal point location is implicit, not stored.

Explainer

From your understanding of the binary number system, you know how to represent integers as sequences of bits: each bit position represents a power of 2, and the value is the sum of those powers. Fixed-point representation extends this idea to fractional numbers by declaring that some of those bit positions represent negative powers of 2 — that is, fractions like 1/2, 1/4, 1/8. The key insight is that the hardware still stores and manipulates an ordinary integer; the "decimal point" (really a binary point) is a convention agreed upon by the programmer, not something encoded in the data itself.

Consider a 16-bit fixed-point format with 8 integer bits and 8 fractional bits, often written as Q8.8 or 8.8 format. The stored integer value 256 (binary `00000001.00000000`) represents the real number 1.0, because the binary point sits between bit 7 and bit 8. The stored value 384 (`00000001.10000000`) represents 1.5, since the fractional part `10000000` equals 1 × 2⁻¹ = 0.5. To convert from a real number to its fixed-point representation, you multiply by 2⁸ (256) and round: 3.14 × 256 = 803.84, stored as 803, which represents 803/256 ≈ 3.1367. The small error (3.1367 vs 3.14) is the quantization cost of fixed precision.

The great advantage of fixed-point is that arithmetic maps directly to integer operations. Adding two Q8.8 numbers is just integer addition — the binary points are aligned by construction. Subtraction is the same. Multiplication requires one extra step: multiplying two Q8.8 values produces a Q16.16 result (the fractional bits double), so you shift right by 8 to get back to Q8.8 format. No floating-point unit is needed; the standard integer ALU handles everything. This is why fixed-point dominates in embedded systems, DSP chips, and any hardware where a floating-point unit would be too expensive, too slow, or too power-hungry. Audio processing, motor control, and early 3D graphics (the original PlayStation used fixed-point exclusively) all relied on this approach.

The tradeoff compared to floating-point is dynamic range. A Q8.8 format can represent values from 0 to roughly 255.996 with uniform precision of about 0.004 everywhere. Floating-point, by contrast, adjusts its precision based on magnitude — very precise near zero, less precise for large values — and covers an enormous range. Fixed-point forces you to choose your range and precision at design time and stick with it. If a computation produces a value outside the representable range, it overflows silently. If values are very small, you waste the upper bits. The programmer must carefully analyze the expected range of every variable and choose formats accordingly — a discipline called scaling analysis. This manual effort is the price of fixed-point's hardware simplicity.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Binary Counters: Design and Analysis → Binary Arithmetic → Fixed-Point Number Representation

Longest path: 81 steps · 333 total prerequisite topics

Prerequisites (2)

Leads To (1)