Computer Architecture Formula Sheet

Binary/hex and twos complement conversions, IEEE 754 floating-point encoding, bitwise ALU masks, set-associative CPU cache address slicing, and Amdahls speedup law.

Core Equations & Variable Definitions

IEEE 754 Single-Precision Value

(-1)^s \times (1.\text{fraction})_2 \times 2^{E - 127}

1 sign bit, 8 biased exponent bits (bias 127), 23 mantissa fraction bits.

Set-Associative Cache Address Split

\text{Offset} = \log_2(B), \quad \text{Index} = \log_2\left(\frac{C}{B \cdot W}\right), \quad \text{Tag} = A - \text{Index} - \text{Offset}

A: address bits, C: cache bytes, B: block size, W: ways of associativity.

Amdahls Law

S_{\text{overall}} = \frac{1}{(1 - p) + \frac{p}{s}}

p: parallelizable fraction, s: speedup of the enhanced portion.

Twos Complement Range (N-bit)

[-2^{N-1}, \; 2^{N-1} - 1]

Negate any value by inverting all bits and adding 1.

Interactive Number Systems & Architecture Calculators

Common Exam Questions

Why does IEEE 754 use a biased exponent instead of twos complement?

Using a positive bias (127 for float32, 1023 for float64) lets hardware compare two positive floating-point magnitudes using ordinary unsigned integer comparison.

How does doubling cache associativity affect index and tag bits?

Keeping total cache size fixed while doubling associativity halves the number of sets, removing 1 bit from the Index field and adding 1 bit to the Tag field.

What is the maximum possible speedup under Amdahls Law?

Even with infinite parallel processors (s -> infinity), speedup is strictly bounded by 1 / (1 - p), dictated by the remaining serial fraction.