The midterm exam will be broken into two components:
The written portion will require you to:
The review below, in addition to everything you wrote for your labs, is intended to be comprehensive. All topics which could potentially be on the exam are somehow covered by this review.
N
two positions to the left is equivalent to multipling N
by what (in decimal)?
N
four positions to the right is equivalent to performing truncating division (ignoring the remainder) by what (in decimal)?
-8
in twos complement representation?
Represent your solution using 8 bits.
1 + 1
with a carry-in bit set?
1 + 1
without a carry-in bit set?
1 + 0
without a carry-in bit set?
What is:
11111101 + 01000101
Specify if the result has a carry-out set and if the result sets the overflow bit.
What is:
10010110 - 11101010
Specify if the result has a carry-out set and if the result sets the overflow bit.
N
.
Using only bitwise operations and bitmasks, give an expression that will produce N
, except that bit 7 is guaranteed to be one.
Express any bitmasks using 2-digit hexadecimal.