PROJECTENGRAM

[PS] NUMBER SYSTEM BASE CONVERSION

Problem Set: Number System Base Conversion

Tags: #◇Computer Science #◇CSARCH2 #◇Problem Sets #◇Number Systems #◇Base Conversion #◇Data Representation


◇Overview

In computer architecture, data is represented and manipulated across various radix (base) number systems. While digital hardware fundamentally executes operations in Binary (Base 2), human engineers utilize higher-order power-of-two representations such as Quaternary (Base 4), Octal (Base 8), and Hexadecimal (Base 16) for compactness and direct bit-level mapping. Non-power-of-two systems such as Decimal (Base 10) and arbitrary radices like Base-5 (Quinary) require general positional algorithms for base conversion.

This problem set provides an exhaustive, mathematically rigorous treatment of base conversions covering integer and fractional parts, power-of-two direct grouping, polynomial expansions, repeated division/multiplication algorithms, and periodic rational representations.


◇Theoretical Foundations & Conversion Algorithms

1. General Positional Number Representation

A real number NN represented in radix bb with nn integer digits and mm fractional digits has the value given by the polynomial expansion:

Nb=∑i=0n−1di⋅bi+∑j=1md−j⋅b−jN_b = \sum_{i=0}^{n-1} d_i \cdot b^i + \sum_{j=1}^{m} d_{-j} \cdot b^{-j}

where dk∈{0,1,…,b−1}d_k \in \{0, 1, \dots, b-1\}.

2. Base bb to Decimal (Base 10)

Evaluate the polynomial expansion directly using base-10 arithmetic:
Decimal Value=dn−1bn−1+⋯+d1b1+d0b0+d−1b−1+d−2b−2+…\text{Decimal Value} = d_{n-1} b^{n-1} + \dots + d_1 b^1 + d_0 b^0 + d_{-1} b^{-1} + d_{-2} b^{-2} + \dots

3. Decimal (Base 10) to Target Base bb

  • Integer Part (I10I_{10}): Successive division by radix bb. The remainders form the digits from least significant (d0d_0) to most significant (dn−1d_{n-1}):
    Ik=⌊Ik−1/b⌋,dk=Ik−1(modb)I_k = \lfloor I_{k-1} / b \rfloor, \quad d_k = I_{k-1} \pmod b
  • Fractional Part (F10F_{10}): Successive multiplication by radix bb. The integer parts extracted at each step form the digits from most significant fractional (d−1d_{-1}) downward:
    d−j=⌊Fj−1⋅b⌋,Fj=(Fj−1⋅b)−d−jd_{-j} = \lfloor F_{j-1} \cdot b \rfloor, \quad F_j = (F_{j-1} \cdot b) - d_{-j}

4. Power-of-Two Radix Grouping (2k↔2m2^k \leftrightarrow 2^m)

Because 4=224 = 2^2, 8=238 = 2^3, and 16=2416 = 2^4, conversion between binary and these bases does not require intermediate decimal arithmetic:

  • Binary ↔\leftrightarrow Quaternary (Base 4): Group in clusters of 22 bits starting from the radix point (left for integer, right for fraction, zero-padding as necessary).
  • Binary ↔\leftrightarrow Octal (Base 8): Group in clusters of 33 bits starting from the radix point.
  • Binary ↔\leftrightarrow Hexadecimal (Base 16): Group in clusters of 44 bits (nibbles) starting from the radix point.

◇Master Base Conversion Summary Table

The table below presents the completed base conversion matrix for all problems:

RowDecimal (b=10b=10)Binary (b=2b=2)Quaternary (b=4b=4)Octal (b=8b=8)Hexadecimal (b=16b=16)Base-5 (b=5b=5)
199.75\mathbf{99.75}1100011.1121100011.11_21203.341203.3_4143.68143.6_863.C1663.\text{C}_{16}344.3‾5344.\overline{3}_5
253.62553.625110101.1012\mathbf{110101.101_2}311.224311.22_465.5865.5_835.A1635.\text{A}_{16}203.30‾5203.\overline{30}_5
314.937514.93751110.111121110.1111_232.334\mathbf{32.33_4}16.74816.74_8E.F16\text{E}.\text{F}_{16}24.4320‾524.\overline{4320}_5
4474.5625474.5625111011010.10012111011010.1001_213122.21413122.21_4732.448\mathbf{732.44_8}1DA.9161\text{DA}.9_{16}3344.2401‾53344.\overline{2401}_5
52989.78906252989.7890625101110101101.11001012101110101101.1100101_2232231.30224232231.3022_45655.62485655.624_8BAD.CA16\mathbf{BAD.CA_{16}}43424.34330402232142411210313000442013‾543424.\overline{34330402232142411210313000442013}_5
684.4484.441010100.01110000101000111101‾21010100.\overline{01110000101000111101}_21110.1300220331‾41110.\overline{1300220331}_4124.34121727024365605075‾8124.\overline{34121727024365605075}_854.70A3D‾1654.\overline{70\text{A}3\text{D}}_{16}314.215\mathbf{314.21_5}

