Student Number_______________________________________________ Section:________
ITI1100 Digital Systems I
Mid-term Exam
Date: March 2, 2013
Time: 1h30 (10:00-11:30)
Professors: A. Karmouch and Hasan Ural
Instructions:
Answer ALL questions.
This is a close-book examination.
Use the provided space to answer the following questions. If more space is needed, use the back of the page.
Show all your calculations to obtain full marks.
Calculators are NOT allowed.
Read all the questions carefully before you start.
Question
Points
Percentage
1
40%
2
60%
Total
100%
Question 1 (40 points: 15 + 10+ 15):
(a) Convert the following binary into (i) decimal, (ii) octal et (iii) hexadecimal
10100001111.1101
(i) to decimal
(10100001111)2
= 1 x 210 + 0 x 29 + 1 x 28 + 0 x 27 + 0 x 26 + 0 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 1 x 20
= 1024 + 0 + 256 + 0 + 0 + 0 + 0 + 8 + 4 + 2 + 1
= 1295
(0.1101)2
= 1 x 2-1 + 1 x 2-2 + 0 x 2-3 + 1 x 2-4
= 0.5 + 0.25 + 0 + 0.0625
= 0.8125
(10100001111.1101)2 = 1295.8125
(ii) to Octal
(10100001111)2
= 010 100 001 111.110 100
= 2417.64
(ii) to Hexadecimal
(10100001111)2
= 0101 0000 1111.1101
= 50F.D
(b) Perform the following operation using 10’s complement (162)10 – (27)10
[N]r = rn – (N)r n = 3
(162)10 – (027)10
103 – 027 = 973
10’s Complement of (27)10 = 973
(162)10 – (27)10 = (162)10 + 10’s Complement of (27)10
= (162)10 + (973)10
= (135)10
(c) Convert the following numbers into binary and perform the arithmetic operations in (i) and (ii) using signed binary numbers with 2’s complement. Use 7 bits to represent the integer part of decimal numbers and the sign bit. Use three bits to represent the fractional part.
(i) (4.5)10 – (9)10
(ii) (8.5)10 + (9)10
(4.5)10 = 0000100.100
(9)10 = 0001001.000
2’s of (9)10