Docsity

SPI_and_I2C_Interface_Design_Test.pdf, Exams of Digital Logic Design and Programming

Toggle sidebar
bg1
Independent Computer Engineering Practice Material Page 1
SPI and I2C Interface Design Test
Batch 4 · Exam 166 · 100 multiple-choice questions
Instructions
Choose the single best answer for each question. Each question has four options (A–D). The correct answer
and a concise explanation follow each question for self-study.
Scope and status
Independently prepared practice material. This is not an official examination or certification paper. Consult the applicable syllabus for
exact learning outcomes.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download SPI_and_I2C_Interface_Design_Test.pdf and more Exams Digital Logic Design and Programming in PDF only on Docsity!

SPI and I2C Interface Design Test

Batch 4 · Exam 166 · 100 multiple-choice questions

Instructions

Choose the single best answer for each question. Each question has four options (A–D). The correct answer

and a concise explanation follow each question for self-study.

Scope and status

Independently prepared practice material. This is not an official examination or certification paper. Consult the applicable syllabus for exact learning outcomes.

Questions, Answers & Explanations

1. After changing ROM, which practice best checks for unintended side effects?

A. Delete the old test results B. Run relevant regression tests and compare with a known baseline C. Skip tests if the build succeeds D. Avoid recording the build version Correct answer: B — Run relevant regression tests and compare with a known baseline Explanation: Regression tests help detect whether a change broke previously working behavior.

2. How should an engineer choose between alternative implementations of ROM?

A. Select the option with the most features regardless of need B. Compare requirement fit, constraints, performance, risk, and lifecycle cost C. Always choose the newest technology D. Make the choice without recording a rationale Correct answer: B — Compare requirement fit, constraints, performance, risk, and lifecycle cost Explanation: A defensible engineering choice considers requirements and constraints, then records the trade-off rationale.

3. What is the main engineering purpose of virtual memory in a computer system?

A. To support a defined function that can be evaluated against requirements B. To remove the need for verification C. To ensure components can never fail D. To eliminate design documentation Correct answer: A — To support a defined function that can be evaluated against requirements Explanation: virtual memory supports a defined system function. Requirements, verification, and documentation remain important.

4. Which evidence best demonstrates that virtual memory meets its specification?

A. A repeatable test with recorded measurements and pass criteria B. A verbal assurance without data C. A single power-on test regardless of function D. An unlabeled drawing Correct answer: A — A repeatable test with recorded measurements and pass criteria Explanation: Repeatable tests tied to acceptance criteria provide objective evidence of compliance.

5. A defect related to virtual memory occurs intermittently. What should an engineer do first?

A. Replace every nearby component immediately B. Reproduce the conditions and record inputs, timing, and measurements C. Ignore the issue until it becomes permanent D. Change several variables at once Correct answer: B — Reproduce the conditions and record inputs, timing, and measurements Explanation: Reproducing and documenting the fault helps isolate causes and preserves useful evidence.

6. Two modules interpret virtual memory differently. What is the best corrective action?

A. Agree on and document a common interface contract, then test both modules B. Allow each module to keep its own undocumented interpretation C. Remove integration testing D. Change an unrelated subsystem Correct answer: A — Agree on and document a common interface contract, then test both modules Explanation: A shared contract clarifies expected behavior and provides a basis for integration tests.

7. After changing virtual memory, which practice best checks for unintended side effects?

A. Delete the old test results B. Run relevant regression tests and compare with a known baseline C. Skip tests if the build succeeds D. Avoid recording the build version Correct answer: B — Run relevant regression tests and compare with a known baseline Explanation: Regression tests help detect whether a change broke previously working behavior.

15. A 4-bit unsigned counter holds 1111 n and is incremented by one. If it wraps modulo 16, what is the new value? (Related focus: memory hierarchy.)

A. 0000n B. 1000n C. 1110n D. 10000n Correct answer: A — 0000 n Explanation: Four bits represent 0–15. Incrementing 15 wraps to 0 in modulo-16 arithmetic.

16. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: cache.)

A. NOT A OR NOT B B. NOT A AND NOT B C. A AND B D. A OR NOT B Correct answer: B — NOT A AND NOT B Explanation: By De Morgan's law, NOT(A OR B) equals NOT A AND NOT B.

17. A 16-bit unsigned value can represent how many distinct values? (Related focus: RAM.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

18. A clock period is 4 ns. What is the corresponding frequency? (Related focus: ROM.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

19. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: virtual memory.)

A. 8% B. 20% C. 80% D. 125% Correct answer: C — 80% Explanation: Hit rate = 800 / 1,000 × 100 = 80%.

20. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: locality of reference.)

A. 0.06 W B. 1.5 W C. 5.3 W D. 15 W Correct answer: B — 1.5 W Explanation: P = V × I = 5 × 0.3 = 1.5 W.