◇Detailed Step-by-Step Problem Solutions

Problem 1: Given Decimal 99.751099.75_{10}

We decompose 99.751099.75_{10} into Integer Part I=99I = 99 and Fractional Part F=0.75F = 0.75.

1.1 Decimal to Binary (b=2b=2)

  • Integer Part (991099_{10}): Repeated division by 22:
    99÷2=49R 1(d0)49÷2=24R 1(d1)24÷2=12R 0(d2)12÷2=6    R 0(d3)6÷2=3    R 0(d4)3÷2=1    R 1(d5)1÷2=0    R 1(d6)\begin{aligned} 99 \div 2 &= 49 \quad \text{R } 1 \quad (d_0) \\ 49 \div 2 &= 24 \quad \text{R } 1 \quad (d_1) \\ 24 \div 2 &= 12 \quad \text{R } 0 \quad (d_2) \\ 12 \div 2 &= 6 \quad \;\; \text{R } 0 \quad (d_3) \\ 6 \div 2 &= 3 \quad \;\; \text{R } 0 \quad (d_4) \\ 3 \div 2 &= 1 \quad \;\; \text{R } 1 \quad (d_5) \\ 1 \div 2 &= 0 \quad \;\; \text{R } 1 \quad (d_6) \end{aligned}
    Reading remainders from bottom to top: 9910=1100011299_{10} = 1100011_2.

  • Fractional Part (0.75100.75_{10}): Repeated multiplication by 22:
    0.75×2=1.50  ⟹  Integer digit 1(d−1),Fractional remainder 0.500.50×2=1.00  ⟹  Integer digit 1(d−2),Fractional remainder 0.00\begin{aligned} 0.75 \times 2 &= 1.50 \implies \text{Integer digit } 1 \quad (d_{-1}), \quad \text{Fractional remainder } 0.50 \\ 0.50 \times 2 &= 1.00 \implies \text{Integer digit } 1 \quad (d_{-2}), \quad \text{Fractional remainder } 0.00 \end{aligned}
    Thus, 0.7510=0.1120.75_{10} = 0.11_2.

  • Combined Result:
    99.7510=1100011.112\mathbf{99.75_{10} = 1100011.11_2}

1.2 Binary to Quaternary (b=4b=4)

Group the binary digits into 2-bit blocks relative to the radix point:
01⏟1    10⏟2    00⏟0    11⏟3  .  11⏟3\underbrace{01}_{1} \;\; \underbrace{10}_{2} \;\; \underbrace{00}_{0} \;\; \underbrace{11}_{3} \; . \; \underbrace{11}_{3}
99.7510=1203.34\mathbf{99.75_{10} = 1203.3_4}
Verification via powers of 4:
1(43)+2(42)+0(41)+3(40)+3(4−1)=64+32+0+3+0.75=99.7510✓1(4^3) + 2(4^2) + 0(4^1) + 3(4^0) + 3(4^{-1}) = 64 + 32 + 0 + 3 + 0.75 = 99.75_{10} \quad \checkmark

1.3 Binary to Octal (b=8b=8)

Group the binary digits into 3-bit blocks relative to the radix point (pad with leading/trailing zeros):
001⏟1    100⏟4    011⏟3  .  110⏟6\underbrace{001}_{1} \;\; \underbrace{100}_{4} \;\; \underbrace{011}_{3} \; . \; \underbrace{110}_{6}
99.7510=143.68\mathbf{99.75_{10} = 143.6_8}
Verification via powers of 8:
1(82)+4(81)+3(80)+6(8−1)=64+32+3+0.75=99.7510✓1(8^2) + 4(8^1) + 3(8^0) + 6(8^{-1}) = 64 + 32 + 3 + 0.75 = 99.75_{10} \quad \checkmark

1.4 Binary to Hexadecimal (b=16b=16)

Group the binary digits into 4-bit nibbles relative to the radix point:
0110⏟6    0011⏟3  .  1100⏟C\underbrace{0110}_{6} \;\; \underbrace{0011}_{3} \; . \; \underbrace{1100}_{\text{C}}
99.7510=63.C16\mathbf{99.75_{10} = 63.\text{C}_{16}}
Verification via powers of 16:
6(161)+3(160)+12(16−1)=96+3+0.75=99.7510✓6(16^1) + 3(16^0) + 12(16^{-1}) = 96 + 3 + 0.75 = 99.75_{10} \quad \checkmark

