hw02_sol

hw02_sol - LSU EE 2720-2 Homework 2 Solution Due: 28...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: LSU EE 2720-2 Homework 2 Solution Due: 28 September 2011 Solution updated :: 30 September 2011, 10:45:27 CDT (Solutions to 4b and 4c were swapped.) Problem 1: Perform the multiplications indicated below. Multiply the following two 8-bit unsigned binary integers into a 16-bit product: 01110010 + 10010011 . Solution: 01110010 = 0x72 = 114 10010011 = 0x93 = 147-------- 01110010 <- Pad with 0 zeros. 011100100 <- Pad with 1 zero. 011100100000 <- Pad with 4 zeros. 011100100000000 <- Pad with 7 zeros.--------------- 0100000101110110 <- Binary to the right, below show in hex and decimal. 0100 0001 0111 0110 = 0x4176 = 16758 Multiply the following two 8-bit signed 2s complement integers into a 16-bit product: 01110010 + 10010011 . Solution: Binary numbers broken into groups of 4 digits for readability. 0111 0010 = 0x72 = 114 Multiplicand 1001 0011 = 01101100 + 1 = 01101101 => -109--------- 0111 0010 <- Pad with 0 zeros. 0 1110 0100 <- Pad with 1 zero. 0111 0010 0000 <- Pad with 4 zeros. 1100 0111 0000 0000 <- Pad with 7 zeros. Used negated and sign ext mcand------------------- 1100 1111 0111 0110 <- Product 11 0000 1000 1010 <- Twos comp of product: 0x308a = 12426, so prod is -12426 How last partial product obtained: 0111 0010 <- Multiplicand 1000 1110 <- Negated Multiplicand (2s complement) 100 0111 0000 0000 <- Pad on left with 7 zeros. 1100 0111 0000 0000 <- Make 16-bit by sign extension (repeating sign bit). The theorem numbers in the problems below are from Dr. Skavantos Handout 5, available via http://www.ece.lsu.edu/alex/EE2720/EE2720_HO5.pdf . Problem 2: Prove the following ( a ) Prove theorem T5 (called complement in the notes, but a better name is the damned-if-you- do,-damned-if-you-dont theorem) by perfect (finite) induction....
View Full Document

Page1 / 4

hw02_sol - LSU EE 2720-2 Homework 2 Solution Due: 28...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online