Number System Conversions with Examples
Dr. Dheeraj, Assistant Professor, Mahindra University, Hyderabad
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 1 / 12
Decimal to Binary
Rule: Divide by 2 repeatedly and write remainders in reverse.
Example: Convert 1310 to binary.
13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1
Read from bottom to top ⇒ 1101.
Answer: 1310 = 11012
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 2 / 12
Binary to Decimal
Rule: Multiply each digit by powers of 2 and add.
Example: Convert 10112 to decimal.
(1 × 23 ) + (0 × 22 ) + (1 × 21 ) + (1 × 20 ) = 8 + 0 + 2 + 1 = 11
Answer: 10112 = 1110
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 3 / 12
Decimal to Octal
Rule: Divide by 8 repeatedly and write remainders in reverse.
Example: Convert 12510 to octal.
125 ÷ 8 = 15 R5, 15 ÷ 8 = 1 R7, 1 ÷ 8 = 0 R1
Read bottom to top ⇒ 175.
Answer: 12510 = 1758
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 4 / 12
Octal to Decimal
Rule: Multiply each digit by powers of 8 and add.
Example: Convert 2578 to decimal.
(2 × 82 ) + (5 × 81 ) + (7 × 80 ) = 128 + 40 + 7 = 175
Answer: 2578 = 17510
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 5 / 12
Binary to Octal
Rule: Group binary digits in 3 bits (from right).
Example: Convert 1101012 to octal.
1101012 = (110)(101) = 6 5
Answer: 1101012 = 658
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 6 / 12
Octal to Binary
Rule: Replace each octal digit with 3-bit binary.
Example: Convert 578 to binary.
5 = 101, 7 = 111
Answer: 578 = 1011112
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 7 / 12
Decimal to Hexadecimal
Rule: Divide by 16 repeatedly, remainders use A–F for 10–15.
Example: Convert 25410 to hex.
254 ÷ 16 = 15 R14(E ), 15 ÷ 16 = 0 R15(F )
Read bottom to top ⇒ FE .
Answer: 25410 = FE16
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 8 / 12
Hexadecimal to Decimal
Rule: Multiply each digit by powers of 16 and add.
Example: Convert 3A16 to decimal.
(3 × 161 ) + (10 × 160 ) = 48 + 10 = 58
Answer: 3A16 = 5810
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 9 / 12
Octal to Hexadecimal
Rule: Convert octal → binary → group into 4 bits → hex.
Example: Convert 578 to hex.
Step 1: Octal → Binary: 578 = 1011112
Step 2: Group into 4 bits: 0010 1111
Step 3: Convert to hex: 2F
Answer: 578 = 2F16
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 10 / 12
Hexadecimal to Octal
Rule: Convert hex → binary → group into 3 bits → octal.
Example: Convert 2F16 to octal.
Step 1: Hex → Binary: 2F = 0010 11112
Step 2: Group into 3 bits: 010 111 1 → 0101111
Step 3: Convert to octal: 57
Answer: 2F16 = 578
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 11 / 12
Summary of Conversions
Conversion Example
Decimal → Binary 1310 = 11012
Binary → Decimal 10112 = 1110
Decimal → Octal 12510 = 1758
Octal → Decimal 2578 = 17510
Binary → Octal 1101012 = 658
Octal → Binary 578 = 1011112
Decimal → Hex 25410 = FE16
Hex → Decimal 3A16 = 5810
Octal → Hex 578 = 2F16
Hex → Octal 2F16 = 578
Dr. Dheeraj, Assistant Professor, Mahindra University,
Number Hyderabad
System Conversions with Examples 12 / 12