100% Free · No Signup · No WatermarksEmail us: [email protected]
ZeroFee Tools

Home › Blog › Binary, Hex & Decimal Explained Without Jargon

Number base converter guide cover illustration

Binary, Hex & Decimal Explained Without Jargon

The numbers on your screen are decimal, base 10, because humans have ten fingers. The chips inside your devices count in binary, base 2, and programmers write hexadecimal, base 16, as shorthand so they are not staring at walls of ones and zeros. The free Number Base Converter from ZeroFee Tools translates instantly between binary, octal, decimal and hexadecimal. This guide explains what each base is, why programmers love hex, how to convert by hand, and how binary becomes readable text.

No math background is needed. Every idea here starts from counting, and every conversion is shown step by step with the same small numbers, so you can check each answer yourself before trusting the tool with bigger ones.

What is binary, and why do computers use it?

Binary is base 2: it uses only the digits 0 and 1, and each position is worth twice the one before it. Computers use it because a transistor is a switch, and two states, on or off, are the simplest signal that hardware can read reliably.

Count in binary and the pattern is clear: 0, 1, 10 (two), 11 (three), 100 (four). Each new position is another power of two: 1, 2, 4, 8, 16, 32, 64, 128. To read a binary number, add the place values under each 1 and ignore the 0s. So 1101 is 8 + 4 + 1 = 13.

Eight bits make a byte, the basic unit of storage. Eight bits can hold values from 0 to 255, which is why 255 shows up everywhere in computing: color channels, network masks and file sizes all bump into that ceiling. Two to the power of eight is 256 values, counting from zero.

What is hexadecimal, and why do programmers use it?

Hexadecimal is base 16, using the digits 0-9 plus A-F for the values 10 through 15. Programmers use it because one hex digit maps to exactly 4 binary digits, so a long binary string like 11111111 shortens to FF.

The 0x prefix marks hex in most programming languages: 0xFF is 255. You meet hex constantly outside of code too: color codes like #FF5733 (red 255, green 87, blue 51), memory addresses in crash reports and the internals of file formats. Uppercase and lowercase are identical: 0xff and 0xFF are the same number.

Why hex and not some other shorthand? Decimal does not align with binary: one decimal digit covers about 3.32 bits, an awkward fraction. One hex digit covers exactly 4 bits, half a byte, so binary converts to hex with zero leftover. That clean fit is the whole reason hex won, and it is why programmers reach for it instead of decimal whenever they think in bits.

What is octal, and where is it still used?

Octal is base 8, using the digits 0-7, with each digit covering exactly 3 bits. Its main surviving use is Unix file permissions: chmod 755 means owner 7 (111), group 5 (101), others 5 (101).

Octal was popular when machines used 12, 24 and 36-bit words, which divide neatly by 3. Modern machines use 8, 16, 32 and 64-bit words, which divide neatly by 4, so hex took over and octal faded. Outside of chmod, you can treat octal as a curiosity that the converter handles for you whenever it appears in old documentation or permission strings.

How do you convert between bases by hand?

Decimal to binary: repeatedly divide by 2 and read the remainders from bottom to top. Binary to decimal: add the place values of the 1 bits. Binary to hex: group the bits in fours and translate each group.

Convert 42 to binary. Divide by 2 and keep the remainders: 42/2 = 21 remainder 0; 21/2 = 10 remainder 1; 10/2 = 5 remainder 0; 5/2 = 2 remainder 1; 2/2 = 1 remainder 0; 1/2 = 0 remainder 1. Read the remainders from bottom to top: 101010. Check: 32 + 8 + 2 = 42.

Convert 101010 to hex. Pad it into groups of four: 0010 1010. Each group becomes one hex digit: 0010 is 2, and 1010 is 10, which is A. So 101010 is 0x2A. Check: 2 x 16 + 10 = 42.

Convert hex FF to decimal. F is 15, so 15 x 16 + 15 = 255. This is the byte maximum and it is worth memorizing. A handy shortcut for decimal to binary is subtracting the largest power of two that fits: for 42, subtract 32 (remainder 10), then 8 (remainder 2), then 2 (remainder 0). The powers you used, 32, 8 and 2, mark the 1 bits: 101010.

0 to 255 reference table

Values 0 to 255 are exactly one byte, the fundamental unit of computer storage, and 255 is the largest number 8 bits can hold. Find a decimal value in the table to read its hexadecimal code; the converter handles binary and octal for the same values.

