BigSigma Topic Curriculum

Algorithms & Computation

How modern calculators actually compute trigonometric functions using CORDIC, and the math powering cryptography and Bitcoin mining.

2 Video Lectures

Topic Overview & Theoretical Foundations

Core Theoretical Principles

This subject explores the mathematical algorithms powering microprocessors, hardware calculators, and decentralized consensus networks.

1. Why Calculators Don’t Use Taylor Series

Many people assume calculators compute $\sin(x)$ or $\cos(x)$ using Taylor/Maclaurin series expansions:

$$ \sin(x) = \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)!} x^{2k+1} = x - \frac{x^3}{6} + \frac{x^5}{120} - \dots $$

However, evaluating higher-degree polynomials requires numerous multiplication operations and suffers from severe floating-point round-off errors at large angles. Hardware ALUs implement the CORDIC (Coordinate Rotation Digital Computer) algorithm instead.

2. The CORDIC Algorithm

CORDIC computes trigonometric functions iteratively using only bit-shifts and additions:

$$ \begin{pmatrix} x_{i+1} \\ y_{i+1} \end{pmatrix} = \begin{pmatrix} 1 & -d_i 2^{-i} \\ d_i 2^{-i} & 1 \end{pmatrix} \begin{pmatrix} x_i \\ y_i \end{pmatrix} $$

Where the rotation direction $d_i \in \{-1, +1\}$ is chosen to drive the residual angle $z_i \to 0$. Because multiplication by $2^{-i}$ is simply an arithmetic binary right-shift, CORDIC executes in simple hardware without requiring expensive floating-point multipliers.

3. Cryptographic Hash Difficulty (Bitcoin Proof of Work)

Bitcoin mining relies on finding a nonce $n$ such that the double SHA-256 hash of the block header $B$ falls strictly below a 256-bit target threshold $T$:

$$ \operatorname{SHA-256}(\operatorname{SHA-256}(B \parallel n)) < T $$