ICSOC-8.21.2 Multi-Base Number Arithmetic and Base-Radix Puzzles (M)

🎓
Student Learning Profile
Module: 8.21.2 Multi-Base Number Arithmetic and Base-Radix Puzzles (ICSOC)
Score: 0/150 XPInitiate
Easy

ICSOC-8.21.2.1 Mixed-Radix Arithmetic and Multi-Base Algebraic Equations

Mixed-Radix Arithmetic and Multi-Base Algebraic Equations

In positional numeral systems, numbers are expressed as polynomial expansions of powers of their base radix. When evaluating mixed-radix equations that integrate binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16), solving directly in disparate radices introduces unnecessary cognitive load. The most robust Olympiad technique involves either converting all operands to a common baseline, typically decimal, or leveraging direct power-of-two groupings where every octal digit corresponds to exactly 3 binary bits and every hexadecimal digit maps to 4 binary bits.

Mastering multi-base arithmetic requires rapid inter-conversion without intermediate decimal expansion whenever powers of two align. For instance, evaluating an expression like (11010111)2 + (75)8 – (2F)16 can be streamlined by grouping bits or aligning terms to hexadecimal: (D7)16 + (3D)16 – (2F)16 = (E5)16 = (229)10. Rigorous attention to carry propagation and place-value weighting prevents arithmetic errors when operating across mixed radices under competitive time constraints.

Easy
What is the value of the mixed-radix arithmetic expression (1011)2 + (17)8 + (A)16 expressed as a standard decimal (base 10) integer?
Question diagram
💡 Hint
Convert each term into decimal by computing the place values for binary, octal, and hexadecimal before adding.

Convert each term to base 10: The binary number (1011)2 equals 1*8 + 0*4 + 1*2 + 1*1 = 11. The octal number (17)8 equals 1*8 + 7*1 = 15. The hexadecimal number (A)16 represents 10. Adding these decimal values yields 11 + 15 + 10 = 36. The value 38 occurs if (17)8 is incorrectly treated as decimal 17. The value 34 results from evaluating (1011)2 as 9 by dropping the first bit. The value 42 occurs if the hexadecimal digit A is mistakenly interpreted as 16.

Medium
Consider the mixed-radix equation: (111010)2 + X = (7B)16 – (52)8. What is the value of X expressed in octal (base 8)?
Question diagram
💡 Hint
Convert all known values into decimal to solve for X, then convert the resulting integer into base 8.

First, convert each component to decimal: (111010)2 = 32 + 16 + 8 + 2 = 58. For the right side, (7B)16 = 7*16 + 11 = 112 + 11 = 123, and (52)8 = 5*8 + 2 = 42. Thus the right side is 123 – 42 = 81. The equation becomes 58 + X = 81, which gives X = 81 – 58 = 25 in decimal. Converting decimal 25 to octal: 25 divided by 8 gives quotient 3 with remainder 1, yielding (31)8. The value 25 is the decimal result left unconverted to octal. The value 37 corresponds to decimal 31 converted to octal. The value 43 arises from subtracting 42 from 58 instead of subtracting from 81.

Tricky
Evaluate the expression [(2E)16 * (11)2] – [(132)8 / (110)2] and express the final result in hexadecimal (base 16).
Question diagram
💡 Hint
Evaluate the multiplication and division terms separately in decimal before subtracting and converting to base 16.

Converting terms to decimal: (2E)16 = 2*16 + 14 = 46. The multiplier (11)2 = 2 + 1 = 3. Their product is 46 * 3 = 138. For the second part, (132)8 = 1*64 + 3*8 + 2*1 = 90. The divisor (110)2 = 4 + 2 = 6. Dividing gives 90 / 6 = 15. Subtracting yields 138 – 15 = 123 in decimal. Converting 123 to hexadecimal: 123 = 7 * 16 + 11, where 11 corresponds to hexadecimal digit B, giving (7B)16. The value 8A results from adding 15 instead of subtracting. The value 6F occurs if (132)8 is incorrectly evaluated as 106. The value 75 corresponds to decimal 117 converted to hexadecimal.

Medium

