GATE Computer ScienceHardGATE CS (PYQ pattern)
An 8-bit adder adds two 8-bit operands a and b with no carry-in, producing the carry-out C8 and the signed (two's complement) overflow flag V. Over all 2¹⁶ operand pairs, for how many is C8 = 1 while V = 0?
- A. 32640
- B. 16384
- C. 8128
- D. 24384
Correct answer: D. 24384
C8 = 1 for 32640 pairs. Overflow with carry-out 1 is the negative-overflow case (both operands negative, wrapped sum non-negative): 8256 pairs. So 32640 − 8256 = 24384.
More Digital Logic questions
- A 4-bit ALU computes A − B as A + B' + 1 and sets C (the adder's carry-out) and V (signed two's complement overflow). Over all 256 ordered…
- A 4-bit two's complement adder computes A + B + Cin. Over all 512 combinations of A, B (each −8 to 7) and Cin (0 or 1), for how many is…
- Over one complete cycle of 10 counts (back to the starting state), how many flip-flop toggles in total does (i) a synchronous 4-bit BCD…
- The 8-bit binary-reflected Gray code of x is g(x) = x XOR (x >> 1). For how many of the 256 values of x does g(x) contain exactly two 1…
- For 8-bit patterns a and b, how many ordered pairs satisfy a > b when both are read as signed two's complement numbers, but a < b when…
- A one-digit BCD adder adds digits a, b (0-9) and a carry-in c (0 or 1). Its 4-bit binary adder gives a carry K and sum Z8Z4Z2Z1, and the…