Given that a computer uses 4-bit ones’s complement numbers, what value will be stored in the variable j after the following code segment terminates?  j = 1 k = -2 while(k != 0) {             j = j + 1;             k = k + 1; }

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter8: Data And Network Communication Technology
Section: Chapter Questions
Problem 41VE
icon
Related questions
Question
  1. Given that a computer uses 4-bit ones’s complement numbers, what value will be stored in the variable j after the following code segment terminates? 

j = 1

k = -2

while(k != 0) {

            j = j + 1;

            k = k + 1;

}

Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning