Skip to content

Challenge Problems: Number Systems

These challenge problems test deeper understanding. Only final answers are provided — work through each problem on your own.


Challenge 1: Multi-Base Conversion Chain

A number is written as \(2A3_{16}\). Convert it to base 10, then to base 5, then express the base-5 result in octal.

Show Answer

\(2A3_{16} = 675_{10} = 10200_{5} = 1243_{8}\)


Challenge 2: Two's Complement Arithmetic with Overflow Detection

Using 8-bit two's complement representation, compute \((-95) + (-48)\). Determine whether overflow occurs, and give the 8-bit binary result and its decimal interpretation.

Show Answer

\(-95_{10} = 10100001_2\), \(-48_{10} = 11010000_2\)

Sum: \(10100001 + 11010000 = 01110001_2\)

Overflow does occur (two negative operands produce a positive result). The 8-bit result is \(01110001_2 = +113_{10}\), which is incorrect due to overflow. The mathematically correct answer \(-143\) is outside the 8-bit two's complement range \([-128, +127]\).


Challenge 3: Fixed-Point Representation

A fixed-point format uses 12 bits total: 1 sign bit, 6 integer bits, and 5 fractional bits (two's complement). What is the decimal value of the bit pattern \(110100.11010_2\)? Also state the range and resolution of this format.

Show Answer

Value: The sign bit is 1, so the number is negative. Taking the two's complement of \(110100.11010\):

\(110100.11010 \rightarrow 001011.00110_2 = 11.1875_{10}\)

So the value is \(-11.1875_{10}\).

Range: \(-32.00000\) to \(+31.96875\) (i.e., \(-2^5\) to \(2^5 - 2^{-5}\))

Resolution: \(2^{-5} = 0.03125\)


Challenge 4: Mixed-Radix Subtraction

Compute \(4B2_{16} - 1101101_2\) directly by converting both to decimal, performing the subtraction, and expressing the result in both octal and hexadecimal.

Show Answer

\(4B2_{16} = 1202_{10}\)

\(1101101_2 = 109_{10}\)

\(1202 - 109 = 1093_{10}\)

\(1093_{10} = 2105_8 = 445_{16}\)


Challenge 5: BCD Arithmetic

Perform the following addition using BCD (Binary-Coded Decimal) arithmetic: \(879 + 586\). Show the final BCD result and verify it by converting back to decimal.

Show Answer

Digit-by-digit BCD addition:

  • Units: \(1001 + 0110 = 1111_2 = 15 > 9\), add \(0110\) correction: \(1111 + 0110 = 10101\), write \(0101\), carry 1
  • Tens: \(0111 + 1000 + 0001_{carry} = 10000_2 = 16 > 9\), add \(0110\) correction: \(10000 + 0110 = 10110\), write \(0110\), carry 1
  • Hundreds: \(1000 + 0101 + 0001_{carry} = 1110_2 = 14 > 9\), add \(0110\) correction: \(1110 + 0110 = 10100\), write \(0100\), carry 1

BCD result: \(0001\ 0100\ 0110\ 0101_{BCD} = 1465_{10}\)
Verification: \(879 + 586 = 1465\)


Challenge 6: Sign Extension and Arithmetic

A 6-bit two's complement number $101101_2$ needs to be sign-extended to 12 bits. Write the 12-bit result, then add it to the 12-bit two's complement representation of $+45_{10}$. Does overflow occur?

Show Answer

6-bit \(101101_2\): sign bit is 1 (negative). Value: \(-19_{10}\).

Sign-extended to 12 bits: \(111111101101_2\)

\(+45_{10} = 000000101101_2\)

Sum: \(111111101101 + 000000101101 = 000000011010_2 = +26_{10}\)

No overflow. Both carry into and carry out of the sign bit position are 1, so they match. Result \(-19 + 45 = +26\) is correct.


Challenge 7: Fractional Base Conversion

Convert the decimal number $27.6875_{10}$ to binary, then to hexadecimal. Verify your answer by converting the hexadecimal result back to decimal.

Show Answer

Integer part: \(27_{10} = 11011_2\)

Fractional part: \(0.6875 \times 2 = 1.375 \to 1\); \(0.375 \times 2 = 0.75 \to 0\); \(0.75 \times 2 = 1.5 \to 1\); \(0.5 \times 2 = 1.0 \to 1\)

Binary: \(11011.1011_2\)

Group into nibbles: \(0001\ 1011.1011_2 = 1B.B_{16}\)

Verify: \(1B.B_{16} = 1 \times 16 + 11 + 11/16 = 16 + 11 + 0.6875 = 27.6875_{10}\)


Challenge 8: Excess-3 Code

The Excess-3 code represents each decimal digit by adding 3 to its value before converting to 4-bit binary. Encode the decimal number $496$ in Excess-3, then show that the 9's complement of each digit is obtained by simply inverting all bits.

Show Answer

Excess-3 encoding: \(4+3=7 \to 0111\), \(9+3=12 \to 1100\), \(6+3=9 \to 1001\)

Excess-3 of 496: \(0111\ 1100\ 1001\)

Bit-invert: \(1000\ 0011\ 0110\)

Decode: \(8-3=5\), \(3-3=0\), \(6-3=3\)\(503\)

9's complement of 496 = \(999 - 496 = 503\) ✓. The self-complementing property works because \((d+3) + (9-d+3) = 15 = 1111_2\).