Question: First describe an algorithm that converts a decimal number to a binary number of given bits; the algorithm needs to be able to detect overflow
First describe an algorithm that converts a decimal number to a binary number of given bits; the algorithm needs to be able to detect overflow (i.e., when the given number can not be represented corrected). Then convert the following decimal numbers into (a) 8-bit, (b) 16-bit, and (c) 32-bit twos complement binary numbers. State overflow if a number can not be represented correctly. 
Problem 2 (25 points) First describe an algorithm that converts a decimal number to a binary number of given bits; the algorithm needs to be able to detect overflow (i.e., when the given number can not be represented corrected). 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 can not be represented correctly. 63 ten -128 ten. 2) 3) -2,000 ten
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