0123456789ABCDEF
00 (00)1 (01)2 (02)3 (03)4 (04)5 (05)6 (06)7 (07)8 (08)9 (09)10 (0A)11 (0B)12 (0C)13 (0D)14 (0E)15 (0F)
116 (10)17 (11)18 (12)19 (13)20 (14)21 (15)22 (16)23 (17)24 (18)25 (19)26 (1A)27 (1B)28 (1C)29 (1D)30 (1E)31 (1F)
232 (20)33 (21)34 (22)35 (23)36 (24)37 (25)38 (26)39 (27)40 (28)41 (29)42 (2A)43 (2B)44 (2C)45 (2D)46 (2E)47 (2F)
348 (30)49 (31)50 (32)51 (33)52 (34)53 (35)54 (36)55 (37)56 (38)57 (39)58 (3A)59 (3B)60 (3C)61 (3D)62 (3E)63 (3F)
464 (40)65 (41)66 (42)67 (43)68 (44)69 (45)70 (46)71 (47)72 (48)73 (49)74 (4A)75 (4B)76 (4C)77 (4D)78 (4E)79 (4F)
580 (50)81 (51)82 (52)83 (53)84 (54)85 (55)86 (56)87 (57)88 (58)89 (59)90 (5A)91 (5B)92 (5C)93 (5D)94 (5E)95 (5F)
696 (60)97 (61)98 (62)99 (63)100 (64)101 (65)102 (66)103 (67)104 (68)105 (69)106 (6A)107 (6B)108 (6C)109 (6D)110 (6E)111 (6F)
7112 (70)113 (71)114 (72)115 (73)116 (74)117 (75)118 (76)119 (77)120 (78)121 (79)122 (7A)123 (7B)124 (7C)125 (7D)126 (7E)127 (7F)
8128 (80)129 (81)130 (82)131 (83)132 (84)133 (85)134 (86)135 (87)136 (88)137 (89)138 (8A)139 (8B)140 (8C)141 (8D)142 (8E)143 (8F)
9144 (90)145 (91)146 (92)147 (93)148 (94)149 (95)150 (96)151 (97)152 (98)153 (99)154 (9A)155 (9B)156 (9C)157 (9D)158 (9E)159 (9F)
A160 (A0)161 (A1)162 (A2)163 (A3)164 (A4)165 (A5)166 (A6)167 (A7)168 (A8)169 (A9)170 (AA)171 (AB)172 (AC)173 (AD)174 (AE)175 (AF)
B176 (B0)177 (B1)178 (B2)179 (B3)180 (B4)181 (B5)182 (B6)183 (B7)184 (B8)185 (B9)186 (BA)187 (BB)188 (BC)189 (BD)190 (BE)191 (BF)
C192 (C0)193 (C1)194 (C2)195 (C3)196 (C4)197 (C5)198 (C6)199 (C7)200 (C8)201 (C9)202 (CA)203 (CB)204 (CC)205 (CD)206 (CE)207 (CF)
D208 (D0)209 (D1)210 (D2)211 (D3)212 (D4)213 (D5)214 (D6)215 (D7)216 (D8)217 (D9)218 (DA)219 (DB)220 (DC)221 (DD)222 (DE)223 (DF)
E224 (E0)225 (E1)226 (E2)227 (E3)228 (E4)229 (E5)230 (E6)231 (E7)232 (E8)233 (E9)234 (EA)235 (EB)236 (EC)237 (ED)238 (EE)239 (EF)
F240 (F0)241 (F1)242 (F2)243 (F3)244 (F4)245 (F5)246 (F6)247 (F7)248 (F8)249 (F9)250 (FA)251 (FB)252 (FC)253 (FD)254 (FE)255 (FF)

Read the table by row and column: row 2, column A is decimal 42, hex 2A. The first row (0-F) covers the single hex digits, which are the nibbles every larger conversion is built from. If you need a value above 255, enter it in the Number Base Converter and read all four bases at once.

How does binary become text?

Text is stored as numbers. ASCII, the classic character code, assigns each letter, digit and symbol a number from 0 to 127: A is 65, which is 01000001 in binary and 0x41 in hex. Software stores the number and looks up the character when it displays it.

The word "Hi" is stored as two numbers: H is 72 (0x48) and i is 105 (0x69). ASCII covers English letters, digits and common symbols; Unicode extends the same idea to every writing system on earth. When you see a hex dump of a file, you are looking at these codes in their compact hex form, and the converter turns any of them back into the decimal you recognize.

How to convert a number in 4 steps

  1. Open the converter. Go to the Number Base Converter; it loads instantly with no signup.
  2. Type the number and choose its base. Enter the value and select binary, octal, decimal or hexadecimal.
  3. Read all four bases at once. The tool shows every equivalent, so one entry answers every direction.
  4. Spot-check by hand. For anything important, verify one conversion with the grouping or division method above before you use it.

6 practical tips

Frequently asked questions

What number base do computers actually use?

Binary, base 2, at the hardware level. Humans read decimal, and programmers write hexadecimal as compact shorthand for binary. The tool converts between all three, plus octal.

Why does FF equal 255?

F is 15 in hex, so FF is 15 x 16 + 15 = 255. It is the largest value one byte can hold, which is why it appears constantly in computing.

What do the 0x and 0b prefixes mean?

0x marks a hexadecimal number and 0b marks a binary number in most programming languages. They tell the reader which base to assume.

Is octal still used anywhere?

Mainly in Unix file permissions, like chmod 755, where each digit maps to 3 permission bits. Hex has replaced it almost everywhere else.

What is the largest number 8 bits can hold?

255, written 11111111 in binary and FF in hex. Each extra bit doubles the range: 16 bits reach 65,535.

Ready to try it yourself? It's free, no signup required.

Try the free Number Base Converter →