/01 What a number base converter does
A number base converter takes one number and shows it in every base at once. Type 255 in decimal and instantly see FF in hexadecimal, 11111111 in binary, and 377 in octal. Change any field and the others follow, so it works in whatever direction you need: decimal to binary, hex to decimal, binary to hex, or anything in between.
Each base is just a different way of writing the same quantity. The number does not change, only its notation. Decimal uses ten symbols because we have ten fingers. Binary uses two because a computer bit has two states. Hexadecimal uses sixteen because two hex digits cover exactly one byte. Octal uses eight, and survives today mainly in one place: file permissions.
If you move between a debugger, a colour value, and a permission mask in the same afternoon, this tool saves you the constant mental gear-changing. Every field updates live, so you can watch how a value rewrites itself as you nudge it.
/02 Where each base shows up in real work
Hexadecimal is everywhere bytes are. Colour codes like FF5733 are three hex bytes: FF for red, 57 for green, 33 for blue, each one a number from 0 to 255. Memory addresses, character encodings, and network MAC addresses are all hex, because two digits per byte is compact and unambiguous.
Binary is where flags and bitwise operations make sense. A permission mask like 111 101 101 reads directly as read, write, and execute bits for user, group, and everyone else. When a piece of documentation says a setting is controlled by bit 5, you want to see that bit as part of the whole number, which binary gives you for free.
Octal is the quiet survivor. Unix file permissions still use it: 755 means read, write, execute for the owner and read and execute for everyone else. Each octal digit is exactly three bits, which is why one digit can hold all three permissions for one class of user.
The prefixes matter when you write these values in code. 0x marks hex, 0b marks binary, and 0o or a leading zero marks octal in many languages. A plain leading zero has bitten more than one developer who expected decimal.
/03 Bitwise operations, made visible
The converter also covers the bitwise operations that get applied to these numbers. AND keeps a bit only when both inputs have it. OR sets a bit when either input has it. XOR sets a bit when the inputs differ, which is the operation behind simple checksums and toggling flags. NOT flips every bit. The shifts move the whole pattern left or right, which multiplies or divides by two for each position moved.
Seeing these on a full number in four bases at once makes them far easier to reason about. An AND with a mask shows exactly which bits survive. A left shift shows the bits sliding up through the hex digits as they move.
This is the daily work of permissions, protocol flags, graphics programming, and embedded systems. It is simple arithmetic, but it is arithmetic almost nobody can do reliably in their head past the first few bits, which is exactly why a converter that keeps all four views on screen at once earns its place.
/04 A quick trick for reading binary
Here is a habit that makes binary friendlier. Learn the values of the first eight bit positions: 1, 2, 4, 8, 16, 32, 64, 128. Any byte is just the sum of the positions where the bit is set. 11111111 is all of them added: 255. 1010 1010 is 128 + 32 + 8 + 2: 170 in decimal, AA in hex.
Notice how the hex follows. Each hex digit is exactly four bits, so a byte splits cleanly into two hex digits. 1010 is A, and two of them make AA. That four-bits-per-digit mapping is why programmers prefer hex for byte values: it is binary with the tedious parts folded up.
Once you see that pattern, reading a value like 0xFF stops being a chore and becomes a number you know at a glance. The converter then becomes less a crutch and more a speed check, which is the right place for it.
/05 Binary to decimal conversion, step by step
Each digit in a binary number is worth twice the one to its right: 1, 2, 4, 8, 16, 32 and so on, reading from the right. To convert binary to decimal, add up the values where a 1 appears. For 101000, the ones sit in the 32 and 8 positions, so 101000 in binary is 40 in decimal. For 1101, the ones are in the 8, 4 and 1 positions, giving 13.
Going the other way, decimal to binary, divide by 2 repeatedly and write down the remainders, then read them from bottom to top. 13 divided by 2 is 6 remainder 1, 6 gives 3 remainder 0, 3 gives 1 remainder 1, and 1 gives 0 remainder 1, so 13 is 1101.
This binary to decimal converter does both instantly and shows hexadecimal and octal at the same time, so you can check homework, read a bit mask or translate a colour code without working it through by hand.