Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

College of Engineering and Computing

Academic Year 2014 - 2015, Semester – Winter

Computer Architecture (CSE 403/451) Section :50

Total Marks: 80 Marks Obtained: _____

Name of
Student ID: ___________________
Student:___________________________________________
Assignment 1

Q 1. Convert the following numbers as indicated, using as few digits in the results as necessary.
5 Marks
a) (47)10 to unsigned binary. ………101111………………. CLO(1)
b) (−27)10 to binary signed magnitude……111011…………
c) (213)16 to base 10……………531……………………
d) (10110.101)2 to base 10………22.625……………………….
e) (34.625)10 to base 4…………202.22…………………….

Q 2. Represent (17.5) in base 3, then convert the result back to base 10. Use
10
6 Marks
two digits of precision to the right of the radix point for the intermediate base CLO(1)
3 form.

(17.5)10 = (122.11)3 = (17.4)10

Q 3. Find the decimal equivalent of the four-bit two’s complement number:


1000. 5 Marks
CLO(1)
-8

Q 4. Complete the following table for the 5-bit representations (including the sign bits) 10 Marks
indicated below. Show your answers as signed base 10 integers. CLO(1)
5-bit signed magnitude 5-bit excess 16
Largest number +15 +15
Most negative number -15 -16
No. of distinct numbers 31 32

1
Q 5. Complete the following table using base 2 scientific notation and an eight-bit floating
point representation in which there is a three-bit exponent in excess 3 notation (not excess 10 Marks
4), and a four-bit normalized fraction with a hidden ‘1’. In this representation, the hidden 1 CLO(1)
is to the left of the radix point. This means that the number 1.0101 is in normalized form,
whereas .101 is not.
Base 2 scientific notation Floating point representation
Sign Exponent fraction
-1.0101x2-2 1 001 0101
+1.1x22 0 101 1000
+1.0x2-2 0 001 0000
-1.1111x2 1 110 1111

Q 6. For the following single precision IEEE 754 bit patterns show the numerical value
as a base 2 significand with an exponent (e.g. 1.11 × 25). 14 Marks
CLO(1)
a) 0 10000011 01100000000000000000000 ……+1.011x24………………
b) 1 10000000 00000000000000000000000 ……-1.0x21………………...
c) 1 00000000 00000000000000000000000 ……-0………………
d) 1 11111111 00000000000000000000000 ……-∞……………..
e) 0 11111111 11010000000000000000000 ……+NaN………………
f ) 0 00000001 10010000000000000000000 ……+1.1001x2-126……….
g) 0 00000011 01101000000000000000000 ……+1.01101x2-124……………….

Q 7. Show the IEEE 754 bit patterns for the following numbers:
8 Marks
a) +1.1011 × 25 (single precision) CLO(1)

……0 10000100 1011 0000 0000 0000 0000 000

b) +0 (single precision)

……0 00000000 0000 0000 0000 0000 0000 000

c) −1.00111 × 2−1 (double precision)

……1 01111111110 0011 1000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000

d) −NaN (single precision)


1 11111111 1011 1000 0000 0000 0000 000

2
Q 8. Express (-1/32) in the IEEE 754 single precision format.
10 Marks
1 CLO(1)
� � = (0.00001)2 = 1.0𝑥𝑥2−5
32 10

The exponent in excess 127 = -5+127 = 122 =(01111010)2

1 01111010 0000 0000 0000 0000 0000 000

Q 9. For parts (a) through (d), use a floating point representation with a sign bit in the
leftmost position, followed by a three-bit excess 4 exponent, followed by a 12 Marks
normalized six-bit fraction in base 4. CLO(1)
Zero is represented by the bit pattern 0 000 000000.

(a) What decimal number is represented by the bit pattern: 1 100 010000?

0.1 x 44-4 = - (0.1x4-1)x1=(-0.25)10

(b) Show the bit pattern for the smallest non-zero positive representable number.

0 000 010000

(c) Show the bit pattern for the largest positive representable number.

0 111 111111

(d) There are a total of 10 bits in this floating point representation, so there are 210
= 1024 unique bit patterns. How many of these bit patterns are valid? (Remember:
0 = 0 000 000000).

2𝑥𝑥(3 − (−4) + 1)𝑥𝑥(4 − 1)𝑥𝑥43−1 + 1 = 769

You might also like