Docsity

Digital systems design exercises, Exercises of Digital Systems Design

Toggle sidebar
bg1
Yazeed Alfaqeeh
20181502031
Homework 1
Part 1:
Question 1: Construct a table for a 5-3-2-1 weighted code for decimal digits, and write
(9371)10 using this code:
A) B) (9371)10 ( )5-3-2-1
Decimal digit 5-3-2-1
0 0000
1 0001
2 0010
3 0011
4 0101
5 1000
6 1001
7 1010
8 1100
9 1101
9 1101 , 3 0011 , 7 1010 , 1 0001
=(1101010010100001)5-3-2-1
Question 2: The solutions to a quadratic equation X2 โ€“ 13X + 32 = 0 are x = 5 and x = 4
What is the base of the numbers? To get the mark of this question, Show the details of
your solution.
The Solution:
X2 โ€“ 13X + 32 =0
As mentioned in the question the equation has 2 solutions, X = 4 and X =5
Then,
(5)2r โ€“ (13)r*(5)r + (32)r = (4)2r โ€“ (13)r*(4)r + (32)r
(5 * r0) (5 * r0) โ€“ (1*r + 3*r0) (5 * r0) = (4 * r0) (4 * r0) - (1*r + 3*r0) (4 * r0)
25 โ€“ (r + 3)5 = 16 โ€“ (r+3)4 25 โ€“ 5r โ€“ 15 = 16 โ€“ 4r - 12
pf3
pf4
pf5

Partial preview of the text

Download Digital systems design exercises and more Exercises Digital Systems Design in PDF only on Docsity!

Yazeed Alfaqeeh 20181502031 Homework 1

Part 1:

Question 1: Construct a table for a 5-3-2-1 weighted code for decimal digits, and write

(9371) 10 using this code:

A) B) (9371) 10 ( )5-3-2-

Decimal digit 5-3-2- 0 0000 1 0001 2 0010 3 0011 4 0101 5 1000 6 1001 7 1010 8 1100 9 1101

Question 2: The solutions to a quadratic equation X 2 โ€“ 13X + 32 = 0 are x = 5 and x = 4

What is the base of the numbers? To get the mark of this question, Show the details of

your solution.

The Solution:

X^2 โ€“ 13X + 32 =

As mentioned in the question the equation has 2 solutions, X = 4 and X =

Then,

(5)^2 r โ€“ (13) r *(5)r + (32)r = (4)^2 r โ€“ (13)r *(4) r + (32)r

(5 * r^0 ) (5 * r 0 ) โ€“ (1r + 3r 0 ) (5 * r 0 ) = (4 * r 0 ) (4 * r^0 ) - (1r + 3r^0 ) (4 * r 0 )

25 โ€“ (r + 3)5 = 16 โ€“ (r+3)4 25 โ€“ 5r โ€“ 15 = 16 โ€“ 4r - 12

r = 25 โ€“ 16 โ€“ 15 +

r = 6

Part 2:

Question 1:

(a)( 10010101 ) 2 ( ) 10

= 12^0 + 02^1 + 12^2 + 02 3 + 12 4 + 02 5 + 02 6 + 12 7 = (149) (^10)

(b)(01101111) 2 ( ) 10

= 12^0 + 12^1 + 12^2 + 12^3 + 02^4 + 12^5 + 12^6 + 02^7 = (111) (^10)

(c)(1101) 2 ( ) 10

= 12^0 + 02^1 + 12^2 + 12^3 = (13) 10 (d)( 1010101 ) 2 ( ) 10 = 12^0 + 02^1 + 12^2 + 02^3 + 12^4 + 02^5 + 1*2^6 = (85) 10

Question 2:

A. (13) 10 (1101) 2 (B) (390) 10 (110000110) 2

2 13 Remainder 2 6 1 2 3 0 2 1 1 0 1 2 390 Remainder 2 195 0 2 97 1 2 48 1 2 24 0 2 12 0 2 6 0 2 3 0 2 1 1 0 1

D. (2000) 16 (8192) 10

= 0(16)^0 + 0(16)^1 +0(16)^2 + 2(16)^3 = (8192) 10

16 2313 Remainder 16 144 9 16 9 0 0 9

Question 4:

A) (372) 10 (174) 16 B) (2313) 10 (909) 16

16 372 Remainder 16 23 4 16 1 7 0 1

16 1024 Remainder 16 64 0 16 4 0 16 0 4

16 33 Remainder 16 2 1 16 0 2

C) (33) 10 (21) 16 D) (1024) 10 (400) 16

Question 5:

A) (962) 10 ( )BCD B) (529) 10 ( )BCD

= (100101100010)BCD = (010100101001)BCD

C) (38) 10 ( )BCD D) (1024) 10 ( ) BCD

Question 6:

A) (010101010101)BCD ( ) 10 B) (000110000100)BCD ( ) 10

C) (10111)BCD ( ) 10 D) (1110101)BCD ( ) 10

Question 7:

A) (38) 10 ( ) BCD B) (275) 10 ( ) BCD

= (100111000) BCD 5 0101

= (0001001110101) BCD

C) (9201) 10 ( )BCD D) (51) 10 ( )BCD

0 0000 = (101010001) BCD

= (01001001000000001) BCD

Question 8:

A) 1010 C) 10011

________ ________

While the second number is greater than the first one, we take the 2โ€™s singed Comp. to the second number then add them together.

Question 11:

A) Add (+14) to (-17) (+17) (00010001) then (-17) (11101111)2,2โ€™s Comp. (+14) (00001110)

00001110

11101111


11111101 Take the 2โ€™s Comp. (00000011) (^) 2,2โ€™s Comp. (-3) 10

B) Add (+37) to (+95) (+37) (00100101) (+95) (01011111)

00100101

01011111


10000100 Take the 2โ€™s Comp. (01111100) 2,2โ€™s Comp. (-124) 10 [Overflow]