# hw1 - CS 2204 DIGITAL LOGIC STATE MACHINE DESIGN HOMEWORK I...

This preview shows pages 1–4. Sign up to view the full content.

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN FALL 2009 P olytec hnic Institute of NYU P a g e 1 of 8 Handout No : 2 September 8, 2009 HOMEWORK I DUE : September 24, 2009 READ : Related portions of Chapter I and Chapter II ASSIGNMENT : There are se v en questions four of which are from Chapters I and II of the text- book Solve all homework and exam problems as shown in class and past exam solutions 1) Solve Problem 1.5. Can you think of an analog system that may stay as analog for some time to come in the future ? 2) Solve Problem 2.5 (e). Assume that the binary number is an unsigned binary number. Show manual calculations, indi- cating that you did not use a calculator. 3) Solve Problem 2.10 (b). First, convert the hex digits to bit patterns. Second, by assuming that these bit patterns represent 2’ s complement numbers, perform the addition in binary during which show all the carries. State if there is an overﬂow and why. 4) Solve Problem 2.18 (f). The question asks about the radix of the following operation : 41 () ? 5 ? = . Both sides of the equation have the same radix ! Clearly describe how you arrive at the result. Hint : try to make use of the general conversion formula . 5) Perform the following operation in 2’ s complement arithmetic, by using 12 bits per number : (192) 10 + (F08) Hex = ( ? ) 10 You will show all number conversions as done in class. Note that the Hex digits are for coding purposes. They represent a 2’s Complement number. Make observations on the addition.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
P olytec hnic Institute of NYU P a g e 2 of 8 CS2204 Handout No : 2 September 8, 2009 6) Convert the following ﬁxed-point decimal number to a 16-bit 2’ s complement ﬁx ed-point binary number : (525.3125) 10 Use four bits for the fraction part of the 2’s complement number and 12 bits for the integer part. 7) Calculate the following logarithm : log 2 [(010000) 2 2’s Complement] = ( ? ) 10 RELEVANT QUESTIONS AND ANSWERS Q1) Convert the following decimal number to a 16-bit 2’ s complement binary number, by using 7 bits for the inte- ger portion : (-26.75) 10 A1) First, we have to consider (+26.75) 10 since we cannot directly convert negative numbers. We know that the integer part is obtained by successive divisions and the fraction part is obtained by successive multiplications : 26/2 = 13 & 0 (lsb) 13/2 = 6 & 1 6/2 = 3 & 0 3/2 = 1 & 1 1/2 = 0 & 1 (msb) (11010) 2 (+26) 10 (11010) 2 (+26) 10 using 7 bits requires sign extension : (0011010) 2 0.75*2 = 1.5 1 0.5*2 = 1.0 1 (.11) 2 (+26.75) 10 = (0011010.110000000) 2 (-26.75) 10 = (0011010.110000000) = (1100101.010000000) 2 (.75) 10 (.11) 2 (0.75) 10 using 9 bits requires additional zeros to the right : (110000000) 2 The integer part : The fraction part : 2 Q2) Perform the following operation in 2’s complement arithmetic : F6 + 49 = ? The numbers are shown in the Hexadecimal notation. Thus, ﬁrst convert the numbers to binary, and then add them. Make observations on the addition. A2) Replace each hexadecimal digit with four bits to convert them to 2’s Complement numbers : F 6 1 1 1 1 0 1 1 0 4 9 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 0 + 0 1 0 0 1 0 0 1 0 0 1 1 1 1 1 1 1 (3 F) Hex c out
P olytec hnic Institute of NYU P a g e 3 of 8 CS2204 Handout No : 2 September 8, 2009 There is no overﬂow, since the two numbers added have different sign bits : one is negative and the other is positive.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

hw1 - CS 2204 DIGITAL LOGIC STATE MACHINE DESIGN HOMEWORK I...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online