Docsity

Serial_Communication_with_Microcontrollers_Exam.pdf, Exams of Programmable Logic Controllers

Toggle sidebar
bg1
Independent Computer Engineering Practice Material Page 1
Serial Communication with Microcontrollers
Exam
Batch 4 · Exam 165 · 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 Serial_Communication_with_Microcontrollers_Exam.pdf and more Exams Programmable Logic Controllers in PDF only on Docsity!

Serial Communication with Microcontrollers

Exam

Batch 4 · Exam 165 · 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. How should an engineer choose between alternative implementations of data representation?

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.

2. What is the main engineering purpose of binary arithmetic 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: binary arithmetic supports a defined system function. Requirements, verification, and documentation remain important.

3. Which evidence best demonstrates that binary arithmetic 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.

4. A defect related to binary arithmetic 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.

5. Two modules interpret binary arithmetic 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.

6. After changing binary arithmetic, 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.

7. How should an engineer choose between alternative implementations of binary arithmetic?

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.

15. Which evidence best demonstrates that overflow 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.

16. A defect related to overflow 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.

17. Two modules interpret overflow 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.

18. After changing overflow, 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.

19. How should an engineer choose between alternative implementations of overflow?

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.

20. What is the main engineering purpose of fixed-point data 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: fixed-point data supports a defined system function. Requirements, verification, and documentation remain important.

21. Which evidence best demonstrates that fixed-point data 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.

22. A defect related to fixed-point data 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.

23. Two modules interpret fixed-point data 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.

24. After changing fixed-point data, 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.

25. How should an engineer choose between alternative implementations of fixed-point data?

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.

26. What is the main engineering purpose of character encoding 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: character encoding supports a defined system function. Requirements, verification, and documentation remain important.

27. Which evidence best demonstrates that character encoding 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.

28. A defect related to character encoding 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.

36. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: fixed-point data.)

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

37. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: character encoding.)

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.

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

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

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

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.

40. Which is the primary role of an interrupt in many processor systems? (Related focus: signed values.)

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.

41. Why should an ADC reference voltage be stable? (Related focus: overflow.)

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.

42. 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: fixed-point data.)

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.

43. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: character encoding.)

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.

44. A 16-bit unsigned value can represent how many distinct values? (Related focus: data representation.)

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.

45. A clock period is 4 ns. What is the corresponding frequency? (Related focus: binary arithmetic.)

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.

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

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

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

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.

48. A test suite has 72 passing tests out of 80. What percentage pass? (Related focus: fixed-point data.)

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

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

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.

57. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: binary arithmetic.)

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.

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

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

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

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.

60. Which is the primary role of an interrupt in many processor systems? (Related focus: fixed-point data.)

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.

61. Why should an ADC reference voltage be stable? (Related focus: character encoding.)

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.

62. 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: data representation.)

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.

63. Which Boolean expression is equivalent to NOT(A OR B)? (Related focus: binary arithmetic.)

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.

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

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.

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

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.

66. A cache has 800 hits in 1,000 accesses. What is its hit rate? (Related focus: fixed-point data.)

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

67. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: character encoding.)

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.

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

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

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

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.

70. Which is the primary role of an interrupt in many processor systems? (Related focus: signed values.)

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.

78. A test suite has 72 passing tests out of 80. What percentage pass? (Related focus: fixed-point data.)

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

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

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.

80. Which is the primary role of an interrupt in many processor systems? (Related focus: data representation.)

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.

81. Why should an ADC reference voltage be stable? (Related focus: binary arithmetic.)

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.

82. 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: signed values.)

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.

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

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.

84. A 16-bit unsigned value can represent how many distinct values? (Related focus: fixed-point data.)

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.

85. A clock period is 4 ns. What is the corresponding frequency? (Related focus: character encoding.)

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.

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

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

87. A 5 V source supplies 0.3 A. What is the ideal power delivered? (Related focus: binary arithmetic.)

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.

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

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

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

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.

90. Which is the primary role of an interrupt in many processor systems? (Related focus: fixed-point data.)

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.

91. Why should an ADC reference voltage be stable? (Related focus: character encoding.)

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.

99. Two modules interpret data representation 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.

100. After changing data representation, 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.