21. A test suite has 72 passing tests out of 80. What percentage pass? (Related focus: memory hierarchy.)

A. 8% B. 80% C. 90% D. 92% Correct answer: C — 90% Explanation: 72 / 80 × 100 = 90%.

22. A system transfers 6,000 bytes in 2 seconds. What is the average transfer rate? (Related focus: cache.)

A. 300 B/s B. 3,000 B/s C. 6,002 B/s D. 12,000 B/s Correct answer: B — 3,000 B/s Explanation: Transfer rate = 6,000 / 2 = 3,000 bytes per second.

23. Which is the primary role of an interrupt in many processor systems? (Related focus: RAM.)

A. To notify the processor that an event may need service B. To permanently stop instruction execution C. To replace all memory D. To guarantee higher throughput in every workload Correct answer: A — To notify the processor that an event may need service Explanation: Interrupts notify the processor of events; the system's interrupt design determines how they are serviced.

24. Why should an ADC reference voltage be stable? (Related focus: ROM.)

A. It defines the input-voltage scale mapped to digital codes B. It makes sampling unnecessary C. It removes quantization D. It forces every reading to zero Correct answer: A — It defines the input-voltage scale mapped to digital codes Explanation: The reference sets the conversion range and therefore influences the mapping from input voltage to output code.

25. A 4-bit unsigned counter holds 1111 n and is incremented by one. If it wraps modulo 16, what is the new value? (Related focus: virtual memory.)

A. 0000n B. 1000n C. 1110n D. 10000n Correct answer: A — 0000 n Explanation: Four bits represent 0–15. Incrementing 15 wraps to 0 in modulo-16 arithmetic.

26. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: locality of reference.)

A. NOT A OR NOT B B. NOT A AND NOT B C. A AND B D. A OR NOT B Correct answer: B — NOT A AND NOT B Explanation: By De Morgan's law, NOT(A OR B) equals NOT A AND NOT B.

27. A 16-bit unsigned value can represent how many distinct values? (Related focus: memory hierarchy.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

28. A clock period is 4 ns. What is the corresponding frequency? (Related focus: cache.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

36. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: ROM.)

A. NOT A OR NOT B B. NOT A AND NOT B C. A AND B D. A OR NOT B Correct answer: B — NOT A AND NOT B Explanation: By De Morgan's law, NOT(A OR B) equals NOT A AND NOT B.

37. A 16-bit unsigned value can represent how many distinct values? (Related focus: virtual memory.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

38. A clock period is 4 ns. What is the corresponding frequency? (Related focus: locality of reference.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

39. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: memory hierarchy.)

A. 8% B. 20% C. 80% D. 125% Correct answer: C — 80% Explanation: Hit rate = 800 / 1,000 × 100 = 80%.

40. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: cache.)

A. 0.06 W B. 1.5 W C. 5.3 W D. 15 W Correct answer: B — 1.5 W Explanation: P = V × I = 5 × 0.3 = 1.5 W.

41. A test suite has 72 passing tests out of 80. What percentage pass? (Related focus: RAM.)

A. 8% B. 80% C. 90% D. 92% Correct answer: C — 90% Explanation: 72 / 80 × 100 = 90%.

42. A system transfers 6,000 bytes in 2 seconds. What is the average transfer rate? (Related focus: ROM.)

A. 300 B/s B. 3,000 B/s C. 6,002 B/s D. 12,000 B/s Correct answer: B — 3,000 B/s Explanation: Transfer rate = 6,000 / 2 = 3,000 bytes per second.

43. Which is the primary role of an interrupt in many processor systems? (Related focus: virtual memory.)

A. To notify the processor that an event may need service B. To permanently stop instruction execution C. To replace all memory D. To guarantee higher throughput in every workload Correct answer: A — To notify the processor that an event may need service Explanation: Interrupts notify the processor of events; the system's interrupt design determines how they are serviced.

44. Why should an ADC reference voltage be stable? (Related focus: locality of reference.)

A. It defines the input-voltage scale mapped to digital codes B. It makes sampling unnecessary C. It removes quantization D. It forces every reading to zero Correct answer: A — It defines the input-voltage scale mapped to digital codes Explanation: The reference sets the conversion range and therefore influences the mapping from input voltage to output code.

45. A 4-bit unsigned counter holds 1111 n and is incremented by one. If it wraps modulo 16, what is the new value? (Related focus: memory hierarchy.)

A. 0000n B. 1000n C. 1110n D. 10000n Correct answer: A — 0000 n Explanation: Four bits represent 0–15. Incrementing 15 wraps to 0 in modulo-16 arithmetic.

46. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: cache.)

