Question: Problem 2 (25 points) First describe an algorithm that converts a decimal number to a binary number in two's complement of given bits; the algorithm

 Problem 2 (25 points) First describe an algorithm that converts a

Problem 2 (25 points) First describe an algorithm that converts a decimal number to a binary number in two's complement of given bits; the algorithm needs to be able to detect overflow (i.e., when the given number can not be represented correctly). Then convert the following decimal numbers into (a) 8-bit, b) 16 bit, and (c) 32-bit two's complement binary numbers. State "overflow" if a number cannot be represented correctly 170e 2) 83 ten 3) 85 ten 4) -128 ter 5) -2,000 ten Problem 3 (15 points) What decimal number does each of the following two's complement binary number represent respectively? Briefly explain 2) 11110110 1 ) 011 100 1 o two

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!