How to Convert Binary, Denary and Hexadecimal by Hand
Learn to convert binary, denary and hexadecimal by hand using place values and four-bit groups, with one worked example and a common mistake to avoid.
To convert between binary, denary and hexadecimal by hand, use place values for conversions involving denary and groups of four binary digits for conversions between binary and hexadecimal. Binary is base 222, denary is base 101010, and hexadecimal is base 161616. A base tells you how many different digit values a number system uses; a subscript shows which base a written number belongs to.
Binary and denary
Each binary position, reading from right to left, is worth twice the previous one: 1,2,4,8,16,32,64,1281, 2, 4, 8, 16, 32, 64, 1281,2,4,8,16,32,64,128, and so on. Add the values wherever the binary digit is 111. For example:
101011012=128+32+8+4+1=17310 10101101_2=128+32+8+4+1=173_{10} 101011012=128+32+8+4+1=17310To go from denary to binary, work through the place values from largest to smallest. For 173173173, take 128128128, leaving 454545; take 323232, leaving 131313; then take 888, 444 and 111. Put 111 in those positions and 000 in the others to get 10101101210101101_2101011012. Check by adding the values marked 111. A 000 contributes nothing, but its position still matters: 1012101_21012 and 11211_2112 have different values.
Binary and hexadecimal
One hexadecimal digit represents exactly four binary digits, called a nibble. Group binary digits in fours from the right, adding zeros on the left if needed. Then convert each group separately:
1010 11012=AD16 1010\;1101_2=\mathrm{AD}_{16} 101011012=AD16Here, 101021010_210102 is 101010, written A\mathrm{A}A in hexadecimal, and 110121101_211012 is 131313, written D\mathrm{D}D. To convert back, replace each hexadecimal digit with its four-digit binary equivalent: A=1010\mathrm{A}=1010A=1010 and D=1101\mathrm{D}=1101D=1101. If the leftmost group has fewer than four digits, pad only its left side. Leading zeros do not change the number's value.
Denary and hexadecimal
Hexadecimal uses A\mathrm{A}A to F\mathrm{F}F for values 101010 to 151515. To convert 173173173 to hexadecimal, divide by 161616: the quotient is 101010 and the remainder is 131313. These become A\mathrm{A}A and D\mathrm{D}D, so 17310=AD16173_{10}=\mathrm{AD}_{16}17310=AD16. Check in reverse using hexadecimal place values:
AD16=10×16+13=17310 \mathrm{AD}_{16}=10\times16+13=173_{10} AD16=10×16+13=17310Common mistake: group binary digits from the right, not the left. For denary-to-binary conversion by repeated division, read the remainders from bottom to top.