ICSOC-8.21.2.2 Polynomial Radix Expansion and Unknown Base Determination

Polynomial Radix Expansion and Unknown Base Determination

Positional numeral notation is fundamentally defined by polynomial expansion, where an n-digit integer in base b represents the numerical value formed by summing each digit multiplied by b raised to its positional power. When confronted with an Olympiad puzzle where the base radix b is unknown, the expression can be reformulated into an algebraic polynomial equation in terms of b. Solving for b requires finding the positive integer roots that satisfy the equation while strictly observing the fundamental radix constraint: every digit appearing in a numeral must be strictly less than the base itself (b > max digit).

For higher-order polynomial base equations, factoring, quadratic formula evaluation, and synthetic division provide systematic pathways to isolate integer solutions. Olympiad challenges frequently introduce spurious algebraic solutions, such as fractional roots, negative values, or integers smaller than the highest digit present in the problem statement. A dry run verifying both the algebraic equivalence and digit-validity guarantees unambiguous identification of the true base radix.

Easy
If the numeral (24)b is equal to decimal 20, what is the value of the unknown radix base b?
Question diagram
💡 Hint
Expand (24)b as 2*b + 4 and solve the linear equation set equal to 20.

Expanding (24)b using positional weights yields 2*b^1 + 4*b^0 = 2*b + 4. Setting this equal to decimal 20 gives 2*b + 4 = 20. Subtracting 4 gives 2*b = 16, so b = 8. Since both digits 2 and 4 are strictly less than 8, base 8 is fully valid. A base of 6 gives 2*6 + 4 = 16. A base of 7 gives 2*7 + 4 = 18. A base of 9 gives 2*9 + 4 = 22.

Medium
Find the value of the positive integer base b that satisfies the equation (132)b = (72)10.
Question diagram
💡 Hint
Write (132)b as a quadratic equation in terms of b, set it equal to 72, and solve for the positive root.

Expanding (132)b in powers of b gives 1*b^2 + 3*b + 2 = 72. Rearranging into standard quadratic form gives b^2 + 3*b – 70 = 0. Factoring this quadratic equation yields (b + 10)*(b – 7) = 0. The solutions are b = 7 and b = -10. Since a base radix must be a positive integer strictly greater than the maximum digit present (which is 3), b = 7 is the unique valid base. A base of 8 yields 1*64 + 3*8 + 2 = 90. A base of 6 yields 1*36 + 3*6 + 2 = 56. A base of 10 gives 132.

Tricky
In a certain number base b, the arithmetic identity (15)b * (15)b = (251)b holds true. Determine the base b, and explain why the second algebraic root is rejected.
Question diagram
💡 Hint
Expand both sides into polynomials in b, form a quadratic equation, and find the positive integer root.

Expanding both sides in base b: (15)b = b + 5, so the square on the left is (b + 5)^2 = b^2 + 10*b + 25. The right side expands as (251)b = 2*b^2 + 5*b + 1. Setting them equal gives 2*b^2 + 5*b + 1 = b^2 + 10*b + 25, which simplifies to b^2 – 5*b – 24 = 0. Factoring gives (b – 8)*(b + 3) = 0, yielding roots b = 8 and b = -3. Because a base radix represents a positive integer counting scale with b > 5, the negative root b = -3 is extraneous, leaving b = 8 as the unique valid base. Checking in decimal confirms (15)8 = 13, 13^2 = 169, and (251)8 = 2*64 + 40 + 1 = 169. Base 6 gives (15)6 = 11 and 11^2 = 121, not matching 251. Base 7 gives a non-zero discriminant. Base 9 incorrectly cites b = 3 as a root instead of b = -3.

Tricky

ICSOC-8.21.2.3 Two’s Complement Representation, Overflow Detection, and Truncation

Two's Complement Representation, Overflow Detection, and Truncation

In fixed-width binary computing architectures, signed integers are represented using two’s complement notation, which provides a unique zero representation and enables identical adder circuitry for both addition and subtraction. In an n-bit two’s complement system, the most significant bit (MSB) acts as a sign bit with a negative positional weight of -2^(n-1), establishing the representable range as [-2^(n-1), 2^(n-1) – 1]. An arithmetic overflow occurs when the sum of two operands with matching signs yields a result with an opposite sign, indicating that the true mathematical result exceeds the representational boundaries of the fixed register.

