Number System 2
System |
Base |
Range |
|
Binary |
2 |
0, 1 |
|
Octal |
8 |
0 – 7 |
|
Decimal |
10 |
0 – 9 |
|
Hexadecimal |
16 |
0 – 9, A – F |
V. Converting Numbers from One Base to Another
A) Converting Any Base to Decimal
Method:
- Find the position (column) value of each digit
- Multiply each digit by its position value
- Add up all the products
|
Example — Convert 4706₈ to Decimal 4706₈ = (4×8³) + (7×8²) + (0×8¹) + (6×8⁰) = 2048 + 448 + 0 + 6 = 2502₁₀ |
B) Converting Decimal to Any Base — Division-Remainder Method
Method:
- Divide the decimal number by the new base
- Write down the remainder — this is the rightmost (last) digit of the answer
- Divide the quotient again by the same base
- Repeat this process until the quotient becomes 0
- Read all the remainders from BOTTOM to TOP — that gives the final answer
|
Example — Convert 952₁₀ to Octal 952 ÷ 8 = 119 remainder = 0 119 ÷ 8 = 14 remainder = 7 14 ÷ 8 = 1 remainder = 6 1 ÷ 8 = 0 remainder = 1 Reading remainders bottom to top: 952₁₀ = 1670₈ |
C) Converting One Base to Another Base (Not Decimal)
Method:
- First convert the given number to decimal
- Then convert that decimal number to the target base
|
Example — Convert 545₆ to Base 4 Step 1: Convert 545₆ to decimal 545₆ = (5×6²)+(4×6¹)+(5×6⁰) = 180+24+5 = 209₁₀ Step 2: Convert 209₁₀ to base 4 209÷4=52 rem 1 52÷4=13 rem 0 13÷4=3 rem 1 3÷4=0 rem 3 Reading bottom to top: 209₁₀ = 3101₄ So, 545₆ = 3101₄ |
VI. Shortcut Conversion Tricks
Because Binary, Octal and Hexadecimal are all closely related (8 = 2³ and 16 = 2⁴), we can convert between them quickly — WITHOUT going through decimal.
A) Binary → Octal
- Starting from the right, group the binary digits into sets of 3
- Convert each group of 3 bits into its equivalent octal digit
|
Example — Convert 1101010₂ to Octal Group in 3s: 001 101 010 Convert: 1 5 2 Answer: 1101010₂ = 152₈ |
B) Octal → Binary
- Convert each octal digit into a 3-bit binary group
- Join all the groups together
|
Example — Convert 562₈ to Binary 5 = 101 6 = 110 2 = 010 Answer: 562₈ = 101110010₂ |
C) Binary → Hexadecimal
- Starting from the right, group the binary digits into sets of 4
- Convert each group of 4 bits into its equivalent hex digit
|
Example — Convert 111101₂ to Hexadecimal Group in 4s: 0011 1101 Convert: 3 D Answer: 111101₂ = 3D₁₆ |
D) Hexadecimal → Binary
- Convert each hex digit into a 4-bit binary group
- Join all the groups together
|
Example — Convert 2AB₁₆ to Binary 2 = 0010 A = 1010 B = 1011 Answer: 2AB₁₆ = 001010101011₂ |
VII. Fractional Numbers
Just like the decimal system has digits after the decimal point (e.g. 3.14), other number systems can also have digits after their own 'point' (binary point, octal point, etc.).
Rule:
- Digits to the LEFT of the point use positive powers of the base: base⁰, base¹, base², …
- Digits to the RIGHT of the point use negative powers of the base: base⁻¹, base⁻², base⁻³, …
|
Example — Binary Fraction: 110.101₂ 110.101₂ = (1×2²)+(1×2¹)+(0×2⁰)+(1×2⁻¹)+(0×2⁻²)+(1×2⁻³) = 4 + 2 + 0 + 0.5 + 0 + 0.125 = 6.625₁₀ |
|
Example — Octal Fraction: 127.54₈ 127.54₈ = (1×8²)+(2×8¹)+(7×8⁰)+(5×8⁻¹)+(4×8⁻²) = 64 + 16 + 7 + 0.625 + 0.0625 = 87.6875₁₀ |
RANREV INFOTECH