Name:__________________
Quiz #1
Given:
0x47 is an 8-bit 2's compliment number
0xC is a 4-bit 2's compliment number
1) What is the value of each in decimal?
0100 0111b = 64+7 = 71
1100 = 4+-8 = -4
2) Show the complete process of adding these two numbers in binary.
(Show all carries / etc.) Write the result in Hex.
Indicate if overflow occurs as well.
Carries: 111111
01000111
+ 11111100 <- Sign Extension
-----------
101000011 = 0100 0011 as 8-bit
64+3=67 No Overflow / Work Checks
3) If 0x41 is ASCII for the letter 'A', what is 0x47?
0x41 = 'A'
0x42='B'
0x43='C'
0x44='D'
0x45='E'
0x46='F'
0x47='G'
4) Given that a program has 2 million instructions and an average CPI of
1.9,
what clock speed will the computer need to complete
in 0.25 s
2000000insts*1.9colcks/inst = 3800000 clocks
3800000 clocks/ 0.25s = 15,200,000 clocks/s = 15.2 MHz