You are on page 1of 3

POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

COLLEGE OF ENGINEERING
COMPUTER ENGINEERING DEPARTMENT
COMPUTER SYSTEMS AND ARCHITECTURE
RLMahaguay2
LONG EXAMINATION 2ND SEM SY2019-2020
Name Block Score
JAVELOZA, FIENZ KARL V. 1PCOEN 3404
GENERAL INSTRUCTIONS:
1. Follow all instructions carefully. Failure to do so will warrant a substantial deduction from your final score.
2. Write everything in non-red ink. No borrowing of pens, calculators, etc.
3. You are not allowed to leave your seat unless you are through with the exam. If you have any questions, just raise your hand and the instructor
or proctor will attend to you.
4. Talking to or looking at your seatmate (and his/her paper) is automatically considered as cheating which is subject to very serious sanctions as
stipulated in the student handbook.
GOOD LUCK!!!
I. MULTIPLE CHOICE [35 points] Choose the letter of the correct answer. Write your answer on the space provided for. If the answer
is not found among the choices, write RM. Use CAPITAL LETTERS only.

FOR PROBLEMS 1 THROUGH 5:


A 32 MB main memory is to be upgraded by adding a cache memory of 256 KB. Both the main memory and the cache memory are
partitioned into blocks of 1KB.

FOR BLOCK-SET ASSOCIATIVE MAPPING WITH 4 CACHE BLOCKS/SET

__B__ 1. How many sets are there in the cache?


A. 32 B. 64 C. 128 D. None of the Above
__A__ 2. How many bits make up the set field of a memory address?
A. 6 B. 7 C. 8 D. None of the Above
__C__ 3. If a main memory word has hexadecimal address 123ABCD, to which main memory block does it belong?
A. Block 9480 B. Block 18432 C. Block 18666 D. None of the Above
__B__ 4. If a main memory word has a hexadecimal address 123ABCD, to which cache block will it be mapped?
A. Set 21 B. Set 42 C. Set 64 D. None of the Above

FOR PROBLEMS 5 THROUGH 10:

A 16 MB main memory is partitioned into modules of 16 KB each.

