You are on page 1of 3

Name:_____________________ Roll Number:__________

Section:_____

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY KARACHI


6th Semester Computer Engineering, Mid Term Examination 2015
Digital System Design (CE-304)
Time allowed: 1 1/2 Hours

Date: 5th October 2015

------------------------------------------------------------------------------------------------------------Instructions: 1. Complete your 100 Points.


2. Avoid unnecessary details in your answers and be specific.

------------------------------------------------------------------------------------------------------------1. Convert the following fraction part into decimal number using Horners Rule?
a. (1234)6
b. (7654)8
c. (1018)9
d. (9191)11
Answer: [Lecture 1, Slide 24]
(1234)6
Using Horners Rule
(((((4/6) + 3)/6 + 2)/6 + 1)/6 = 0.23919

(10 Points)

(7654)8
Using Horners Rule
(((((4/8) + 5)/8 + 6)/8 + 7)/8 = 0.9794
(1018)9
Using Horners Rule
(((((8/9) + 1)/9 + 0)/9 + 1)/9 = 0.1137
(9191)11
Using Horners Rule
(((((1/11) + 9)/11 + 1)/11 + 9)/11 = 0.83327
2. Convert the following Radix value into the desire Radix system?
a. (257)10 (_1610______)13
b. (244)10 (__100001_____)3
3 | 244
13 | 257
3 | 81 -> 1
13 | 19 -> 10
3 | 27 -> 0
| 1 -> 6
3 | 9 -> 0
3 | 3 -> 0
| 1 -> 0
c. (290)10 (__202______)12
d. (298)10 (__2010______)12
12 | 290
12 | 298
12 | 24 -> 2
12 | 24 -> 10
| 2 -> 0
| 2 -> 0

(10 Points)

3.

(20 Points)

Convert the following Radix value into the decimal form?


a. Radix=14, Digit Set=[-2,5],[-2,1,2,2,2,0]
Answer:
=145 x (-2) + 144 x (1) + 143 x (2) + 142 x (2) + 141 x (2) + 140 x (1)
=(-1075648)+ (38416)+(5488)+(392)+(28)+(0)
=(-1031324)

Name:_____________________ Roll Number:__________


Section:_____
b. Radix=7, Digit Set=[-2,10],[7,1,10,-2,10,6]
Answer:
=75 x (7) + 74 x (1) + 73 x (10) + 72 x (-2) + 71 x (10) + 60 x (6)
=(117649)+(2401)+(3430)+(-98)+(70)+(6)
=123458
c. Radix=4, Digit Set=[-2,7],[1,6,-2,7,6,-2]
Answer:
=45 x (1) + 44 x (6) + 43 x (-2) + 42 x (7) + 41 x (6) + 40 x (-2)
=(1024)+(1536)+(-128)+(112)+(24)+(-2)
=2566
d. Radix=j-1, Digit Set=[0,1],[1,0,1,0,1]
Answer:
=(j-1)4 x (1) + (j-1)3 x (0) + (j-1)2 x (1) + (j-1)1 x (0) + (j-1)0 x (1)
=(j-1)4 + (0) + (j-1)2 + (0) + (1)
=(j-1)4 + (0) + (j-1)2 + (0) + (1)
=(j-1)4 + j2 -2j + 1
=j4 4j3 + 6j2 - 4j + 1 + j2 -2j + 1
=j4 4j3 + 7j2 - 6j + 1
4. Perform addition between the following numbers?
(30 Points)
Radix= 18, Digit Set =[-2,21], [9,21,19,15,7,5]
Radix= 18, Digit Set =[-2,21], [-2,2,3,21,1,8]
Answer: Row= Alph+Beta+1 Radix = 2 + 21 + 1 18 = 6
9
21
19
15
7
5
Digit Set =[-2,21]
-2
2
3
21
1
8
Digit Set =[-2,21]
7
23
22
36
8
13
Digit Set =[-4,42]
0
0

1
1

5
1
6

4
2
6

0
0
0

8
0
8

13

Interim [0,19]
Transfer D in [-2,2]

13

Radix= 5, Digit Set =[-2,8], [0,0,2,3,5,8]


Radix= 5, Digit Set =[-2,8], [7,5,5,-1,2,2]
Answer: Row= Alph+Beta+1 Radix = 2 + 8 + 1 5 = 6
0
0
2
3
5
8
Digit Set =[-2,8]
7
5
5
-1
2
2
Digit Set =[-2,8]
7
5
7
2
7
10
Digit Set =[-4,16]
2
0
2
2
2
0
Interim [0,6]
1
1
0
1
2
Transfer digit in [-2,2]
3
1
2
3
4
0

Radix=2, Digit Set=[-1,1], [1,1,1,1,1,1]


Radix=2, Digit Set=[-1,1], [1,0,0,0,0,1]
Answer: Row= Alph+Beta+1 Radix = 1 + 1 + 1 2 = 1
1
1
1
1
1
1
1
0
0
0
0
1
2
1
1
1
1
2
H
H
H
H
H
H
0
-1
-1
-1
-1
0
1
1
1
1
1
x
1
0
0
0
0
0

1
1

7
1
8

Name:_____________________ Roll Number:__________


5.

Section:_____

Convert a [4 2 3 0 5]Radix-7 to a radix-7 integer with the nonstandard digit set [3, 3]?

(10 Points)

Answer:
4
2
3
0
5
-3
2
3
0
-2
1
0
0
0
1
----------------------------------------------------------------1
-3
2
3
1
-2
6.

Represent your Roll Number into the following RNS system?

a. (Roll Number)RNS[79,53,29,11]
c. (Roll Number)RNS[41,23,11,5]
7.

Rewritren digit in [-3,3]


Transfer digit in [0,1]

b. (Roll Number)RNS[31,29,23,19]
d. (Roll Number)RNS[71,47,17,7]

Determine an efficient set of moduli to represent the quivalent of 16-bit integers.(Hint


using Strategy 1)

Answer: 16-bit (0, 65536)


(17, 15, 11 , 7 ,3) 58,905 Not a required Range
(19, 17, 7, 5, 3, 2) 67,830 Perfect
5+ 5+ 3+3+2+1 = 19-bits
(119, 19, 15, 2) 67,830 Perfect
7+ 5+ 4+ 1 = 17-bits

(10 Points)

(10 Points)

You might also like