Problem 1
Consider a 6-bit two’s complement
representation. Fill in the empty boxes in the following table. Addition and
subtraction should be performed based on the rules for 6-bit, two’s complement
arithmetic.
|
Number |
Decimal Representation |
Binary Representation |
|
Zero |
0 |
|
|
n/a |
-2 |
|
|
n/a |
18 |
|
|
n/a |
-30 |
|
|
n/a |
|
00 1100 |
|
n/a |
|
11
0100 |
|
TMax |
|
|
|
TMin |
|
|
|
Tmax + Tmin |
|
|
|
Tmin + 1 |
|
|
|
Tmax + 1 |
|
|
|
-Tmax |
|
|
|
-Tmin |
|
|
Problem 2 (similar to Practice Problem 2.27)
Fill in the following table showing the results of
multiplying different three-bit numbers in the style of Figure 2.21.
|
Mode |
x |
y |
x · y (6-bits) |
Truncated x · y |
|
Unsigned Two’s comp. |
[010] [010] |
[011] [011] |
|
|
|
Unsigned Two’s comp. |
[110] [110] |
[101] [101] |
|
|
|
Unsigned Two’s comp. |
[111] [111] |
[011] [011] |
|
|
CS 47 Homework #1 John Doebut of course with your own name instead of "John Doe." Please also preserve all spacing and capitalization in this subject line.