Every number system works the same way: each position is worth the base raised to a power, counting from 0 on the right. Decimal uses base 10, binary base 2, octal base 8 and hexadecimal base 16. Hexadecimal needs six extra symbols, so A to F stand for 10 to 15. Computer awareness sections in SSC, bank and railway exams test conversions between these bases, usually with small numbers that can be worked by hand in under a minute.

DecimalBinaryOctalHex
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

Learning this table removes most of the work: the binary-to-octal and binary-to-hex methods below are just lookups in it.

To convert binary to decimal, write the place values 1, 2, 4, 8, 16, 32, 64, 128 from the right and add the ones where the bit is 1.

Worked example 1: binary to decimal

(101101)₂. The 1s sit at the places worth 32, 8, 4 and 1. Their sum is 32 + 8 + 4 + 1 = 45.

To convert decimal to binary, divide by 2 repeatedly and write down each remainder. The binary number is the remainders read from the last to the first.

Worked example 2: decimal to binary by division

156 ÷ 2 = 78 r 0; 78 ÷ 2 = 39 r 0; 39 ÷ 2 = 19 r 1; 19 ÷ 2 = 9 r 1; 9 ÷ 2 = 4 r 1; 4 ÷ 2 = 2 r 0; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Reading the remainders upwards gives 10011100. Check: 128 + 16 + 8 + 4 = 156.

For small numbers, subtraction is quicker than division: take away the largest power of 2 that fits, mark that bit, and repeat with what is left.

Because 8 = 2³, each octal digit is exactly three bits; because 16 = 2⁴, each hex digit is exactly four bits. So conversions between binary and these bases need no arithmetic at all, only grouping. Always group from the right, adding zeros on the left if the last group is short.

Worked example 3: binary to octal

(110101011)₂ splits into 110 | 101 | 011, which are 6, 5 and 3. So the octal number is (653)₈, and 6 × 64 + 5 × 8 + 3 = 427 in decimal.

As a cross-check, the original binary number's place values give 256 + 128 + 32 + 8 + 2 + 1 = 427 too.

Worked example 4: binary to hexadecimal

(11010111)₂ splits into 1101 | 0111, which are D (13) and 7. So the hex number is (D7)₁₆, which is 13 × 16 + 7 = 215 in decimal, the same as the binary value.

Worked example 5: hexadecimal to decimal

(2F)₁₆ = 2 × 16 + 15 = 47.

Worked example 6: decimal to hexadecimal

Divide by 16 this time. 250 ÷ 16 = 15 r 10, and 15 ÷ 16 = 0 r 15. Reading the remainders upwards gives 15 and 10, which are F and A: (FA)₁₆.

Worked example 7: octal to decimal

(75)₈ = 7 × 8 + 5 = 61.

To go between octal and hexadecimal, pass through binary: expand each octal digit to three bits, then regroup the bits in fours.

Binary addition follows four rules: 0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (write 0, carry 1), and 1 + 1 + 1 = 11 (write 1, carry 1).

Worked example 8: adding two binary numbers

1011 + 0110. From the right: 1 + 0 = 1; 1 + 1 = 0 carry 1; 0 + 1 + 1 = 0 carry 1; 1 + 0 + 1 = 0 carry 1; the final carry gives a leading 1. The result is 10001. In decimal that is 11 + 6 = 17, which matches.

  • ✘ Reading division remainders from top to bottom instead of bottom to top.
  • ✘ Grouping bits from the left, which shifts every group when the length is not a multiple of 3 or 4.
  • ✘ Treating hex letters as separate numbers, so that 3A becomes 310 instead of 58.
  • ✘ Confusing the number of values n bits can hold (2ⁿ) with the largest value (2ⁿ − 1).

Converting the answer back to the original base takes a few seconds and catches nearly every slip. For the logic built on these bits, see logic gates and truth tables. For wider computer awareness revision, see computer and IT fundamentals and the computer awareness cheat code.

Q1. What is the decimal value of (1101)₂? easy

✅ Answer: (b) 13

💡 Explanation: Place values from the right are 1, 2, 4 and 8. The 1s sit at 8, 4 and 1, so the value is 8 + 4 + 1 = 13.

Q2. Which binary number equals decimal 37? easy

✅ Answer: (c) 100101

💡 Explanation: 37 = 32 + 4 + 1, so the bits for 32, 4 and 1 are set: 100101. The other options equal 39, 41 and 53.

Q3. What is the decimal value of (3A)₁₆? easy

✅ Answer: (a) 58

💡 Explanation: A stands for 10. The value is 3 × 16 + 10 = 48 + 10 = 58. Reading 3A as 3 and 10 side by side gives the trap answer 310.

Q4. What is the decimal value of (127)₈? medium

✅ Answer: (d) 87

💡 Explanation: Octal place values are 64, 8 and 1. The value is 1 × 64 + 2 × 8 + 7 = 64 + 16 + 7 = 87.

Q5. What is the octal equivalent of (101110)₂? medium

✅ Answer: (b) 56

💡 Explanation: Group the bits in threes from the right: 101 and 110, which are 5 and 6. So the octal number is 56. The trap option 46 is the decimal value of the same number.

Q6. What is the largest decimal number that can be written with 8 bits? easy

✅ Answer: (c) 255

💡 Explanation: Eight bits all set to 1 give 2⁸ − 1 = 255. 256 is the number of different values, 0 to 255, not the largest value.

Why do computers use the binary number system?

Digital circuits work most reliably with two states, such as a voltage being present or absent. Binary needs only two digits, 0 and 1, so each bit maps directly onto one of those two states.

Why are octal and hexadecimal used if computers work in binary?

They are shorthand for binary. Because 8 = 2³ and 16 = 2⁴, every octal digit stands for exactly three bits and every hexadecimal digit for exactly four, so long binary strings become short and easier for people to read.

All problems and solutions on this page are original. No outside facts are relied on; every numeric answer is recomputed by software before publishing.

How this page was prepared. Drafted with AI assistance (Claude (Anthropic AI model)) from the sources listed above. 15 calculations on this page were recomputed by software and matched. Automated checks also covered structure, internal links and duplicate text. Software checks cannot confirm facts. Reviewed by praveenkumar on 2026-10-24 against the sources listed above.

Found an error? Report it and we will correct the page.