How a machine stores numbers is the foundation of computer organization, and GATE keeps testing the same load-bearing ideas: two's complement and sign-magnitude, how wide a fixed-point or subtracted result has to be, converting between bases, the three fields of an IEEE 754 float, and why floating-point arithmetic loses precision. These questions are quick once the encodings are second nature, and slow if you try to reason them out from scratch in the exam. Every question here is a previous-year GATE problem, so attempt it before reading the explanation, then open its full worked solution in the Computer Architecture learn module; the complement and base-conversion topics also sit in the Digital Electronics module.
Two's complement, sign-magnitude and fixed-point ranges
Q1. In 16-bit two's complement, the decimal number −28 is (GATE 2019, see the full solution)
(a) 1111 1111 0001 1100
(b) 0000 0000 1110 0100
(c) 1111 1111 1110 0100
(d) 1000 0000 1110 0100
Answer: (c) 1111 1111 1110 0100.
Write +28 as 0000 0000 0001 1100, invert every bit to get 1111 1111 1110 0011, then add 1 to reach 1111 1111 1110 0100. Equivalently, take the 8-bit form of −28 (1110 0100) and sign-extend it with leading ones, which gives the same 16-bit pattern.
Q2. Zero has two representations in (GATE 1999, see the full solution)
(a) Sign-magnitude only
(b) Sign-magnitude and 1's complement
(c) Sign-magnitude and 2's complement
(d) Sign-magnitude, 1's complement and 2's complement
Answer: (b) Sign-magnitude and 1's complement.
Sign-magnitude has both +0 (000...0) and −0 (100...0), and 1's complement also has +0 (000...0) and −0 (111...1). Two's complement is the exception: negating 000...0 gives 000...0 again, so it has a single zero. Removing that duplicate zero is exactly why two's complement is the standard for integer hardware.
Q3. For Z = X − Y in sign-magnitude form, with X and Y each in n bits, Z needs a minimum of (GATE 2019, see the full solution)
(a) n bits
(b) n − 1 bits
(c) n + 1 bits
(d) n + 2 bits
Answer: (c) n + 1 bits.
An n-bit sign-magnitude number spends one bit on the sign, so its magnitude reaches at most 2^(n−1) − 1. The worst case is the largest positive minus the largest negative, which is 2 × (2^(n−1) − 1) = 2^n − 2, and a magnitude that large needs n bits, plus one more for the sign. So n + 1 bits are required to avoid overflow.
Q4. In an n-bit unsigned fixed-point number with f fraction bits and i = n − f, the range of values is (GATE 2017, see the full solution)
(a) 2^(−f) to 2^i
(b) 2^(−f) to (2^i − 2^(−f))
(c) 0 to 2^i
(d) 0 to (2^i − 2^(−f))
Answer: (d) 0 to (2^i − 2^(−f)).
All-zero bits give 0, the minimum. All-one bits give an integer part of 2^i − 1 and a fractional part of 1 − 2^(−f), which sum to 2^i − 2^(−f), the maximum. The step between consecutive values is 2^(−f), which is why the top of the range falls just short of 2^i.
Base conversion: octal, hexadecimal and other radices
Base conversion is the prerequisite for everything after it: an IEEE 754 question is a base-2 question with bookkeeping attached. GATE keeps setting the same two routes, octal arithmetic and an unusual radix taken to hexadecimal, and both are safest if you convert once through decimal rather than borrowing or grouping in the source base. For the wider conversion drill, radix equations and binary arithmetic included, work through Number System MCQs first.
Q5. In the equation (7526)₈ − (Y)₈ = (4364)₈, the value of Y is (GATE 2014, see the full solution)
(a) 1634
(b) 1737
(c) 3142
(d) 3162
Answer: (c) 3142.
Convert to decimal: (7526)₈ = 3926 and (4364)₈ = 2292, so Y = 3926 − 2292 = 1634 in decimal. Converting 1634 back to octal gives (3142)₈. Working in decimal and converting once at the end is safer than borrowing directly in base 8.
Q6. If a number is 210 in base 3, its hexadecimal representation is (GATE 2021, see the full solution)
(a) 15
(b) 21
(c) D2
(d) 528
Answer: (a) 15.
First convert to decimal: 2×9 + 1×3 + 0 = 21. Then convert 21 to hexadecimal: 21 = 1×16 + 5, which is (15)₁₆. Routing through decimal keeps unusual-base conversions straightforward.
Q7. (1217)₈ is equivalent to (GATE 2009, see the full solution)
(a) (1217)₁₆
(b) (028F)₁₆
(c) (2297)₁₀
(d) (0B17)₁₆
Answer: (b) (028F)₁₆.
(1217)₈ in decimal is 1×512 + 2×64 + 1×8 + 7 = 655. Converting 655 to hexadecimal by repeated division gives 28F, so the answer is (028F)₁₆, where the leading zero is just padding. A faster route is to expand each octal digit to 3 bits, regroup into nibbles, and read off hex.
IEEE 754 fields and floating-point precision
Q8. In IEEE 754 single precision (1 sign, 8 exponent, 23 mantissa bits), which pattern is the largest finite number? (GATE 2024, see the full solution)
(a) sign 0, exponent 0111 1111, mantissa all ones
(b) sign 0, exponent 1111 1110, mantissa all ones
(c) sign 0, exponent 1111 1111, mantissa all ones
(d) sign 0, exponent 0111 1111, mantissa all zeros
Answer: (b) exponent 1111 1110, mantissa all ones.
A normalized value is (−1)^sign × (1 + mantissa/2^23) × 2^(exponent − 127). Exponent 1111 1111 (255) with a nonzero mantissa is NaN, not a finite number, so it is excluded. The largest finite magnitude comes from the biggest usable exponent 1111 1110 (254) with an all-ones mantissa, giving about 3.4 × 10^38.
Q9. The decimal value 0.5 in IEEE single precision has (GATE 2012, see the full solution)
(a) fraction bits 000...000 and exponent value 0
(b) fraction bits 000...000 and exponent value −1
(c) fraction bits 100...000 and exponent value 0
(d) no exact representation
Answer: (b) fraction 000...000 and exponent −1.
Normalize 0.5 as 1.0 × 2^(−1), so the leading 1 is implicit and the stored fraction bits are all zero. The unbiased exponent is −1, which becomes 126 (01111110) after adding the bias of 127. The full pattern is 0 01111110 000...0, or 0x3F000000.
Q10. In IEEE floating point, the hexadecimal value 0x00000000 corresponds to (GATE 2008, see the full solution)
(a) the normalized value 2^(−127)
(b) the normalized value 2^(−126)
(c) the normalized value +0
(d) the special value +0
Answer: (d) the special value +0.
With the exponent field and mantissa both zero, the encoding is a signed zero, and here the sign bit is 0, so it is +0. It is called a special value, not a normalized one, because normalized numbers require a biased exponent between 1 and 254. An exponent field of 0 signals either zero or a subnormal number.
Q11. With A = 2.0×10^30, B = −2.0×10^30, C = 1.0, compute X (X := A + B, then X := X + C) and Y (Y := A + C, then Y := Y + B) in 32-bit floating point (GATE 2000, see the full solution)
(a) X = 1.0, Y = 1.0
(b) X = 1.0, Y = 0.0
(c) X = 0.0, Y = 1.0
(d) X = 0.0, Y = 0.0
Answer: (b) X = 1.0, Y = 0.0.
For X, A + B cancels to 0.0 exactly, and then 0.0 + 1.0 = 1.0. For Y, A + C tries to add 1.0 to 2.0×10^30, but 1.0 is far below the precision of the stored value and is simply lost, so Y stays at A; then Y + B = A − A = 0.0. This is the standard demonstration that floating-point addition is not associative.
Q12. Using three-significant-digit floating-point arithmetic with rounding, evaluate (113 + (−111)) + 7.51 and 113 + ((−111) + 7.51) (GATE 2004, see the full solution)
(a) 9.51 and 10.0 respectively
(b) 10.0 and 9.51 respectively
(c) 9.51 and 9.51 respectively
(d) 10.0 and 10.0 respectively
Answer: (a) 9.51 and 10.0.
Grouping the first way, 113 − 111 = 2.00 exactly, and 2.00 + 7.51 = 9.51. Grouping the second way, −111 + 7.51 = −103.49, which rounds to −103 at three significant digits, and 113 − 103 = 10.0. Same numbers, different order, different answer, which is precisely the precision-loss lesson from Q11.
How number representation is examined in GATE
Examiners return to three pillars: how signed and fixed-point values are encoded and how wide a result must be to hold them (Q1-Q4), base conversion (Q5-Q7), and IEEE 754 fields, normalization and precision loss (Q8-Q12). If the floating-point questions felt slow, commit the single-precision layout (1 + 8 + 23 bits, bias 127) and the normalized-value formula to memory; almost every float question falls out of those two facts.
Rebuild any weak spot in the Computer Architecture learn module before moving on to arithmetic circuits and the datapath. The full GATE computer-organization sequence sits inside GATE Guidance by Sanchit Sir, and the GATE CS category page shows where it fits in the syllabus. Solve, review the misses, and come back a week later to see which encodings stuck.




