|Question # 40007||Physics||5 months ago|
CIS365 - Homework 2 DLD
Instructions: If any questions require calculations, you must show them to receive full credit. Simply writing the answer in such cases will not suffice. You are permitted to discuss the following questions with others in the class. However, you must write up your own solutions to these questions. Submission instructions: Submit a hardcopy before start of class Late assignments will not be accepted.
1. Convert the decimal number−19575 to a 15-bit 2’s complement binary number. What happens when you perform this conversion? After the conversion is complete, what values (base 2 and base 10) does the computer think it has?
2. What are the 16-bit 1’s and 2’s complements of the following binary numbers? a. 100002 b. 1001111000010012 c. 11001110001001002
3. Calculate the decimal value of the above 16-bit numbers when using a. Signed representation b. Unsigned representation
4. Consider the following set of operations. For each pair of numbers, compute the flags for every operation. You must show your calculations to receive full credit (computing the signed & unsigned value of each number, the arithmetic operation and why the flag is 0 or 1). The operations are independent of each other, i.e. use the given values of A and B for every operation. A B A + B A - B B – A A + A B + B Carry Overflow Carry Carry Carry Overflow Carry Overflow Carry Overflow 4F09 D3A5 FA 2F
5. Convert the following decimal numbers to 8–bit normalized floating point format. Assume a bias of 3 and the following bit allocations for the sign, exponent and significand: a. -0.1453 b. 0.267 c. 0.1
Sign Exponent Significand
6. Convert the following floating point numbers to decimal representation:
(a) Sign 1 1 1 1 0 0 1 0
(b) Sign 1 1 1 0 1 0 1 0
(c ) Sign 0 0 1 0 0 1 0 1
(d) Sign 0 1 1 1 0