Starting from:

$25

CS2208b Assignment 1 Solved


•      For this assignment, only electronic submission at owl.uwo.ca is required.

 

•      ONLY user Courier New (size = 11 pts.)

 

•      Start each question in a NEW PAGE

•      Write the question number in a separate line followed by an empty line

 

•      After finishing the assignment, you have to do the following:  

v Type your report and convert it to the PDF format (no handwriting), 

 

v Prepare a soft-copy submission

 

v Upload the soft-copy submission.

 

Failure to follow the above format may cost you 10% of the total assignment mark.

 

•      Late assignments are strongly discouraged o 10% will be deducted from a late assignment (up to 24 hours after the due date/time)  o After 24 hours from the due date/time, late assignments will receive a zero grade. 

Copyright © 2016 Mahmoud El-Sakka. 

You must show your work and/or reasoning when answering the following questions.

Solutions that do not show how an answer was obtained will receive a grade of ZERO.

QUESTION 1 (9 marks)
What are the decimal equivalents of the following unsigned integer values? a. 110011002

b.       110011003

c.       110011004

QUESTION 2 (9 marks)
a.       Convert the unsigned decimal number 1000010 into binary form.

b.       Convert the unsigned hexadecimal number FEDC.BA16 into octal form.

c.       Convert the unsigned octal number 12345.678 into hexadecimal form.

QUESTION 3 (9 marks)
For each of the following unsigned numbers, state the base in use; that is, what are the values of  s and t? a. 1001s = 1968410

b. 1011t = 493110

QUESTION 4 (10 marks)
a.       Convert the negative decimal number –987610 into binary two’s complement form.

b.       Convert the negative decimal number –98.7654310 into binary two’s complement forms with 10 binary fraction digits. If you will make any rounding, you have to clearly state which rounding method did you used to get your answer.

QUESTION 5 (9 marks)
What does the binary bit pattern 1010.10102 represent in decimal, if it is interpreted as: a. an unsigned value?

b.       a signed-magnitude value?

c.       a two’s complement value?

QUESTION 6 (12 marks)
Perform the following binary additions in a two's complement 8-bit system. 

For each result indicate if an overflow occurred or not. How can you tell?

a.       1010 1010 + 1111 1111

b.       0101 1111 + 0111 0101

c.       1111 0101 + 0101 0101

QUESTION 7 (12 marks)
Convert the following decimal numbers into 32-bit IEEE floating-point form (after getting the required IEEE 32 bits, you need to convert it to 8 hexadecimal digits to make it easy to read). If you will make any rounding, you have to clearly state which rounding method did you used to get your answer.

a.       –1234.87510

b.       +7654.310

QUESTION 8 (12 marks)
Convert the following 32-bit IEEE floating-point numbers into an easy to read decimal form.  a. FEDCBA9816

b. 89ABCDEF16

QUESTION 9 (18 marks)
Perform the following arithmetic operations assuming that the operands are 32-bit IEEE floating-point numbers, showing your additions in binary. Convert back the results into 32-bit IEEE floating-point form. If the resulting number is too small to be represented using the normalized IEEE floating point format, you will have to represent it as an IEEE underflow number. After getting the required IEEE 32 bits, you need to convert it to 8 hexadecimal digits to make it easy to read.

a.       FEDCBA9816 + 89ABCDEF16

b.       00FCD6EB16  + 80FCD6EA16

c.       00FCD6EB16  + 09ABCDEF16

More products