GATE Computer ScienceHardGATE CSE · UGC NET
Two 4-bit two's complement numbers are added and the result is kept in 4 bits. For how many of the 256 ordered operand pairs does signed overflow occur?
- A. 48
- B. 64
- C. 80
- D. 96
Correct answer: B. 64
Overflow occurs when the true sum is above 7 or below −8; counting the pairs for each case and adding gives 64.
More Digital Logic questions
- A 6-bit Johnson counter Q0…Q5 starts at 000000 and shifts right on each clock, feeding the complement of Q5 into Q0. What is Q0Q1Q2Q3Q4Q5…
- A 4-bit shift register shifts left each clock (Q3 is discarded), and the new LSB is Q3 ⊕ Q1. Starting from 0001, after how many clock…
- What is the minimum number of 2-input NAND gates needed to realise a 2-input XOR gate (no other gate types, complemented inputs not…
- A Mealy machine detects the sequence 1011 with overlap allowed and outputs 1 when the last four inputs are 1011. For the input stream…
- A 3-bit synchronous machine Q2Q1Q0 uses D flip-flops with D2 = Q1, D1 = Q0 and D0 = (Q2 ⊕ Q1)′. Starting from 001, how many distinct…
- A 5-input function F(A,B,C,D,E) is 1 exactly when the unsigned number ABCDE (A is the MSB, 0 counts as divisible) is divisible by 3 or by…