Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose a computer uses 4-bit one's complement representation. Ignoring overflows, what value will be stored in the variable j after the following pseudocode routine terminates?

Suppose a computer uses 4-bit one's complement representation. Ignoring overflows, what value will be stored in the variable j after the following pseudocode routine terminates?

0 -> j // Store 0 in j 
-3 -> k // Store -3 in k 
while k  0 
 j = j + 1 

k = k - 1

Create a table showing the trace for j and k in decimal and binary. Remember that in one's complement addition, the last carry is added to the sum). Here are the first two lines of the table:

j (binary) k (binary)
0 0000 -3 1100
1 0001 -4 1011

Complete the table using whatever editor you prefer (hand drawn neatly is OK)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

1. What is logic data modeling trying to accomplish?

Answered: 1 week ago