1
Programming relies on multiple number systems: binary (base 2), decimal (base 10), octal (base 8), and hexadecimal (base 16).
2
Hexadecimal format is commonly used in networking for MAC addresses and IPv6, utilizing digits 0-9 and letters A-F.
3
Python provides built-in functions to convert decimal numbers: bin() for binary, oct() for octal, and hex() for hexadecimal.
4
Binary representations in Python are prefixed with '0b', octal with '0o', and hexadecimal with '0x'.
5
To convert a decimal number to binary manually, repeatedly divide the number by 2 and read the remainders in reverse order from bottom to top.
6
To convert a binary number back to decimal, multiply each binary digit (1s only) by increasing powers of 2 starting from 2 raised to 0 from right to left, and sum the results.