Assignment 1 with solution COEN212 PDF

Title Assignment 1 with solution COEN212
Course Digital Systems Design I
Institution Concordia University
Pages 4
File Size 211.4 KB
File Type PDF
Total Downloads 81
Total Views 175

Summary

This is an assignment practice with the solutions....


Description

COEN 212- Digital Systems Design- Winter 2021 Assignment 1 - Number systems, radix complements, and computer codes Deadline: Monday Feb 1st Submission instructions: - You have to demonstrate your work for each question, final answers are not acceptable. - Only pdf file is acceptable. - Submit through Moodle. - Emails are not accepted.

1- Convert the following numbers with the indicated bases to decimal: (16 points) (a) (1560)8 (b) (1FA.5) 16 (c) (10110.0101)2 (d) (DADA.B)16

Solution: a) b) c) d)

880 506.3125 22.3125 60138.6875

2- Convert the following binary numbers to hexadecimal. (8 points) a) 1.10010 b) 110.010 Solution: a) (1.9)16 and (1.563)10 b) (6.4)16 , (6.25)10 3- What is the maximum value that can be expressed with 16 bits. What are the equivalent decimal and hexadecimal numbers? (6 points) Solution: 1111 1111 1111 1111 Decimal equivalent: 2^16 -1 = 65535

COEN 212- Digital Systems Design- Winter 2021 To convert to hexadecimal, separate the digits in binary in bundles of 4. In each bundle we have 1111 which is FFFF. Therefore the Hexadecimal value is = FFFF 16

4- Do the following conversion problems: (20 point) (a) Convert decimal 27.315 to binary. (b) Calculate the binary equivalent of 2/3 out to eight places. Then convert from binary to decimal. How close is the result to 2/3? (c) Convert the binary result in (b) into hexadecimal. Then convert the result to decimal. Is the answer the same? Solution: a) Divide by 2 repeatedly : (27)10 = (11011)2 Multiply by 2 repeatedly : (0.315) = (0.0101)2 Final Answer = (11011. 0101)2

b) 2/3 ≅ .6666666667 Integer Fraction Coefficient .6666_6666_67 x 2 = 1 + .3333_3333_34 a-1 = 1 .3333333334 x 2 = 0 + .6666666668 a-2 = 0 .6666666668 x 2 = 1 + .3333333336 a-3 = 1 .3333333336 x 2 = 0 + .6666666672 a-4 = 0 .6666666672 x 2 = 1 + .3333333344 a-5 = 1 .3333333344 x 2 = 0 + .6666666688 a-6 = 0 .6666666688 x 2 = 1 + .3333333376 a-7 = 1 .3333333376 x 2 = 0 + .6666666752 a-8 = 0 .666666666710 ≅ .101010102 = .5 + .125 + .0313 + ..0078 = .664110

c) .101010102 = .1010_10102 = .AA16 = 10/16 + 10/256 = .664110 (Same as (b)).

COEN 212- Digital Systems Design- Winter 2021 5- Find 1’s and 2’s complement of the following numbers. (12 points) a) 10000101 b)10101010 c)11111111

Solution: a) 1’s comp: 0111 0101 , 2’s comp: 0111 1011 b) 1’s comp: 0101 0101, 2’s comp: 0101 0110 c) 1s comp: 0000 0000, 2’s comp: 0000 0001 6- Find 9’s complement and 10’s complement of the following numbers? (8 points) a)25478036 b)63325600 Solution: a) 9s comp: 74,521,963 10s comp: 74,521,964 b) 9s comp: 36,674,399, 10s comp: 36,674,400 7- Perform subtraction on the given unsigned numbers using 2’s complement of the subtrahend. Where the result is negative, find its 2’s complement and affix a minus sign. (20 points) a) 10011-10010 b) 101000 -10101

COEN 212- Digital Systems Design- Winter 2021

8- Convert the decimal 6248 to BCD code and excess-3 code. (10 points) a) BCD: 0110 0010 0100 1000 b) Excess-3: 1001 0101 0111 1011...


Similar Free PDFs