Suppose a computer uses 4-bit one’s complement representation. Ignoring overflows, what value will be stored in the variable j after the following pseudo code routine terminates? (show details of all steps of the execution)
0 → j // store o in j
-3 → k // store -3 in k
while k ≠ 0
j = j + 1
k = k – 1
end while
Solution:
The table for the values of each iteration is provided below:
Get Answers For Free
Most questions answered within 1 hours.