1.5 Decimal to Base-5 (b=5b=5)

  • Integer Part (991099_{10}): Repeated division by 55:
    99÷5=19R 4(d0)19÷5=3    R 4(d1)3÷5=0    R 3(d2)\begin{aligned} 99 \div 5 &= 19 \quad \text{R } 4 \quad (d_0) \\ 19 \div 5 &= 3 \quad \;\; \text{R } 4 \quad (d_1) \\ 3 \div 5 &= 0 \quad \;\; \text{R } 3 \quad (d_2) \end{aligned}
    Reading bottom to top: 9910=344599_{10} = 344_5.

  • Fractional Part (0.75100.75_{10}): Repeated multiplication by 55:
    0.75×5=3.75  ⟹  digit 3,fraction 0.750.75×5=3.75  ⟹  digit 3,fraction 0.75(repeats indefinitely)\begin{aligned} 0.75 \times 5 &= 3.75 \implies \text{digit } 3, \quad \text{fraction } 0.75 \\ 0.75 \times 5 &= 3.75 \implies \text{digit } 3, \quad \text{fraction } 0.75 \quad (\text{repeats indefinitely}) \end{aligned}
    The fraction is strictly periodic: 0.7510=0.3‾50.75_{10} = 0.\overline{3}_5.
    Analytic Verification via Infinite Geometric Series:
    ∑k=1∞3⋅5−k=3⋅5−11−5−1=3⋅1/54/5=34=0.7510✓\sum_{k=1}^{\infty} 3 \cdot 5^{-k} = 3 \cdot \frac{5^{-1}}{1 - 5^{-1}} = 3 \cdot \frac{1/5}{4/5} = \frac{3}{4} = 0.75_{10} \quad \checkmark

  • Combined Result:
    99.7510=344.3‾5≈344.33335\mathbf{99.75_{10} = 344.\overline{3}_5 \approx 344.3333_5}


Problem 2: Given Binary 110101.1012110101.101_2

2.1 Binary to Decimal (b=10b=10)

Expand using positional notation:
110101.1012=1(25)+1(24)+0(23)+1(22)+0(21)+1(20)+1(2−1)+0(2−2)+1(2−3)=32+16+0+4+0+1+0.5+0+0.125=53+0.625=53.62510=535810\begin{aligned} 110101.101_2 &= 1(2^5) + 1(2^4) + 0(2^3) + 1(2^2) + 0(2^1) + 1(2^0) + 1(2^{-1}) + 0(2^{-2}) + 1(2^{-3}) \\ &= 32 + 16 + 0 + 4 + 0 + 1 + 0.5 + 0 + 0.125 \\ &= 53 + 0.625 = \mathbf{53.625_{10}} = 53\frac{5}{8}_{10} \end{aligned}

2.2 Binary to Quaternary (b=4b=4)

Group in 2-bit pairs from the radix point:
11⏟3    01⏟1    01⏟1  .  10⏟2    10⏟2\underbrace{11}_{3} \;\; \underbrace{01}_{1} \;\; \underbrace{01}_{1} \; . \; \underbrace{10}_{2} \;\; \underbrace{10}_{2}
110101.1012=311.224\mathbf{110101.101_2 = 311.22_4}
Verification: 3(42)+1(41)+1(40)+2(4−1)+2(4−2)=48+4+1+0.5+0.125=53.62510✓3(4^2) + 1(4^1) + 1(4^0) + 2(4^{-1}) + 2(4^{-2}) = 48 + 4 + 1 + 0.5 + 0.125 = 53.625_{10} \quad \checkmark

2.3 Binary to Octal (b=8b=8)

Group in 3-bit triplets from the radix point:
110⏟6    101⏟5  .  101⏟5\underbrace{110}_{6} \;\; \underbrace{101}_{5} \; . \; \underbrace{101}_{5}
110101.1012=65.58\mathbf{110101.101_2 = 65.5_8}
Verification: 6(81)+5(80)+5(8−1)=48+5+0.625=53.62510✓6(8^1) + 5(8^0) + 5(8^{-1}) = 48 + 5 + 0.625 = 53.625_{10} \quad \checkmark

2.4 Binary to Hexadecimal (b=16b=16)

Group in 4-bit nibbles from the radix point:
0011⏟3    0101⏟5  .  1010⏟A\underbrace{0011}_{3} \;\; \underbrace{0101}_{5} \; . \; \underbrace{1010}_{\text{A}}
110101.1012=35.A16\mathbf{110101.101_2 = 35.\text{A}_{16}}
Verification: 3(161)+5(160)+10(16−1)=48+5+0.625=53.62510✓3(16^1) + 5(16^0) + 10(16^{-1}) = 48 + 5 + 0.625 = 53.625_{10} \quad \checkmark

2.5 Decimal to Base-5 (b=5b=5)

  • Integer Part (531053_{10}):
    53÷5=10R 3(d0)10÷5=2    R 0(d1)2÷5=0    R 2(d2)\begin{aligned} 53 \div 5 &= 10 \quad \text{R } 3 \quad (d_0) \\ 10 \div 5 &= 2 \quad \;\; \text{R } 0 \quad (d_1) \\ 2 \div 5 &= 0 \quad \;\; \text{R } 2 \quad (d_2) \end{aligned}
    Integer: 2035203_5.

  • Fractional Part (0.62510=5/80.625_{10} = 5/8):
    0.625×5=3.125  ⟹  digit 3,fraction 0.1250.125×5=0.625  ⟹  digit 0,fraction 0.625(repeats cycle 30)\begin{aligned} 0.625 \times 5 &= 3.125 \implies \text{digit } 3, \quad \text{fraction } 0.125 \\ 0.125 \times 5 &= 0.625 \implies \text{digit } 0, \quad \text{fraction } 0.625 \quad (\text{repeats cycle } 30) \end{aligned}
    Periodic cycle length is 22: 0.62510=0.30‾50.625_{10} = 0.\overline{30}_5.
    Analytic Verification:
    3⋅5−1+0⋅5−21−5−2=3/524/25=35⋅2524=75120=58=0.62510✓\frac{3 \cdot 5^{-1} + 0 \cdot 5^{-2}}{1 - 5^{-2}} = \frac{3/5}{24/25} = \frac{3}{5} \cdot \frac{25}{24} = \frac{75}{120} = \frac{5}{8} = 0.625_{10} \quad \checkmark

  • Combined Result:
    110101.1012=203.30‾5≈203.30305\mathbf{110101.101_2 = 203.\overline{30}_5 \approx 203.3030_5}