A. NOT A OR NOT B B. NOT A AND NOT B C. A AND B D. A OR NOT B Correct answer: B — NOT A AND NOT B Explanation: By De Morgan's law, NOT(A OR B) equals NOT A AND NOT B.

47. A 16-bit unsigned value can represent how many distinct values? (Related focus: RAM.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

48. A clock period is 4 ns. What is the corresponding frequency? (Related focus: ROM.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

49. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: virtual memory.)

A. 8% B. 20% C. 80% D. 125% Correct answer: C — 80% Explanation: Hit rate = 800 / 1,000 × 100 = 80%.

57. A 16-bit unsigned value can represent how many distinct values? (Related focus: memory hierarchy.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

58. A clock period is 4 ns. What is the corresponding frequency? (Related focus: cache.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

59. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: RAM.)

A. 8% B. 20% C. 80% D. 125% Correct answer: C — 80% Explanation: Hit rate = 800 / 1,000 × 100 = 80%.

60. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: ROM.)

A. 0.06 W B. 1.5 W C. 5.3 W D. 15 W Correct answer: B — 1.5 W Explanation: P = V × I = 5 × 0.3 = 1.5 W.

61. A test suite has 72 passing tests out of 80. What percentage pass? (Related focus: virtual memory.)

A. 8% B. 80% C. 90% D. 92% Correct answer: C — 90% Explanation: 72 / 80 × 100 = 90%.

62. A system transfers 6,000 bytes in 2 seconds. What is the average transfer rate? (Related focus: locality of reference.)

A. 300 B/s B. 3,000 B/s C. 6,002 B/s D. 12,000 B/s Correct answer: B — 3,000 B/s Explanation: Transfer rate = 6,000 / 2 = 3,000 bytes per second.

63. Which is the primary role of an interrupt in many processor systems? (Related focus: memory hierarchy.)

A. To notify the processor that an event may need service B. To permanently stop instruction execution C. To replace all memory D. To guarantee higher throughput in every workload Correct answer: A — To notify the processor that an event may need service Explanation: Interrupts notify the processor of events; the system's interrupt design determines how they are serviced.

64. Why should an ADC reference voltage be stable? (Related focus: cache.)

A. It defines the input-voltage scale mapped to digital codes B. It makes sampling unnecessary C. It removes quantization D. It forces every reading to zero Correct answer: A — It defines the input-voltage scale mapped to digital codes Explanation: The reference sets the conversion range and therefore influences the mapping from input voltage to output code.

65. A 4-bit unsigned counter holds 1111 n and is incremented by one. If it wraps modulo 16, what is the new value? (Related focus: RAM.)

A. 0000n B. 1000n C. 1110n D. 10000n Correct answer: A — 0000 n Explanation: Four bits represent 0–15. Incrementing 15 wraps to 0 in modulo-16 arithmetic.

66. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: ROM.)

A. NOT A OR NOT B B. NOT A AND NOT B C. A AND B D. A OR NOT B Correct answer: B — NOT A AND NOT B Explanation: By De Morgan's law, NOT(A OR B) equals NOT A AND NOT B.

67. A 16-bit unsigned value can represent how many distinct values? (Related focus: virtual memory.)

A. 16 B. 256 C. 32, D. 65, Correct answer: D — 65, Explanation: A 16-bit field has 2¹n = 65,536 distinct bit patterns.

68. A clock period is 4 ns. What is the corresponding frequency? (Related focus: locality of reference.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

69. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: memory hierarchy.)

A. 8% B. 20% C. 80% D. 125% Correct answer: C — 80% Explanation: Hit rate = 800 / 1,000 × 100 = 80%.

70. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: cache.)

A. 0.06 W B. 1.5 W C. 5.3 W D. 15 W Correct answer: B — 1.5 W Explanation: P = V × I = 5 × 0.3 = 1.5 W.

78. A clock period is 4 ns. What is the corresponding frequency? (Related focus: ROM.)

A. 25 MHz B. 100 MHz C. 250 MHz D. 4 GHz Correct answer: C — 250 MHz Explanation: Frequency is 1/T = 1/(4 × 10nn s) = 250 MHz.

79. What is the main engineering purpose of memory hierarchy in a computer system?

A. To support a defined function that can be evaluated against requirements B. To remove the need for verification C. To ensure components can never fail D. To eliminate design documentation Correct answer: A — To support a defined function that can be evaluated against requirements Explanation: memory hierarchy supports a defined system function. Requirements, verification, and documentation remain important.

80. Which evidence best demonstrates that memory hierarchy meets its specification?

A. A repeatable test with recorded measurements and pass criteria B. A verbal assurance without data C. A single power-on test regardless of function D. An unlabeled drawing Correct answer: A — A repeatable test with recorded measurements and pass criteria Explanation: Repeatable tests tied to acceptance criteria provide objective evidence of compliance.

