Number bases & conversions (binary/hex/decimal)

Math · Pre-algebra

Question 1 of 10

0

    What is 10111 (binary) in decimal?

    Decimals (0.75 or 0,75), fractions (3/4) and mixed numbers (1 1/2) are accepted. Do not use thousands separators.

    How to type your answer
    • Fractions: 3/4. Mixed numbers: 1 1/2.
    • Decimals with a point or a comma: 0.75 or 0,75.
    • Negative numbers start with a minus: -3/4.
    • Percentages need the % sign: 75%.

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Number bases & conversions (binary/hex/decimal) explained

    A number base is how many different digits a system uses before it moves to the next place. Decimal (base 10) uses the digits 0 to 9, binary (base 2) uses only 0 and 1, and hexadecimal (base 16) uses 0 to 9 followed by A to F, where A stands for 10 and F for 15. Each place is worth a power of the base, so the place values in binary are 1, 2, 4, 8 and so on.

    To convert a binary number to decimal, multiply each digit by its place value and add the results. To convert decimal to binary, repeatedly divide by 2, write down each remainder, and read the remainders from the last one to the first. Hexadecimal is convenient because one hex digit stands for exactly four binary digits.

    Worked example

    Convert 45 to binary and to hexadecimal.

    1. 45÷2=2245 \div 2 = 22 remainder 1, 22÷2=1122 \div 2 = 11 remainder 0, 11÷2=511 \div 2 = 5 remainder 1, 5÷2=25 \div 2 = 2 remainder 1, 2÷2=12 \div 2 = 1 remainder 0, 1÷2=01 \div 2 = 0 remainder 1.
    2. Reading the remainders upwards gives 45=101101245 = 101101_2.
    3. Check: 32+8+4+1=4532 + 8 + 4 + 1 = 45.
    4. For hexadecimal, 45=2×16+1345 = 2 \times 16 + 13, and 13 is written D, so 45=2D1645 = 2D_{16}.

    A common mistake is reading a binary number as a decimal one. The binary number 1011 is not one thousand and eleven. Its value is 8+0+2+1=118 + 0 + 2 + 1 = 11.

    What you will practise

    New numbers every time you practise. Levels: Easy, Medium, Hard. Each answer is followed by a worked explanation.

    Example questions

    • Easy

      What is 11110 (binary) in decimal?

    • Medium

      What is 18 (hexadecimal) in decimal?

    • Hard

      What is 52 in hexadecimal?

      • 34
      • 10
      • 12
      • 22