Problem 3: Given Quaternary 32.33432.33_4

3.1 Quaternary to Decimal (b=10b=10)

Expand using positional notation:
32.334=3(41)+2(40)+3(4−1)+3(4−2)=12+2+34+316=14+0.75+0.1875=14.937510=14151610\begin{aligned} 32.33_4 &= 3(4^1) + 2(4^0) + 3(4^{-1}) + 3(4^{-2}) \\ &= 12 + 2 + \frac{3}{4} + \frac{3}{16} \\ &= 14 + 0.75 + 0.1875 = \mathbf{14.9375_{10}} = 14\frac{15}{16}_{10} \end{aligned}

3.2 Quaternary to Binary (b=2b=2)

Directly replace each quaternary digit by its 2-bit binary equivalent:
34=112,24=102,34=112,34=1123_4 = 11_2, \quad 2_4 = 10_2, \quad 3_4 = 11_2, \quad 3_4 = 11_2
32.334=1110.11112\mathbf{32.33_4 = 1110.1111_2}

3.3 Binary to Octal (b=8b=8)

Regroup 1110.111121110.1111_2 in 3-bit triplets:
001⏟1    110⏟6  .  111⏟7    100⏟4\underbrace{001}_{1} \;\; \underbrace{110}_{6} \; . \; \underbrace{111}_{7} \;\; \underbrace{100}_{4}
32.334=16.748\mathbf{32.33_4 = 16.74_8}
Verification: 1(81)+6(80)+7(8−1)+4(8−2)=8+6+56+464=14+6064=14.937510✓1(8^1) + 6(8^0) + 7(8^{-1}) + 4(8^{-2}) = 8 + 6 + \frac{56+4}{64} = 14 + \frac{60}{64} = 14.9375_{10} \quad \checkmark

3.4 Binary to Hexadecimal (b=16b=16)

Regroup 1110.111121110.1111_2 in 4-bit nibbles:
1110⏟E  .  1111⏟F\underbrace{1110}_{\text{E}} \; . \; \underbrace{1111}_{\text{F}}
32.334=E.F16\mathbf{32.33_4 = \text{E}.\text{F}_{16}}
Verification: 14(160)+15(16−1)=14+0.9375=14.937510✓14(16^0) + 15(16^{-1}) = 14 + 0.9375 = 14.9375_{10} \quad \checkmark

3.5 Decimal to Base-5 (b=5b=5)

  • Integer Part (141014_{10}):
    14÷5=2R 4,2÷5=0R 2  ⟹  24514 \div 5 = 2 \quad \text{R } 4, \quad 2 \div 5 = 0 \quad \text{R } 2 \implies 24_5

  • Fractional Part (0.937510=15/160.9375_{10} = 15/16):
    0.9375×5=4.6875  ⟹  digit 4,fraction 0.68750.6875×5=3.4375  ⟹  digit 3,fraction 0.43750.4375×5=2.1875  ⟹  digit 2,fraction 0.18750.1875×5=0.9375  ⟹  digit 0,fraction 0.9375(repeats cycle 4320)\begin{aligned} 0.9375 \times 5 &= 4.6875 \implies \text{digit } 4, \quad \text{fraction } 0.6875 \\ 0.6875 \times 5 &= 3.4375 \implies \text{digit } 3, \quad \text{fraction } 0.4375 \\ 0.4375 \times 5 &= 2.1875 \implies \text{digit } 2, \quad \text{fraction } 0.1875 \\ 0.1875 \times 5 &= 0.9375 \implies \text{digit } 0, \quad \text{fraction } 0.9375 \quad (\text{repeats cycle } 4320) \end{aligned}
    Periodic cycle length is 44: 0.937510=0.4320‾50.9375_{10} = 0.\overline{4320}_5.
    Analytic Verification:
    4(53)+3(52)+2(51)+0(50)54−1=500+75+10+0624=585624=15×3916×39=1516=0.937510✓\frac{4(5^3) + 3(5^2) + 2(5^1) + 0(5^0)}{5^4 - 1} = \frac{500 + 75 + 10 + 0}{624} = \frac{585}{624} = \frac{15 \times 39}{16 \times 39} = \frac{15}{16} = 0.9375_{10} \quad \checkmark

  • Combined Result:
    32.334=24.4320‾5≈24.43205\mathbf{32.33_4 = 24.\overline{4320}_5 \approx 24.4320_5}


