GATE Computer ScienceVery hardGATE CSE
Two 8-bit two's-complement numbers a and b are added with an 8-bit adder. For how many ordered pairs (a, b), where a and b each range over all 256 values, does signed overflow occur?
- A. 8128
- B. 16129
- C. 16512
- D. 16384
Correct answer: D. 16384
Positive overflow needs a+b ≥ 128 and negative overflow needs a+b ≤ −129; the counts are 8128 and 8256 respectively (the negative range is one value larger), so 16384 pairs in total.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- How many distinct 32-bit patterns represent a NaN (quiet or signalling, either sign) in IEEE 754 single precision?
- Memory has 8 low-order interleaved banks; a bank is busy for 6 clock cycles after starting an access, and at most one new access can be…
- A 64-bit virtual address space uses 8 KB pages and 8-byte page-table entries, and every page-table level occupies exactly one page. What…
- A TLB access takes 5 ns, a main-memory access 80 ns, and the TLB hit ratio is 95%. On a TLB miss, a two-level page table walk needs two…
- A disk transfers data at 12 MB/s into memory using DMA in 4-byte words. Each word transfer steals 3 bus cycles of 20 ns from the CPU…
- A microprogrammed control unit has five fields of mutually exclusive control signals containing 5, 9, 3, 12 and 7 signals respectively…