Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

truncation

Narrowing a number by keeping only its low bits and throwing the rest away.

Truncation from m to n bits keeps bits 0..n-1, which is reduction modulo 2^n of the unsigned value.

Examples

  • Narrowing the 32-bit 300 (0x12C) to 8 bits keeps only 0x2C, which is 44.

Read the full section →