GATE Computer ScienceVery hardGATE CS (PYQ pattern)
For how many of the 256 ordered pairs of 4-bit two's complement numbers (a, b) does the exact product a·b fit in a 4-bit two's complement number (range −8 to 7)?
- A. 100
- B. 128
- C. 64
- D. 101
Correct answer: D. 101
Enumerating all 256 pairs and testing −8 ≤ a·b ≤ 7 gives 101 pairs. Pairs with 0 always fit, while pairs such as 3 × 3 = 9 or (−8) × (−1) = 8 do not.
More Digital Logic questions
- 0.1 stored in IEEE 754 single precision (round to nearest) has the bit pattern 0x3DCCCCCD. Relative to the exact value 0.1, the stored…
- What is the IEEE 754 single-precision bit pattern of the value nearest to −1/3 (round to nearest)?
- Which of the following are true in IEEE 754 arithmetic (using the language operators ==, != and the usual semantics)? Let nan be a NaN and…
- An 8-bit floating-point format has 1 sign bit, 5 exponent bits (bias 15) and 2 fraction bits, with IEEE-style denormals and exponent field…
- An 8-bit floating-point format has 1 sign bit, 5 exponent bits (bias 15) and 2 fraction bits, with IEEE 754-style normalised numbers. How…
- A signed Q4.4 fixed-point format stores x as the integer round(16x) in 8 bits. Two values A = −1.4375 (integer −23) and B = 0.4375…