__B__ 5. How many bits are needed to represent the address of a memory byte?
A. 20 B. 24 C. 28 D. 32
__D__ 6. How many bits are needed to specify the module number?
A. 1 B. 2 C. 9 D. 10
__B__ 7. How many bits are needed to specify the address of a byte within a module?
A. 12 B. 14 C. 16 D. 18
__C__ 8. What is the hexadecimal address of the last word of Module 1 if memory direct/consecutive organization is used?
A. 003FFF B. 007FFF C. 003FF D. 007FF
__B__ 9. What is the hexadecimal address of the last word of Module 1 if memory-interleaving organization is used?
A. FFF801 B. FFFC01 C. FF801 D. FFC01
__A__ 10. If the hexadecimal address of a certain memory location is 000F80, to which module does it belong if memory
direct/consecutive organization is used?
A. Module 0 B. Module 1 C. Module 2 D. Module 3
__B__ 11. Assuming 8 bits and two’s complement are used, the decimal value of 01101101 is:
A. 77 B. 109 C. 146 D. 147
__B__ 12. Assuming 8 bits and one’s complement are used, the decimal value of 01101101 is:
A. 77 B. 109 C. 146 D. 147
__B__ 13. Assuming 8 bits and sign-and-magnitude are used, the decimal value of 01101101 is:
A. 77 B. 109 C. 146 D. 147
__B__ 14. Assuming 8 bits and two’s complement are used, the decimal value of 11110110 is:
A. -9 B. -10 C. -118 D. -246
__A__ 15. Assuming 8 bits and one’s complement are used, the decimal value of 11110110 is:
A. -9 B. -10 C. -118 D. -246
__C__ 16. Assuming 8 bits and sign-and-magnitude are used, the decimal value of 11110110 is:
A. -9 B. -10 C. -118 D. -246
__B__ 17. Assuming 9 bits and two’s complement are used, the binary representation of the decimal –127 is:
A. 110000000 B. 110000001 C. 101111111 D. 101111110
__A__ 18. Assuming 9 bits and one’s complement are used, the binary representation of the decimal –127 is:
A. 110000000 B. 110000001 C. 101111111 D. 101111110
__C__ 19. Assuming 9 bits and sign-and-magnitude are used, the binary representation of the decimal –127 is:
A. 110000000 B. 110000001 C. 101111111 D. 101111110
__C__ 20.Assuming 9 bits and two’s complement are used, the binary representation of the decimal –256 is:
A. 100000000 B. 1101111111 C. 111111111 D. 101111110
__C__ 21. Assuming 9 bits and one’s complement are used, the binary representation of the decimal –256 is:
A. 100000000 B. 1101111111 C. 111111111 D. 101111110
__A__ 22. Assuming 9 bits and sign-and-magnitude are used, the binary representation of the decimal –256 is:
A. 100000000 B. 1101111111 C. 111111111 D. 101111110
__C__ 23. Assuming 9 bits and two’s complement are used, the binary representation of the decimal +205 is:
A. 000110010 B. 000110011 C. 011001101 D. Out of range
2SEM SY2018-2019 2ND LONG EXAMINATION Page 1 of 3
__C__ 24. Assuming 9 bits and one’s complement are used, the binary representation of the decimal +205 is:
A. 000110010 B. 000110011 C. 011001101 D. Out of range
__C__ 25. Assuming 9 bits and sign-and-magnitude are used, the binary representation of the decimal +205 is:
A. 000110010 B. 000110011 C. 011001101 D. Out of range
__A__ 26. If there are 15 bits, the highest positive number that can be represented using two’s complement is:
A. 16,383 B. 16,384 C. 32,767 D. 32,768
__A__ 27. If there are 15 bits, the highest positive number that can be represented using one’s complement is:
A. 16,383 B. 16,384 C. 32,767 D. 32,768
__A__ 28. If there are 15 bits, the highest positive number that can be represented using sign-and-magnitude is:
A. 16,383 B. 16,384 C. 32,767 D. 32,768
__B__ 29. If there are 19 bits, the highest negative number that can be represented using two’s complement is:
A. –262,143 B. –262,144 C. –524,287 D. –524,288
__A__ 30. If there are 19 bits, the highest negative number that can be represented using one’s complement is:
A. –262,143 B. –262,144 C. –524,287 D. –524,288
__A__ 31. If there are 19 bits, the highest negative number that can be represented using sign-and-magnitude is:
A. –262,143 B. –262,144 C. –524,287 D. –524,288
__B__ 32. How long will it take a 24-bit ripple carry adder to produce a result assuming a gate delay of 2 ns?
A. 12 ns B. 32 ns C. 46 ns D. 98 ns
__C__ 33. How long will it take a 24-bit carry-lookahead adder to produce a result assuming a gate dela yof 2 ns?
A. 6 ns B. 12 ns C. 46 ns D. 98 ns
__B__ 34. How long will it take a 32-bit ripple carry adder to produce a result assuming a gate delay of 1 ns?
A. 12 ns B. 32 ns C. 33 ns D. 65 ns
__B__ 35. How long will it take a 32-bit carry-lookahead adder to produce a result assuming a gate delay of 1 ns?
A. 12 ns B. 32 ns C. 33 ns D. 65 ns

II. PROBLEM SOLVING [55 points]. All solutions/answers must be written on the space provided. Write your FINAL ANSWER on
the space provided for.

1. (15 points) Determine the time it takes to compute for the sum using ripple carry adders, carry-lookahead adders, and 4-bit adder
blocks in cascade. Assume that the gate delay is 0.6823 ns. Show your solution.

PROCESSORS tRCA TCLA TCOMBI


1. 16-bit CPU 22.5159 ns 4.0938 ns 8.1876
2. 32-bit CPU 44.3495 ns 4.0938 ns 13.646
3. 64-bit CPU 88.0167 ns 4.0938 ns 24.5628
4. 128-bit CPU 175.3511 ns 4.0938 ns 46.3964
5. 256-bit CPU 350.0199 ns 4.0938 ns 90.0636

Solution:

2. Given: MM size = 1,048,576 bytes.

[10 points] Assume that there is 32-bit processor, what are the byte and word numbers referred to by the following addresses?

Hexadecimal Address Word Number Byte Number


1. ACE01H 177024 1
2. BEA02H 195200 2
3. CA103H 206912 3
4. D1A04H 214657 0
5. 1ABCDH 27379 1

2SEM SY2018-2019 2ND LONG EXAMINATION Page 2 of 3


3. Given: MM size = 8MB
Cache size = 128KB
Block size = 512 bytes

[30 points] Using Direct Mapping, how many bits are for the word, block and tag fields? Determine the word, tag and memory
block numbers referred to by the following addresses. Write the answer on the space provided for.

# of tag bits # of block bits # of word bits


6 8 9

Hexadecimal Address TAG # BLOCK # WORD # MEMORY BLOCK #


1. 0AFEEH 0 87 494 87
2. 0B678H 0 91 120 91
3. OC456H 0 98 86 98
4. 0D321H 0 105 289 105
5. 0E579H 0 114 377 114

Solution:

-End-of-Exam-
“Not all of us can do great things, but we can do small things with great Love”
-Mother Teresa-

2SEM SY2018-2019 2ND LONG EXAMINATION Page 3 of 3

You might also like