Ca2324 hw1 Questions
Ca2324 hw1 Questions
Note: You are required to use the LATEX template provided on Brightspace.
Question 1 (4 points)
Convert the following decimal numbers to their 2’s complement representations (use 8 bits for each
number and truncate the fractional digits if necessary):
a) 102.3
b) 6.3
c) −13
d) 0.04
Question 2 (6 points)
Perform the following operation in 2’s complement. Indicate when an overflow happens.
a) 11001010 + 11101010
b) 01011010 + 00110101
c) 0011.1100 + 0100.0100
d) 11010111 − 00001011
1
Computer Architecture Homework 1
Figure 1
2
Computer Architecture Homework 1
First, shift the decimal point of the smaller number to equalize the exponents:
1.34021 · 103
N = 14.25, M = 0.5