Problem 4: Given Octal 732.448732.44_8

4.1 Octal to Binary (b=2b=2)

Expand each octal digit into its 3-bit binary equivalent:
78=1112,38=0112,28=0102,48=1002,48=10027_8 = 111_2, \quad 3_8 = 011_2, \quad 2_8 = 010_2, \quad 4_8 = 100_2, \quad 4_8 = 100_2
732.448=111011010.10012(or 111011010.1001002)\mathbf{732.44_8 = 111011010.1001_2} \quad (\text{or } 111011010.100100_2)

4.2 Octal to Decimal (b=10b=10)

Expand using positional notation:
732.448=7(82)+3(81)+2(80)+4(8−1)+4(8−2)=7(64)+24+2+48+464=448+26+0.5+0.0625=474.562510=47491610\begin{aligned} 732.44_8 &= 7(8^2) + 3(8^1) + 2(8^0) + 4(8^{-1}) + 4(8^{-2}) \\ &= 7(64) + 24 + 2 + \frac{4}{8} + \frac{4}{64} \\ &= 448 + 26 + 0.5 + 0.0625 = \mathbf{474.5625_{10}} = 474\frac{9}{16}_{10} \end{aligned}

4.3 Binary to Quaternary (b=4b=4)

Regroup binary 111011010.10012111011010.1001_2 into 2-bit pairs:
01⏟1    11⏟3    01⏟1    10⏟2    10⏟2  .  10⏟2    01⏟1\underbrace{01}_{1} \;\; \underbrace{11}_{3} \;\; \underbrace{01}_{1} \;\; \underbrace{10}_{2} \;\; \underbrace{10}_{2} \; . \; \underbrace{10}_{2} \;\; \underbrace{01}_{1}
732.448=13122.214\mathbf{732.44_8 = 13122.21_4}
Verification: 1(256)+3(64)+1(16)+2(4)+2(1)+2(0.25)+1(0.0625)=474.562510✓1(256) + 3(64) + 1(16) + 2(4) + 2(1) + 2(0.25) + 1(0.0625) = 474.5625_{10} \quad \checkmark

4.4 Binary to Hexadecimal (b=16b=16)

Regroup binary 111011010.10012111011010.1001_2 into 4-bit nibbles:
0001⏟1    1101⏟D    1010⏟A  .  1001⏟9\underbrace{0001}_{1} \;\; \underbrace{1101}_{\text{D}} \;\; \underbrace{1010}_{\text{A}} \; . \; \underbrace{1001}_{9}
732.448=1DA.916\mathbf{732.44_8 = 1\text{DA}.9_{16}}
Verification: 1(256)+13(16)+10(1)+9(16−1)=256+208+10+0.5625=474.562510✓1(256) + 13(16) + 10(1) + 9(16^{-1}) = 256 + 208 + 10 + 0.5625 = 474.5625_{10} \quad \checkmark

4.5 Decimal to Base-5 (b=5b=5)

  • Integer Part (47410474_{10}):
    474÷5=94R 4(d0)94÷5=18R 4(d1)18÷5=3    R 3(d2)3÷5=0    R 3(d3)\begin{aligned} 474 \div 5 &= 94 \quad \text{R } 4 \quad (d_0) \\ 94 \div 5 &= 18 \quad \text{R } 4 \quad (d_1) \\ 18 \div 5 &= 3 \quad \;\; \text{R } 3 \quad (d_2) \\ 3 \div 5 &= 0 \quad \;\; \text{R } 3 \quad (d_3) \end{aligned}
    Integer: 334453344_5.

  • Fractional Part (0.562510=9/160.5625_{10} = 9/16):
    0.5625×5=2.8125  ⟹  digit 2,fraction 0.81250.8125×5=4.0625  ⟹  digit 4,fraction 0.06250.0625×5=0.3125  ⟹  digit 0,fraction 0.31250.3125×5=1.5625  ⟹  digit 1,fraction 0.5625(repeats cycle 2401)\begin{aligned} 0.5625 \times 5 &= 2.8125 \implies \text{digit } 2, \quad \text{fraction } 0.8125 \\ 0.8125 \times 5 &= 4.0625 \implies \text{digit } 4, \quad \text{fraction } 0.0625 \\ 0.0625 \times 5 &= 0.3125 \implies \text{digit } 0, \quad \text{fraction } 0.3125 \\ 0.3125 \times 5 &= 1.5625 \implies \text{digit } 1, \quad \text{fraction } 0.5625 \quad (\text{repeats cycle } 2401) \end{aligned}
    Periodic cycle length is 44: 0.562510=0.2401‾50.5625_{10} = 0.\overline{2401}_5.
    Analytic Verification:
    2(53)+4(52)+0(51)+1(50)54−1=250+100+0+1624=351624=9×3916×39=916=0.562510✓\frac{2(5^3) + 4(5^2) + 0(5^1) + 1(5^0)}{5^4 - 1} = \frac{250 + 100 + 0 + 1}{624} = \frac{351}{624} = \frac{9 \times 39}{16 \times 39} = \frac{9}{16} = 0.5625_{10} \quad \checkmark

  • Combined Result:
    732.448=3344.2401‾5≈3344.24015\mathbf{732.44_8 = 3344.\overline{2401}_5 \approx 3344.2401_5}


