HW1 - EE-2513-0A1-Spring-2021- Logic Design Paul Morton PDF

Title HW1 - EE-2513-0A1-Spring-2021- Logic Design Paul Morton
Course Logic Design
Institution The University of Texas at San Antonio
Pages 6
File Size 108.5 KB
File Type PDF
Total Downloads 89
Total Views 135

Summary

EE-2513-0A1-Spring-2021- Logic Design
Paul Morton...


Description

Stefany Pascua HW1 - Fundamentals of Logic Design by Charles H. Roth, Larry L. Kinney 1.1 Convert to hexadecimal and then to binary: (a) 757.2510 = 2F5.416 = 001011110101.012 757 / 16 = 47 R = 5 47/16 = 2 R = 15 2/16 = 0 R = 2 0.25 * 16 = 4 (b) 123.1710 = 7B.2B16 = 1111011.001010112 123 / 16 = 7 R = 11 B7 / 16 = 0 R = 7 0.17 * 16 = 2.72 0.72 * 16 = 11.52 (c)0356.8910 = 164.E316 = 101100100.111000112 356 / 16 = 22 R = 4 22 / 16 = 1 R = 6 1 / 16 = 0 R = 1 .89 * 16 = 14.24 .24 * 16 = 3.84 (d) 1063.510 = 427.816 = 10000100111.12 1063 / 16 = 66 R = 7 66 / 16 = 4 R = 2 4 / 16 = 0 R = 4 .5 * 16 = 8 1.2 Convert to octal. Convert to hexadecimal. Then convert both of your answers to decimal, and verify that they are the same. (a) 111010110001.0112 = EB1.616 = 14*162+ 11*161+ 1*160+ 6*16-1 = 3761.37510 7261.38 = 7*83+ 2*82+ 6*83+ 1*80+ 3*8-1 = 3761.37510 (b) 10110011101.112 = 59D.C16 = 5*162+ 9*161+ 13*160+ 12*16-1 = 1437.7510

2635.68 = 2*83 + 6*82 + 3*81 + 5*80 + 6*8-1 = 1437.7510 1.3 Convert to base 6: 3BA.2514 (do all of the arithmetic in decimal). 3BA.2514 = 3*142+ 11*141+ 10*140+ 2*14-1+ 5*14-2 = 752.168410 756 / 6 = 125 R = 2 124 6 = 20 R = 5 20 / 6 =3 R = 2 3/6=0R=3 .1684*6 = 1.0104 .0101*6 = 0.0624 .0624*6 = 0.3744 .3744*6 = 2.2464 3252.10026 1.5 Add, subtract, and multiply in binary: (a) +1111 +1010 011101 -1111 -1010 -0101 +1111 *1010 010010110 (b) 110110 +11101 01010011 110110 -11101

011001 110110 *11101 011000011110 (c) 100100 +10110 0111010 100100 -10110 -01110 100100 *10110 01100011000 1.6 Subtract in binary. Place a 1 over each column from which it was necessary to borrow. (a) 11 11110100 −1000111 010101101 (b) 1 1 1110110 −111101 0111001 (c) 11 1 10110010 − 111101

01110101 1.7 Add the following numbers in binary using 2’s complement to represent negative numbers. Use a word length of 6 bits (including sign) and indicate if an overflow occurs. (a) 21 + 11 = 32 +010101 +001011 +100000 (overflow) +010101 +001011 +100000 (overflow) (b) -14 - 32 = -46 +110010 +100000 (1)010010 (overflow) (c) -25 + 18 = -7 100111 +010010 +111001 +100110 +010010 +111000 1.8 A computer has a word length of 8 bits (including sign). If 2’s complement is used to represent negative numbers, what range of integers can be stored in the computer? If 1’s complement is used? (Express your answers in decimal.) For 2’s complement it’s -128 to 127. For 1’s complement it’s -127 to 127. 1.28 Construct a table for 4-3-2-1 weighted code and write 9154 using this code. 0 = 0000 1 = 0001 2 = 0 10 3 = 0011

4 = 0101 5 = 0110 6 = 1010 7 = 1011 8 = 1101 9 = 1110 10 = 1111 9154 = 1110000101100101 1.34 (a) It is possible to have negative weights in a weighted code for the decimal digits, e.g., 8, 4, −2, and −1 can be used. Construct a table for this weighted code. 0 = 0000 = 0000 1 = 0111 = 0001 2 = 0110 = 0010 3 = 0101 = 0011 4 = 0100 = 0100 5 = 1011 = 0101 6 = 1010 = 0110 7 = 1001 = 0111 8 = 1000 = 1000 9 = 1111 = 1001 10 = 1110 = 1010 11 = 1101 = 1011 12 = 1100 = 1100 (b) If d is a decimal digit in this code, how can the code for 9 − d be obtained? Decimal digit (d)

(9-d)

8-4-(-2) -(-1) code

0 1 2 3

9 8 7 6

1111 1000 1001 1010

2’s complement subtraction 1001 1000 0111 0110

4 5 6 7 8 9

5 4 3 2 1 0

1011 0100 0101 0110 0111 0000

0101 0100 0011 0010 0001 0000...


Similar Free PDFs