GATE Computer ScienceHardGATE CS (PYQ pattern)
Two packed-BCD bytes 0x47 and 0x38 are added with a binary adder. Which correction is needed and what is the correct BCD result?
- A. Binary sum 0x7F; no correction needed → 0x7F
- B. Binary sum 0x85; subtract 6 → 0x7F
- C. Binary sum 0x7F; add 6 to both digits → 0xE5
- D. Binary sum 0x7F; add 6 to the low digit → 0x85
Correct answer: D. Binary sum 0x7F; add 6 to the low digit → 0x85
47 + 38 = 85. The binary sum is 0x7F; the low digit F > 9 so add 6 (0x06) to get 0x85. The high digit 7 is valid, so it is left alone.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 4-way set uses tree pseudo-LRU with three bits: the root bit says which pair (ways 0-1 or 2-3) holds the next victim, and each pair bit…
- A program spends 70% of its time computing and 30% stalled on cache misses. A bigger cache cuts the stall time by 40% but lengthens the…
- A 4-way set holds blocks A, B, C, D in ways 0, 1, 2, 3; A is the least and D the most recently used. Tree pseudo-LRU uses three bits, all…
- A 16-bit unsigned integer (0..65535) is multiplied by a 16-bit two's-complement integer (−32768..32767). What is the minimum width of a…
- A loop computes y[i] += A[i][j] × x[j] for a 32×32 matrix of 4-byte floats (A in row-major order at address 0, x at 4096, y at 4224); for…
- A direct-mapped cache has a 1-cycle hit time, a 4% miss rate and a 40-cycle miss penalty on a 1.0 ns clock. A 2-way version also hits in 1…