Problem 5: Given Hexadecimal BAD.CA16\text{BAD.CA}_{16}

Digits: B=1110\text{B} = 11_{10}, A=1010\text{A} = 10_{10}, D=1310\text{D} = 13_{10}, C=1210\text{C} = 12_{10}, A=1010\text{A} = 10_{10}.

5.1 Hexadecimal to Binary (b=2b=2)

Expand each hex digit into a 4-bit nibble:
B=10112,A=10102,D=11012,C=11002,A=10102\text{B} = 1011_2, \quad \text{A} = 1010_2, \quad \text{D} = 1101_2, \quad \text{C} = 1100_2, \quad \text{A} = 1010_2
BAD.CA16=101110101101.11001012(or 101110101101.110010102)\mathbf{\text{BAD.CA}_{16} = 101110101101.1100101_2} \quad (\text{or } 101110101101.11001010_2)

5.2 Hexadecimal to Decimal (b=10b=10)

Expand using positional notation:
BAD.CA16=11(162)+10(161)+13(160)+12(16−1)+10(16−2)=11(256)+160+13+1216+10256=2816+173+192+10256=2989+202256=2989+101128=2989.789062510\begin{aligned} \text{BAD.CA}_{16} &= 11(16^2) + 10(16^1) + 13(16^0) + 12(16^{-1}) + 10(16^{-2}) \\ &= 11(256) + 160 + 13 + \frac{12}{16} + \frac{10}{256} \\ &= 2816 + 173 + \frac{192 + 10}{256} = 2989 + \frac{202}{256} = 2989 + \frac{101}{128} \\ &= \mathbf{2989.7890625_{10}} \end{aligned}

5.3 Binary to Quaternary (b=4b=4)

Regroup 101110101101.110010102101110101101.11001010_2 into 2-bit pairs:
10⏟2    11⏟3    10⏟2    10⏟2    11⏟3    01⏟1  .  11⏟3    00⏟0    10⏟2    10⏟2\underbrace{10}_{2} \;\; \underbrace{11}_{3} \;\; \underbrace{10}_{2} \;\; \underbrace{10}_{2} \;\; \underbrace{11}_{3} \;\; \underbrace{01}_{1} \; . \; \underbrace{11}_{3} \;\; \underbrace{00}_{0} \;\; \underbrace{10}_{2} \;\; \underbrace{10}_{2}
BAD.CA16=232231.30224\mathbf{\text{BAD.CA}_{16} = 232231.3022_4}
Verification: 2(45)+3(44)+2(43)+2(42)+3(41)+1(40)+3(4−1)+2(4−3)+2(4−4)=2048+768+128+32+12+1+0.75+0.03125+0.0078125=2989.789062510✓2(4^5) + 3(4^4) + 2(4^3) + 2(4^2) + 3(4^1) + 1(4^0) + 3(4^{-1}) + 2(4^{-3}) + 2(4^{-4}) = 2048 + 768 + 128 + 32 + 12 + 1 + 0.75 + 0.03125 + 0.0078125 = 2989.7890625_{10} \quad \checkmark

5.4 Binary to Octal (b=8b=8)

Regroup 101110101101.110010102101110101101.11001010_2 into 3-bit triplets:
101⏟5    110⏟6    101⏟5    101⏟5  .  110⏟6    010⏟2    100⏟4\underbrace{101}_{5} \;\; \underbrace{110}_{6} \;\; \underbrace{101}_{5} \;\; \underbrace{101}_{5} \; . \; \underbrace{110}_{6} \;\; \underbrace{010}_{2} \;\; \underbrace{100}_{4}
BAD.CA16=5655.6248\mathbf{\text{BAD.CA}_{16} = 5655.624_8}
Verification: 5(512)+6(64)+5(8)+5(1)+68+264+4512=2560+384+40+5+384+16+4512=2989+404512=2989.789062510✓5(512) + 6(64) + 5(8) + 5(1) + \frac{6}{8} + \frac{2}{64} + \frac{4}{512} = 2560 + 384 + 40 + 5 + \frac{384+16+4}{512} = 2989 + \frac{404}{512} = 2989.7890625_{10} \quad \checkmark

