Question

Suppose a computer uses 4-bit one’s complement representation. Ignoring overflows, what value will be stored in...

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

Homework Answers

Answer #1

Solution:

  • The below tables shows the each and every value of j along with the binary values.
  • Also, it shows the value of k for each value of j and its binary representation.
  • The table shows for each value of j from 0 to 12, what is the value of k is.

The table for the values of each iteration is provided below:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT