Number Conversion Guides
Learn how base conversion actually works - the hand methods, worked examples, and the code that does it for you.
How to Convert Decimal to Hexadecimal
Learn how to convert decimal to hexadecimal by hand with the division method, worked examples, and code in JavaScript, Python, and C.
How to Convert Hexadecimal to Decimal
Learn how to convert hexadecimal to decimal by hand using positional values, with a worked example and code in JavaScript, Python, and C.
How to Convert Decimal to Binary
Learn how to convert decimal to binary by hand with repeated division by 2 or the powers-of-two method, plus code in JavaScript, Python, and C.
How to Convert Binary to Decimal
Learn how to convert binary to decimal by hand using positional values and doubling, with a worked example and code in JavaScript, Python, and C.
How Two's Complement Works
Understand two's complement: how computers store negative numbers, why it works, overflow ranges per bit width, and gotchas in JavaScript, Python, and C.