5.5 Decimal to Base-5 (b=5b=5)

  • Integer Part (2989102989_{10}):
    2989÷5=597R 4(d0)597÷5=119R 2(d1)119÷5=23    R 4(d2)23÷5=4        R 3(d3)4÷5=0        R 4(d4)\begin{aligned} 2989 \div 5 &= 597 \quad \text{R } 4 \quad (d_0) \\ 597 \div 5 &= 119 \quad \text{R } 2 \quad (d_1) \\ 119 \div 5 &= 23 \quad \;\; \text{R } 4 \quad (d_2) \\ 23 \div 5 &= 4 \quad \;\;\;\; \text{R } 3 \quad (d_3) \\ 4 \div 5 &= 0 \quad \;\;\;\; \text{R } 4 \quad (d_4) \end{aligned}
    Integer: 43424543424_5. (4⋅625+3⋅125+4⋅25+2⋅5+4=2500+375+100+10+4=2989104 \cdot 625 + 3 \cdot 125 + 4 \cdot 25 + 2 \cdot 5 + 4 = 2500 + 375 + 100 + 10 + 4 = 2989_{10}).

  • Fractional Part (0.789062510=101/1280.7890625_{10} = 101/128):
    Successive multiplication by 55 generates a repeating sequence of period length 3232 (since the multiplicative order of 5(mod128)5 \pmod{128} is 3232):
    The repeating sequence of base-5 digits is:
    34330402232142411210313000442013‾5\overline{34330402232142411210313000442013}_5
    First 8 digits: 0.34330402…50.34330402\dots_5.
    Analytic Verification: ∑k=132d−k5−k/(1−5−32)=101128=0.789062510✓\sum_{k=1}^{32} d_{-k} 5^{-k} / (1 - 5^{-32}) = \frac{101}{128} = 0.7890625_{10} \quad \checkmark

  • Combined Result:
    BAD.CA16=43424.34330402232142411210313000442013‾5≈43424.34335\mathbf{\text{BAD.CA}_{16} = 43424.\overline{34330402232142411210313000442013}_5 \approx 43424.3433_5}


Problem 6: Given Base-5 314.215314.21_5

6.1 Base-5 to Decimal (b=10b=10)

Expand using positional notation:
314.215=3(52)+1(51)+4(50)+2(5−1)+1(5−2)=3(25)+5+4+25+125=75+9+0.4+0.04=84.4410=84112510\begin{aligned} 314.21_5 &= 3(5^2) + 1(5^1) + 4(5^0) + 2(5^{-1}) + 1(5^{-2}) \\ &= 3(25) + 5 + 4 + \frac{2}{5} + \frac{1}{25} \\ &= 75 + 9 + 0.4 + 0.04 = \mathbf{84.44_{10}} = 84\frac{11}{25}_{10} \end{aligned}

6.2 Decimal to Binary (b=2b=2)

  • Integer Part (841084_{10}):
    84=64+16+4=26+24+22  ⟹  1010100284 = 64 + 16 + 4 = 2^6 + 2^4 + 2^2 \implies \mathbf{1010100_2}
    Verification via successive division:
    84/2=42 R 0,  42/2=21 R 0,  21/2=10 R 1,  10/2=5 R 0,  5/2=2 R 1,  2/2=1 R 0,  1/2=0 R 184/2 = 42\text{ R }0, \; 42/2 = 21\text{ R }0, \; 21/2 = 10\text{ R }1, \; 10/2 = 5\text{ R }0, \; 5/2 = 2\text{ R }1, \; 2/2 = 1\text{ R }0, \; 1/2 = 0\text{ R }1

  • Fractional Part (0.4410=11/250.44_{10} = 11/25):
    Successive multiplication by 22 produces a 2020-bit repeating period (since ord25(2)=20\text{ord}_{25}(2) = 20):
    0.44×2=0.88→00.88×2=1.76→10.76×2=1.52→10.52×2=1.04→10.04×2=0.08→00.08×2=0.16→00.16×2=0.32→00.32×2=0.64→00.64×2=1.28→10.28×2=0.56→00.56×2=1.12→10.12×2=0.24→00.24×2=0.48→00.48×2=0.96→00.96×2=1.92→10.92×2=1.84→10.84×2=1.68→10.68×2=1.36→10.36×2=0.72→00.72×2=1.44→1\begin{aligned} 0.44 \times 2 &= 0.88 \to 0 & 0.88 \times 2 &= 1.76 \to 1 & 0.76 \times 2 &= 1.52 \to 1 & 0.52 \times 2 &= 1.04 \to 1 \\ 0.04 \times 2 &= 0.08 \to 0 & 0.08 \times 2 &= 0.16 \to 0 & 0.16 \times 2 &= 0.32 \to 0 & 0.32 \times 2 &= 0.64 \to 0 \\ 0.64 \times 2 &= 1.28 \to 1 & 0.28 \times 2 &= 0.56 \to 0 & 0.56 \times 2 &= 1.12 \to 1 & 0.12 \times 2 &= 0.24 \to 0 \\ 0.24 \times 2 &= 0.48 \to 0 & 0.48 \times 2 &= 0.96 \to 0 & 0.96 \times 2 &= 1.92 \to 1 & 0.92 \times 2 &= 1.84 \to 1 \\ 0.84 \times 2 &= 1.68 \to 1 & 0.68 \times 2 &= 1.36 \to 1 & 0.36 \times 2 &= 0.72 \to 0 & 0.72 \times 2 &= 1.44 \to 1 \end{aligned}
    Repeating block: 0.01110000101000111101‾20.\overline{01110000101000111101}_2.
    Analytic Verification:
    011100001010001111012220−1=4613731048575=461373/419431048575/41943=1125=0.4410✓\frac{01110000101000111101_2}{2^{20} - 1} = \frac{461373}{1048575} = \frac{461373 / 41943}{1048575 / 41943} = \frac{11}{25} = 0.44_{10} \quad \checkmark

  • Combined Result:
    314.215=1010100.01110000101000111101‾2≈1010100.011100002\mathbf{314.21_5 = 1010100.\overline{01110000101000111101}_2 \approx 1010100.01110000_2}