Hardware architectures detect two’s complement overflow by comparing the carry-in into the sign bit with the carry-out from the sign bit: overflow is signaled if and only if these two carry bits disagree (Carry-in XOR Carry-out = 1). When arithmetic results or bit shifts exceed the designated word width, hardware registers truncate higher-order bits, effectively computing the mathematical result modulo 2^n. Navigating Olympiad edge cases demands tracking exact bit lengths, sign extensions during bit widening, and modular roll-overs during continuous accumulation.

Easy
What is the decimal equivalent of the 8-bit signed two’s complement binary number 11110110?
Question diagram
💡 Hint
Since the sign bit is 1, either invert the bits and add 1 to find the magnitude, or calculate -128 plus the remaining positive bit values.

In an 8-bit signed two’s complement system, the most significant bit has a weight of -128. Here the bit pattern is 11110110, which evaluates to -128 + 64 + 32 + 16 + 0 + 4 + 2 + 0 = -128 + 118 = -10. Alternatively, inverting the bits gives 00001001 (9) and adding 1 gives 00001010 (10), so the value is -10. The value 246 represents the unsigned binary interpretation of the byte. The value -246 mistakenly negates the unsigned interpretation directly. The value -9 occurs if one forgets to add 1 during the two’s complement inversion procedure.

Medium
In an 8-bit signed two’s complement system, two positive numbers A = +85 and B = +60 are added together. What is the resulting 8-bit register bit pattern, and what decimal value does it represent due to arithmetic overflow?
Question diagram
💡 Hint
Add +85 and +60 in binary, notice that the sum exceeds +127, and interpret the resulting 8-bit pattern with MSB as -128.

In 8-bit binary, +85 is 01010101 and +60 is 00111100. Adding these gives 01010101 + 00111100 = 10010001. In an 8-bit signed two’s complement format, the maximum positive integer is +127. Because the true sum 145 exceeds 127, overflow occurs: two positive numbers produced an MSB sign bit of 1. Interpreting 10010001 as signed two’s complement gives -128 + 16 + 1 = -111. The value +145 ignores the sign bit entirely and treats the register as unsigned. The value +73 results from incorrectly dropping the MSB without recognizing overflow. The value -17 corresponds to an arithmetic calculation error during two’s complement negation.

Tricky
A 6-bit accumulator register uses signed two’s complement representation. The register currently holds the value -28. An algorithmic instruction subtracts the value +12 from this register. If the hardware truncates all bits beyond 6 bits, what is the final decimal value stored in the register, and did arithmetic underflow occur?
Question diagram
💡 Hint
Determine the valid representable range for a 6-bit signed integer [-2^5 to 2^5 – 1] and compute (-28 – 12) modulo 64.

In a 6-bit signed two’s complement register, the range of representable integers is from -2^5 to 2^5 – 1, which is -32 to +31. The arithmetic operation is -28 – (+12) = -40. Because -40 is strictly less than the minimum allowable value of -32, arithmetic underflow occurs. In binary, -28 in 6-bit two’s complement is 100100. Subtracting +12 (001100) is equivalent to adding -12 (110100): 100100 + 110100 = 1011000. Truncating to 6 bits discards the 7th bit, leaving 011000. In 6-bit signed notation, 011000 represents 16 + 8 = +24. Storing -40 is impossible because 6 bits cannot hold -40. The value -8 corresponds to adding 12 instead of subtracting 12. The value +8 is an off-by-one bit calculation error.

Medium

ICSOC-8.21.2.4 Bitwise Logic Operators, Bitmasking, and Register Shifts

Bitwise Logic Operators, Bitmasking, and Register Shifts

