Digital systems process data in binary (r=2), but human interfaces use decimal (r=10). Practical interfaces also employ octal (r=8) and hexadecimal (r=16) to condense long binary strings. Understanding the mathematical foundations of positional notation and conversion algorithms is essential for digital logic design.
1. Positional Radix r Number Theory
A positional number system represents numbers by a sequence of digits. The position of each digit determines its weight, which is a power of the base (or radix) r.
1.1 The Positional Expansion Theorem
Mathematical Definition
Any real number N in a base r positional number system is represented as:
N=(an−1an−2…a1a0⋅a−1a−2…a−m)r
Where:
The dot (⋅) represents the radix point (decimal point in base 10, binary point in base 2).
n is the number of integer digits, and m is the number of fractional digits.
The digits/coefficients ai must satisfy:
0≤ai<r
The quantitative decimal value of N is obtained by summing each digit multiplied by its position weight:
For example, in decimal (r=10), digits are {0,1,…,9}. In binary (r=2), digits are strictly {0,1}. In hexadecimal (r=16), the alphanumeric symbols {0−9,A−F} represent decimal values {0−15}.
2. Base Conversion Mechanics (Pencil-and-Paper Tutorial)
When converting numbers from decimal (base 10) to a target base r, the conversion is split into two distinct algorithms for the integer and fractional components.
graph TD
Input["Decimal Number N"] --> Split{"Split into Components"}
Split -->|Integer Component| IntDiv["Successive Division by Base r"]
IntDiv --> CollectRem["Collect Remainders Bottom to Top (MSB to LSB)"]
Split -->|Fractional Component| FracMult["Successive Multiplication by Base r"]
FracMult --> CollectInt["Collect Integer Carries Top to Bottom (MSB to LSB)"]
CollectRem & CollectInt --> Combine["Combined Base-r Result"]
Part A: Converting Integers (Successive Division Method)
To convert a decimal integer to a target base r:
Divide the decimal number by the target radix r.
Record the remainder (this becomes a digit of the result, starting from the Least Significant Bit (LSB)).
Take the integer quotient and divide it by r again.
Repeat this process until the quotient becomes 0. The last remainder recorded is the Most Significant Bit (MSB).
Successive Division: Convert 2510 to Binary (r=2)
25÷2=12remainder 1(LSB)
12÷2=6remainder 0
6÷2=3remainder 0
3÷2=1remainder 1
1÷2=0remainder 1(MSB)
Reading the remainders from bottom to top: 110012
Part B: Converting Fractions (Successive Multiplication Method)
To convert a decimal fraction to a target base r:
Multiply the decimal fraction by the target radix r.
Record the integer part of the resulting product (this becomes a digit of the result, starting from the MSB).
Take the remaining fractional part of the product and multiply it by r again.
Repeat until the fractional part becomes 0 (or until you reach the desired bit precision).
Successive Multiplication: Convert 0.62510 to Binary (r=2)
0.625×2=1.25→Record 1(MSB)
0.250×2=0.50→Record 0
0.500×2=1.00→Record 1(LSB, stop)
Reading the integer parts from top to bottom: 0.1012
Part C: Comparison of Conversion Methods
Feature
Successive Division Method
Successive Multiplication Method
Target Component
Integer part of the decimal number.
Fractional part of the decimal number.
Mathematical Operation
Division by target base r.
Multiplication by target base r.
Result Extraction
Remainders of the division.
Integer carries of the multiplication.
Reading Direction
Bottom-to-top (First remainder is LSB, last is MSB).
Top-to-bottom (First carry is MSB, last is LSB).
Termination Condition
Integer quotient becomes 0.
Fractional part becomes 0 or desired precision is met.
Paper-and-pencil binary multiplication and division are foundational mathematical topics required to understand computer arithmetic circuits (like multipliers and dividers in Chapter 5), but they are rarely tested directly as calculation problems in ECE 2103 examinations.
To build arithmetic logic units (ALUs), we must understand paper-and-pencil multiplication and division for unsigned binary numbers.
Unsigned binary multiplication is identical to decimal long multiplication. Since binary digits are only 0 or 1, the partial products are either equal to the multiplicand or zero.
Step-by-Step Algorithm:
Align the multiplicand and multiplier.
For each bit of the multiplier, from Least Significant Bit (LSB) to Most Significant Bit (MSB):
If the multiplier bit is 1, write down the multiplicand as a partial product, shifted left according to the bit position.
If the multiplier bit is 0, write down a row of 0s (or simply shift the next partial product).
Sum all the partial products using binary addition rules.
Unsigned Multiplication: Multiply 1110 by 510 (10112×01012) [Syllabus Week 2]
Binary division is performed using long division, matching the decimal algorithm.
Step-by-Step Algorithm:
Align the divisor with the most significant bits of the dividend.
Compare the divisor with the selected portion of the dividend:
If the dividend portion ≥ divisor, write 1 in the quotient, subtract the divisor from the dividend portion, and bring down the next bit of the dividend.
If the dividend portion < divisor, write 0 in the quotient and bring down the next bit.
Repeat this process until all bits of the dividend are processed.
Unsigned Division: Divide 4510 by 910 (1011012÷10012) [Syllabus Week 2]
000101 (Quotient = 5_10) _________ 1001 | 101101 (Dividend = 45_10) - 1001 (1011 >= 1001 -> Quotient bit = 1, subtract 1001) ------ 00100 (Remainder is 0010; bring down next dividend bit '0') - 00000 (0100 < 1001 -> Quotient bit = 0, subtract 0) ------- 1001 (Remainder is 0100; bring down next dividend bit '1') - 1001 (1001 >= 1001 -> Quotient bit = 1, subtract 1001) ------ 0000 (Remainder = 0; Stop. Result: Quotient = 101_2 = 5_10)
4. Conversions to “Unusual” Radices (Base-3, Base-4, Base-7, Base-12)
Examiners test your grasp of these algorithms by asking for conversions to non-standard bases (PYQ 2015, 2016, 2022, 2023, 2025 — 12 marks). The algorithm never changes; only the radix r you divide and multiply by changes.
Worked Exam Problem (2015, 2016, 2022, 2023 — 12 marks)
Convert the decimal number 249.6 to base-3, base-4, and base-7.
A. Converting 249.610 to Base-4
Integer Part (249) Successive Division by 4:
249÷4=62remainder 1(LSB)
62÷4=15remainder 2
15÷4=3remainder 3
3÷4=0remainder 3(MSB)
Integer Result: (3321)4
Fractional Part (0.6) Successive Multiplication by 4:
0.6×4=2.4→Record 2
0.4×4=1.6→Record 1
0.6×4=2.4→Record 2
0.4×4=1.6→Record 1 (repeats infinitely…)
Fractional Result: (.2121…)4
(249.6)10=(3321.2121…)4
B. Converting 249.610 to Base-7
Integer Part (249) Successive Division by 7:
249÷7=35remainder 4(LSB)
35÷7=5remainder 0
5÷7=0remainder 5(MSB)
Integer Result: (504)7
Fractional Part (0.6) Successive Multiplication by 7:
0.6×7=4.2→Record 4
0.2×7=1.4→Record 1
0.4×7=2.8→Record 2
0.8×7=5.6→Record 5
Fractional Result: (.4125…)7
(249.6)10=(504.4125…)7
C. Converting 249.610 to Base-3
Integer Part (249) Successive Division by 3:
249÷3=83remainder 0(LSB)
83÷3=27remainder 2
27÷3=9remainder 0
9÷3=3remainder 0
3÷3=1remainder 0
1÷3=0remainder 1(MSB)
Integer Result: (100020)3 — check: 243+6=249 ✓
Fractional Part (0.6) Successive Multiplication by 3:
0.6×3=1.8→Record 1
0.8×3=2.4→Record 2
0.4×3=1.2→Record 1
0.2×3=0.6→Record 0 (fraction returns to 0.6 — the block 1210 now repeats)
(249.6)10=(100020.1210)3
D. The Base-12 Variant (PYQ 2025 — 12 marks)
The 2025 paper asked for 247.810 to base-3, base-7, and base-12. Base-12 is the only radix in this course where a single digit can exceed 9, so it carries a trap of its own.
Integer part (247), divided by 12:
247÷12=20remainder 7(LSB)
20÷12=1remainder 8
1÷12=0remainder 1(MSB)
Integer Result: (187)12 — check: 144+96+7=247 ✓
Fractional part (0.8), multiplied by 12:
0.8×12=9.6→9
0.6×12=7.2→7
0.2×12=2.4→2
0.4×12=4.8→4 (fraction returns to 0.8 — block 9724 repeats)
(247.8)10=(187.9724)12
For completeness, the same number in the other two requested bases: (247.8)10=(100011.2101)3=(502.5412)7.
Exam Traps in Base Conversion
Base-12 digits run 0…9,A,B. A remainder of 10 must be written as A and 11 as B — never as the two characters “10”. This is the single most common lost mark in this question.
Repeating fractions never terminate.0.610 in base-3 and base-4 recurs forever. Do not keep multiplying — write 4–6 digits, mark the repeating block, and move on.
Digit ceiling check: every digit you write must satisfy 0≤ai<r. A "7" appearing in a base-7 answer means you made an arithmetic slip.
Always verify the integer part by expanding it back (positional sum). It costs 15 seconds and catches most division errors.
5. Hexadecimal Fractions to Binary, Octal, and Decimal
When converting between bases that are powers of 2 (21, 23, 24), we can convert directly by grouping bits.
Converting decimal fractions to binary can introduce precision errors {the gap between the true value and the value a fixed number of bits can actually store}, because a fraction that terminates in decimal often recurs forever in binary and must be cut short.
Worked Exam Problem: The "2/3" Fraction Analysis (PYQ 2021, 2023 — 12 marks)
Question (2021, verbatim): Do the following conversion problems:
(i) Convert decimal 27.315 to binary.
(ii) Calculate the binary equivalent of 2/3 out to eight places. Then convert from binary to decimal. How close is the result to 2/3?
(iii) Convert the binary result in (ii) into hexadecimal. Then convert the result to decimal. Is the answer the same?
(The 2023 paper replaced part (i) with the 249.6 base-4/base-7 conversion solved in §4, keeping (ii) and (iii) word-for-word.)
Solution:
Part 0: Convert 27.31510 to Binary (2021 part i)
Integer part (27), successive division by 2:27→13(r1)→6(r1)→3(r0)→1(r1)→0(r1), read bottom-up =110112.
Fractional part (0.315), successive multiplication by 2:
0.315×2=0.630
0.630×2=1.260
0.260×2=0.520
0.520×2=1.040
0.040×2=0.080
0.080×2=0.160
0.160×2=0.320
0.320×2=0.640 (stop at 8 places)
(27.315)10≈(11011.01010000)2
Reading back: 16+8+2+1+0.25+0.0625=27.3125, an error of 0.0025 against the true value — this non-terminating behaviour is exactly what parts (ii) and (iii) probe.