6.3 Decimal / Binary to Quaternary (b=4b=4)

  • Integer part: 10101002→01⏟101⏟101⏟100⏟0=111041010100_2 \to \underbrace{01}_{1} \underbrace{01}_{1} \underbrace{01}_{1} \underbrace{00}_{0} = 1110_4. (1(64)+1(16)+1(4)=841(64) + 1(16) + 1(4) = 84).
  • Fractional part: Group the 20-bit binary cycle into 2-bit pairs:
    01⏟1    11⏟3    00⏟0    00⏟0    10⏟2    10⏟2    00⏟0    11⏟3    11⏟3    01⏟1  ⟹  1300220331‾4\underbrace{01}_{1} \;\; \underbrace{11}_{3} \;\; \underbrace{00}_{0} \;\; \underbrace{00}_{0} \;\; \underbrace{10}_{2} \;\; \underbrace{10}_{2} \;\; \underbrace{00}_{0} \;\; \underbrace{11}_{3} \;\; \underbrace{11}_{3} \;\; \underbrace{01}_{1} \implies \overline{1300220331}_4
  • Combined Result:
    314.215=1110.1300220331‾4≈1110.13004\mathbf{314.21_5 = 1110.\overline{1300220331}_4 \approx 1110.1300_4}

6.4 Decimal / Binary to Octal (b=8b=8)

  • Integer part: 10101002→001⏟1010⏟2100⏟4=12481010100_2 \to \underbrace{001}_{1} \underbrace{010}_{2} \underbrace{100}_{4} = 124_8. (1(64)+2(8)+4=841(64) + 2(8) + 4 = 84).
  • Fractional part (0.44100.44_{10}): Multiplications by 8 yield a 20-digit cycle:
    0.34121727024365605075‾80.\overline{34121727024365605075}_8
  • Combined Result:
    314.215=124.34121727024365605075‾8≈124.34128\mathbf{314.21_5 = 124.\overline{34121727024365605075}_8 \approx 124.3412_8}

6.5 Decimal / Binary to Hexadecimal (b=16b=16)

  • Integer part: 10101002→0101⏟50100⏟4=54161010100_2 \to \underbrace{0101}_{5} \underbrace{0100}_{4} = 54_{16}. (5(16)+4=845(16) + 4 = 84).
  • Fractional part: Group the 20-bit binary cycle into 4-bit nibbles:
    0111⏟7    0000⏟0    1010⏟A    0011⏟3    1101⏟D  ⟹  70A3D‾16\underbrace{0111}_{7} \;\; \underbrace{0000}_{0} \;\; \underbrace{1010}_{\text{A}} \;\; \underbrace{0011}_{3} \;\; \underbrace{1101}_{\text{D}} \implies \overline{70\text{A}3\text{D}}_{16}
    Analytic Verification:
    7(164)+0(163)+10(162)+3(161)+13(160)165−1=458752+0+2560+48+131048575=4613731048575=1125=0.4410✓\frac{7(16^4) + 0(16^3) + 10(16^2) + 3(16^1) + 13(16^0)}{16^5 - 1} = \frac{458752 + 0 + 2560 + 48 + 13}{1048575} = \frac{461373}{1048575} = \frac{11}{25} = 0.44_{10} \quad \checkmark
  • Combined Result:
    314.215=54.70A3D‾16≈54.70A3D16\mathbf{314.21_5 = 54.\overline{70\text{A}3\text{D}}_{16} \approx 54.70\text{A}3\text{D}_{16}}

◇Key Takeaways & Exam Strategy

  1. Power-of-Two Fast Paths:

    • Always route through Binary when converting among Quaternary (222^2), Octal (232^3), and Hexadecimal (242^4). This eliminates complex polynomial arithmetic and division.
    • Always group outwards from the radix point: pad with zeros to the left for integer components and to the right for fractional components.
  2. Rational Fraction Termination vs. Periodicity:

    • A fraction in base 10 terminates in base bb if and only if all prime factors of the fraction's reduced denominator divide bb.
    • Fractions with denominator 4,8,16,1284, 8, 16, 128 (2k2^k) terminate in binary, quaternary, octal, and hexadecimal, but form recurring fractions in Base-5.
    • Fractions with denominator 2525 (525^2) terminate in Base-5, but form recurring fractions in binary, octal, and hexadecimal.
  3. Validation Checksum:

    • Always verify the integer value via standard Horner's rule or positional expansion: ∑dibi\sum d_i b^i.

◇References & Navigation