This preview shows page 1. Sign up to view the full content.
Unformatted text preview: The first example is done for you. Example: 1100 + 0011 1111, overflow = 0, carry = 0 Answer: 1111, V:0, C:0 a) 0110 + 0011 b) 1011 + 0110 Remember that in a 4bit addition, the answer is truncated at 4 bits, as well. One way to determine the overflow and carry bits is to translate the inputs and answer to decimal. For overflow, translate them using 2's complement. If the answer is correct, there is no overflow. For carry, use unsigned numbers. 5. Give the answers to the following bitwise operations a) 0110 & 1100 b) 0110  1100 c) 0110 >> 2 d) ~0110 6. Each operation is written in Java or C, whichever you know. Rewrite the line to use a bitwise operation. a) a * 8 b) b / 16 c) c % 8...
View
Full
Document
 Fall '09
 FRANKLIN

Click to edit the document details