Bitwise operators manipulate data directly at the binary register level, evaluating operations parallelly across each bit position. The fundamental bitwise operations—AND (&), OR (|), XOR (^), and NOT (~)—serve as essential primitives for state masking, bit extraction, and toggling. Specifically, bitwise AND is used to isolate or clear designated bitfields using masks, bitwise OR sets specific bits without altering adjacent flags, and bitwise XOR flips bits or detects discrepancies, exhibiting the unique algebraic property that X ^ X = 0 and X ^ 0 = X.

Logical and arithmetic bit-shifting operations provide ultra-fast multiplication and division by powers of two. A logical left shift (<< k) shifts bits leftward by k positions, filling empty least-significant positions with zeros and multiplying unsigned values by 2^k modulo register width. In contrast, right-shifting branches into logical right shift (>>>), which pads zeros at the MSB, and arithmetic right shift (>>), which preserves the sign bit through sign extension, ensuring correct floored division of negative signed integers. Olympiad challenges evaluate compound bitwise expressions combining shifts and masks to solve algorithmic puzzles with minimal computational overhead.

Easy
What is the result of evaluating the bitwise expression (45 & 27) in decimal?
Question diagram
💡 Hint
Convert 45 and 27 to 6-bit binary, perform bitwise AND on each column, and convert the result back to decimal.

Convert both numbers to binary: 45 is 32 + 8 + 4 + 1 = 101101 in binary, and 27 is 16 + 8 + 2 + 1 = 011011 in binary. Performing bitwise AND (&) compares corresponding bits: column 32 is 1 AND 0 = 0; column 16 is 0 AND 1 = 0; column 8 is 1 AND 1 = 1; column 4 is 1 AND 0 = 0; column 2 is 0 AND 1 = 0; column 1 is 1 AND 1 = 1. The resulting bit pattern is 001001 in binary. Converting 001001 back to decimal yields 8 + 1 = 9. The value 63 is the result of bitwise OR (45 | 27 = 111111). The value 54 is the result of bitwise XOR (45 ^ 27 = 110110). The value 18 is double the correct result due to an incorrect bit shift.

Medium
Given an 8-bit variable V = 0xB4, an algorithm computes the expression: Result = (V >> 2) ^ (V & 0x0F). What is the final value of Result in hexadecimal?
Question diagram
💡 Hint
Convert 0xB4 to binary, perform logical right shift by 2, isolate the low nibble with & 0x0F, and then perform bitwise XOR.

Convert 0xB4 to binary: 0xB4 = 10110100. First sub-expression: V >> 2 shifts 10110100 right by 2 bit positions, giving 00101101 (which is 0x2D). Second sub-expression: V & 0x0F isolates the lowest 4 bits: 10110100 & 00001111 = 00000100 (which is 0x04). Now, perform bitwise XOR between 00101101 and 00000100: 00101101 ^ 00000100 = 00101001. In hexadecimal, 0010 is 2 and 1001 is 9, so the final value is 0x29. The value 0x2D is the un-XORed result of the shift operation alone. The value 0x34 results from mistakenly ORing the terms. The value 0x1B results from shifting by 3 instead of 2.

Tricky
Which single bitwise C-style expression will determine whether a positive integer N is a non-zero exact power of two, returning True (or non-zero) if and only if N = 2^k for integer k >= 0?
Question diagram
💡 Hint
Recall that a power of two in binary has exactly one bit set to 1, while N – 1 has all lower bits flipped to 1 and that bit cleared to 0.

In binary, any positive power of two N has exactly one bit set to 1 followed entirely by zeros (for example, 8 is 1000). Subtracting 1 flips all the trailing zeros to ones and turns the single 1 bit into 0 (for example, 7 is 0111). Performing bitwise AND between N and N – 1 produces 1000 & 0111 = 0000. For any integer with more than one bit set to 1, N & (N – 1) will leave the higher bits intact and yield a non-zero value. Thus, (N > 0) && ((N & (N – 1)) == 0) uniquely identifies powers of two. The expression with bitwise OR produces 2*N – 1 rather than N. The expression with XOR equals 2*N – 1 for powers of two, not 1 (for N = 8, 8 ^ 7 = 15). The expression (N & (N + 1)) == 0 tests whether N is of the form 2^k – 1 (such as 7 or 15), not a power of two.

Tricky