81. A defect related to memory hierarchy occurs intermittently. What should an engineer do first?

A. Replace every nearby component immediately B. Reproduce the conditions and record inputs, timing, and measurements C. Ignore the issue until it becomes permanent D. Change several variables at once Correct answer: B — Reproduce the conditions and record inputs, timing, and measurements Explanation: Reproducing and documenting the fault helps isolate causes and preserves useful evidence.

82. Two modules interpret memory hierarchy differently. What is the best corrective action?

A. Agree on and document a common interface contract, then test both modules B. Allow each module to keep its own undocumented interpretation C. Remove integration testing D. Change an unrelated subsystem Correct answer: A — Agree on and document a common interface contract, then test both modules Explanation: A shared contract clarifies expected behavior and provides a basis for integration tests.

83. After changing memory hierarchy, which practice best checks for unintended side effects?

A. Delete the old test results B. Run relevant regression tests and compare with a known baseline C. Skip tests if the build succeeds D. Avoid recording the build version Correct answer: B — Run relevant regression tests and compare with a known baseline Explanation: Regression tests help detect whether a change broke previously working behavior.

84. How should an engineer choose between alternative implementations of memory hierarchy?

A. Select the option with the most features regardless of need B. Compare requirement fit, constraints, performance, risk, and lifecycle cost C. Always choose the newest technology D. Make the choice without recording a rationale Correct answer: B — Compare requirement fit, constraints, performance, risk, and lifecycle cost Explanation: A defensible engineering choice considers requirements and constraints, then records the trade-off rationale.

85. What is the main engineering purpose of cache in a computer system?

A. To support a defined function that can be evaluated against requirements B. To remove the need for verification C. To ensure components can never fail D. To eliminate design documentation Correct answer: A — To support a defined function that can be evaluated against requirements Explanation: cache supports a defined system function. Requirements, verification, and documentation remain important.

86. Which evidence best demonstrates that cache meets its specification?

A. A repeatable test with recorded measurements and pass criteria B. A verbal assurance without data C. A single power-on test regardless of function D. An unlabeled drawing Correct answer: A — A repeatable test with recorded measurements and pass criteria Explanation: Repeatable tests tied to acceptance criteria provide objective evidence of compliance.

87. A defect related to cache occurs intermittently. What should an engineer do first?

A. Replace every nearby component immediately B. Reproduce the conditions and record inputs, timing, and measurements C. Ignore the issue until it becomes permanent D. Change several variables at once Correct answer: B — Reproduce the conditions and record inputs, timing, and measurements Explanation: Reproducing and documenting the fault helps isolate causes and preserves useful evidence.

88. Two modules interpret cache differently. What is the best corrective action?

A. Agree on and document a common interface contract, then test both modules B. Allow each module to keep its own undocumented interpretation C. Remove integration testing D. Change an unrelated subsystem Correct answer: A — Agree on and document a common interface contract, then test both modules Explanation: A shared contract clarifies expected behavior and provides a basis for integration tests.

89. After changing cache, which practice best checks for unintended side effects?

A. Delete the old test results B. Run relevant regression tests and compare with a known baseline C. Skip tests if the build succeeds D. Avoid recording the build version Correct answer: B — Run relevant regression tests and compare with a known baseline Explanation: Regression tests help detect whether a change broke previously working behavior.

90. How should an engineer choose between alternative implementations of cache?

A. Select the option with the most features regardless of need B. Compare requirement fit, constraints, performance, risk, and lifecycle cost C. Always choose the newest technology D. Make the choice without recording a rationale Correct answer: B — Compare requirement fit, constraints, performance, risk, and lifecycle cost Explanation: A defensible engineering choice considers requirements and constraints, then records the trade-off rationale.

91. What is the main engineering purpose of RAM in a computer system?

A. To support a defined function that can be evaluated against requirements B. To remove the need for verification C. To ensure components can never fail D. To eliminate design documentation Correct answer: A — To support a defined function that can be evaluated against requirements Explanation: RAM supports a defined system function. Requirements, verification, and documentation remain important.

99. A defect related to ROM occurs intermittently. What should an engineer do first?

A. Replace every nearby component immediately B. Reproduce the conditions and record inputs, timing, and measurements C. Ignore the issue until it becomes permanent D. Change several variables at once Correct answer: B — Reproduce the conditions and record inputs, timing, and measurements Explanation: Reproducing and documenting the fault helps isolate causes and preserves useful evidence.

100. Two modules interpret ROM differently. What is the best corrective action?

A. Agree on and document a common interface contract, then test both modules B. Allow each module to keep its own undocumented interpretation C. Remove integration testing D. Change an unrelated subsystem Correct answer: A — Agree on and document a common interface contract, then test both modules Explanation: A shared contract clarifies expected behavior and provides a basis for integration tests.