c05_ps03_sol

c05_ps03_sol - C5 Solutions 1. Convert the following base...

Info iconThis preview shows pages 1–4. 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

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: C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110 Step3. Add 1 11111111 Therefore 1 = 11111111 To Compute 12 Step 1. Convert 12 to binary 00001100 Step 2. Flip the bits 11110011 Step3. Add 1 11110100 Therefore 12 = 11110100 2. Perform each of the following additions assuming that the bit strings represent values in 2s complement notation. Identify the cases in which the answer is incorrect because of overflow. 1111 + 1111 11110 Answer = 11110 Overflow = 0 Answer is correct 01111 + 10001 100000 Answer = 00000 Overflow = 1 Answer is incorrect 01110 + 01010 11000 Answer = 11000 Overflow = 0 Answer is correct 3. Write an algorithm to convert a negative decimal number into a binary number in 2s complement form. Assume that the number ranges from +127 to -128 1. If the number is less than 0 a. Multiply by 1...
View Full Document

This note was uploaded on 01/28/2012 for the course AERO 16.01 taught by Professor Markdrela during the Fall '05 term at MIT.

Page1 / 4

c05_ps03_sol - C5 Solutions 1. Convert the following base...

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

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