ICSOC-8.21.2.5 Fractional Radix Transformation, Radix Points, and Recurring Periods

Fractional Radix Transformation, Radix Points, and Recurring Periods

Positional fractional notation extends the radix polynomial to negative exponents, where digits to the right of the radix point represent values weighted by b^(-1), b^(-2), b^(-3), and so forth. Converting a decimal fraction to an alternate base b employs iterative multiplication by b, where the integer portion of each product yields the successive fractional digits, and the fractional remainder is recycled into subsequent iterations. A fraction terminates in base b if and only if its fully reduced denominator contains prime factors that are exclusively prime factors of the base radix b.

When a denominator contains prime factors coprime to base b, the fraction produces an infinitely recurring sequence of digits in that radix. For example, the decimal fraction 0.1 (1/10) cannot terminate in binary because 10 = 2 * 5 and 5 is coprime to base 2; it produces the non-terminating periodic binary fraction 0.00110011…2 with recurring period 0011. Olympiad questions test student precision in calculating recurring period lengths, converting repeating multi-base fractions back to rational p/q forms using geometric series summation, and analyzing floating-point representation approximations.

Easy
What is the decimal equivalent of the binary fraction (0.1101)2?
Question diagram
💡 Hint
Sum the negative powers of two corresponding to the set bit positions: 1/2 + 1/4 + 1/16.

In binary fraction notation, place values after the radix point represent negative powers of two: 2^(-1) = 0.5, 2^(-2) = 0.25, 2^(-3) = 0.125, and 2^(-4) = 0.0625. For (0.1101)2, the value is 1*(0.5) + 1*(0.25) + 0*(0.125) + 1*(0.0625) = 0.5 + 0.25 + 0.0625 = 0.8125. The value 0.6875 corresponds to (0.1011)2. The value 0.7500 corresponds to (0.11)2, omitting the final bit. The value 0.8750 corresponds to (0.1110)2.

Medium
Convert the recurring binary fraction (0.010101…)2 where the block ’01’ repeats infinitely, into its equivalent fully reduced decimal fraction p/q.
Question diagram
💡 Hint
Let S = 0.010101… in base 2. Multiply S by 2^2 = 4 to shift the repeating block by two places and subtract S.

Let S = (0.010101…)2. Multiplying S by 2^2 = 4 shifts the binary radix point two places to the right: 4*S = (1.010101…)2 = 1 + S. Subtracting S from both sides gives 3*S = 1, so S = 1/3. Alternatively, expressing S as an infinite geometric series: the first term is 2^(-2) = 1/4, and the common ratio between recurring blocks is 2^(-2) = 1/4. Using the sum of an infinite geometric progression a / (1 – r) gives (1/4) / (1 – 1/4) = (1/4) / (3/4) = 1/3. The fraction 1/5 in binary has a 4-bit recurring period (0.00110011…). The fraction 2/5 equals 0.01100110… in binary. The fraction 1/6 equals half of 1/3, which is (0.00101010…)2.

Tricky
Why can the exact decimal fraction 0.2 (which is 1/5) never terminate in standard binary representation, and what is its recurring binary sequence?
Question diagram
💡 Hint
Recall the mathematical condition for a fraction to terminate in base b: the prime factors of the reduced denominator must divide the base b.

A rational fraction in simplest form p/q terminates in base b if and only if every prime factor of the denominator q divides base b. For the decimal fraction 0.2 = 1/5, the reduced denominator is 5. Because 5 is a prime number that does not divide base 2, it is impossible for 1/5 to terminate in binary. Converting by successive multiplication: 0.2 * 2 = 0.4 (digit 0); 0.4 * 2 = 0.8 (digit 0); 0.8 * 2 = 1.6 (digit 1); 0.6 * 2 = 1.2 (digit 1); 0.2 * 2 = 0.4 (cycle repeats). This produces the infinite periodic sequence 0.00110011…2 with repeating period 0011. Stating that odd denominators terminate is false since non-powers of two cannot terminate in binary. Base 2 can represent arbitrarily small numbers using negative powers. Prime denominators do not terminate; they generate recurring sequences.