About the four bases
Binary is base 2 — every digit is a bit, 0 or 1. It's what hardware actually stores, and it surfaces anywhere bit flags, masks, or permissions do. Code usually writes it with a 0b prefix.
Octal is base 8, using digits 0–7. Each octal digit maps to exactly three bits, which is why Unix file permissions like 755 are octal. Code writes it with a 0o prefix.
Decimal is base 10 — ordinary numbers. Most code displays values in decimal even when they're stored as bits underneath, so it's usually one side of any base conversion.
Hexadecimal is base 16 — digits 0–9 then a–f. One hex digit is exactly four bits, so bytes read as tidy two-digit pairs. Colors, memory addresses, and hashes are all conventionally written in hex with a 0x prefix.
Conversion uses BigInt, so numbers of any size — a 256-bit hash, a database id — convert without losing precision, entirely in your browser.