GATE Computer ScienceModerateGATE CSE · UGC NET
An 8-bit processor adds 0x7F and 0x01 as two's-complement numbers. Which flag setting results?
- A. Result 0x80 with N = 1, Z = 0, C = 1, V = 0
- B. Result 0x80 with N = 1, Z = 0, C = 0, V = 1
- C. Result 0x80 with N = 0, Z = 0, C = 0, V = 1
- D. Result 0x00 with N = 0, Z = 1, C = 1, V = 0
Correct answer: B. Result 0x80 with N = 1, Z = 0, C = 0, V = 1
127 + 1 = 128 does not fit in signed 8 bits, so the result 0x80 reads as −128 (N = 1) and signed overflow V = 1; there is no carry out of bit 7, so C = 0.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A system has 32-bit virtual addresses, 4 KB pages and 4-byte page-table entries with a single-level page table. What is the size of one…
- What is the IEEE 754 single-precision hexadecimal representation of −6.5?
- A two-level cache has an L1 hit time of 1 ns, an L1 miss rate of 10%, an L2 hit time of 6 ns, an L2 local miss rate of 20% and a…
- A 1 GHz processor polls a device 100 times per second, and each poll costs 400 clock cycles. What fraction of the processor time is spent…
- How many check bits does a SEC-DED (single-error-correcting, double-error-detecting) extended Hamming code need for 32 data bits?
- A direct-mapped cache has 8 one-word lines (line = address mod 8) and starts empty. The word addresses 0, 1, 2, 3, 0, 8, 1, 9, 0, 8, 2…