Microprocessors - Final Exam (2020 Fall)
Microprocessors - Final Exam (2020 Fall)
1 21
2 22
3 23
4 24
5 25
6 26
7 27
8 28
9 29
10 30
11 31
12 32
13 33
14 34
15 35
16 36
17 37
18 38
19 39
20 40
Q
Quueessttiioon
n 11 - How to reset only the 15th bit on a register?
A. REG |= ~0x8000;
B. REG &= ~0x8000;
C. REG &= 0x8000;
D. REG ^= ~0x8000;
E. REG |= 0x8000;
Q
Quueessttiioon
n 22 - For a system with 4 sensor connected using SPI protocol, how many pins need to be wired (excluding vdd and ground) to the
microcontroller?
A. 4
B. 2
C. 3
D. 7
E. 8
Q
Quueessttiioon
n 33 - Which one of the following is NOT one of the purposes of a semaphore usage?
A. x &= 0x01;
B. x | 0x01;
C. x |= 0x01;
D. x &= ~0x01;
E. x |= ~0x01;
Q
Qu n 55 - How can we see printf function over a UART line properly?
ueessttiioon
Q
Quueessttiioon
n66 - Which of the following most accurately describes the use of the static keyword?
A. A variable declared static within the body of a function maintains its value between function invocations.
B. A variable declared static outside the body of a function can be accessed by any function.
C. A function declared static cannot be called and will be optimized.
D. A variable declared static within the body of a function has no meaning.
E. A variable declared static outside the body of a function has no meaning.
Q
Quueessttiioon
n 77 - Which of the following is not inside a program image?
A. vector table
B. startup code
C. reset handler
D. application code
E. heap code
Q
Quueessttiioon
n88 - What can we say about v if the resulting f is true for v > 0?
1 f = (v & (v - 1)) == 0;
2
A. v is a power of 2
B. v is even number
C. v is odd number
D. v is negative integer
E. v is positive integer
Q
Quueessttiioon
n99 - What is the race condition?
Q
Quueessttiioon
n 110
0 - How long (rougly) it takes to transfer 10 bytes of data for 8N1 UART setup for 9600 baud?
A. 1 ms
B. 10 ms
C. 100 ns
D. 1000 ms
E. 100 ms
Q
Quueessttiioon
n 1111 - What is the purpose of the following code piece?
1 ffoorr (c = 0; v; v >>= 1)
2 {
3 c += v & 1;
4 }
5
Q
Qu n 1122 - Which of the following statements accurately describes the intended e!ect of the declaration int (*a)[10];?
ueessttiioon
Q
Quueessttiioon
n 1133 - Which of the following is responsible for interrupt management and prioritization?
A. SCS
B. Stack
C. RISC
D. Vector Table
E. NVIC
Q
Quueessttiioon
n 114
4 - How to set only the 5th bit on a register?
A. REG ^= ~0x0020;
B. REG |= 0x0020;
C. REG &= 0x0020;
D. REG |= ~0x0020;
E. REG &= ~0x0020;
Q
Quueessttiioon
n 1155 - Which of the following is used to describe an architecture that use a common bus for both data and code?
A. von Neumann
B. Register-Register
C. FISC
D. LISC
E. Harvard
Q
Quueessttiioon
n 116
6 - Which of the following is a memory format that holds the lowest byte in lower address?
Q
Quueessttiioon
n 1177 - Which one of the following is an true for using a non-preemptive kernel in RTOS.
Q
Quueessttiioon
n 118
8 - Which of the following is the most flexible way to declare a C preprocessor macro that takes two arhuments and returns the smaller of
their two values?
Q
Quueessttiioon 9 - What is the result of the following operation assuming A = 0x1234?
n 119
1 A &= ~0xFFDF;
2
A. 0xFFFF1234
B. 0x1234FFDF
C. 0x00000020
D. 0x12340000
E. 0x00001234
Q
Quueessttiioon
n 220
0 - Which of the following is NOT a type of real-time system?
Q
Quueessttiioon
n 2211 - Which one of the following best describes context switching?
A. A global variable that only used in one function for both reading and writing.
B. We don’t really need volatile keyword, let’s take it out in the next standard.
C. A variable used for a loop.
D. A private variable used within a function.
E. A global variable used within an interrupt service routine.
Q
Quueessttiioon
n 2233 - What is the purpose of an open-drain connection?
Q
Quueessttiioon
n 224
4 - Which of the following best describes a Successive Approximation ADC?
Q
Qu n 2255 - Which of the following is a correct way to write the value 0xAA33 to the physical memory address 0x1234?
ueessttiioon
Q
Quueessttiioon 6 - Which of the following best describes POP operation?
n 226
A. Memory content for the bottom of the stack is written to the register in the instruction, then pointing location is incremented by 4.
B. Memory content for the top of the stack is written to the register in the instruction, then pointing location is decremented by 4.
C. Memory content for the bottom of the stack is written to the register in the instruction, however, pointing location is not changed.
D. Memory content for the bottom of the stack is written to the register in the instruction, then pointing location is decremented by 4.
E. Memory content for the top of the stack is written to the register in the instruction, then pointing location is incremented by 4.
Q
Quueessttiioon
n 2277 - What is the purpose of a Sample and Hold circuit for an ADC?
Q
Quueessttiioon
n 228
8 - Which of the following is an example real-time system that can be used for an avionics weapon delivery system in which pressing a
button launches a missile?
Q
Quueessttiioon 9 - Which of the following is the most portable way to declare a C preprocessor constant for the number of seconds in a non-leap calendar
n 229
year?
Q
Quueessttiioon
n 330
0 - Which of the following is not a valid exception state?
A. Suspended
B. Inactive
C. Pending
D. Active and Pending
E. Active
Q
Quueessttiioon
n 3311 - What is the purpose of a Watchdog Timer?
Q
Quueessttiioon
n 3322 - Which of the following is a memory usage mechanism that allows users to dynamically allocate space?
A. Page
B. Heap
C. Stack
D. Book
E. Scratchpad
Q
Quueessttiioon
n 3333 - WHich one of the following is the responsibility for a minimal RTOS?
A. User Interface
B. Task scheduling
C. Input/Output services
D. Logging
E. Memory protection
Q
Quueessttiioon
n 334
4 - How does I2C devices know that there is a transmission happening?
A. When there is a high-to-low transition on data line when clock line is high
B. When there is a 1 bit sent
C. When the chip select line is activated
D. When there is a low-to-high transition on data line when clock line is high
E. When there is a 0 bit sent
Q
Quueessttiioon
n 3355 - Which of the following is not a common memory section?
A. text
B. array
C. stack
D. data
E. bss
Q
Quueessttiioon
n 336
6 - Which of the following is a memory usage mechanism that allows the system memory to be used as temporary data storage?
A. Stack
B. Page
C. Heap
D. Book
E. Scratchpad
Q
Quueessttiioon
n 3377 - Which of the following can be defined as the specific arrangements of the registers, ALUs, FSMs, memories and other logic building
blocks?
A. Microcontroller
B. Pipeline
C. Processor
D. Microarchitecture
E. Instruction Set Architecture
Q
Quueessttiioon
n 338
8 - What are the first two addresses of the Vector Table?
Q
Quueessttiioon
n 339
9 - Which of the following can be defined as the programmer’s view of the computer?
A. Pipeline
B. Instruction Set Architecture
C. Microcontroller
D. Processor
E. Microarchitecture
Q
Quueessttiioon
n440
0 - What is starving?
A. Functions (or tasks) not getting compiled at compile-time due to size optimization.
B. Functions (or tasks) not getting compiled at compile-time due to speed optimization.
C. Functions (or tasks) not getting compatible parameters on run-time.
D. Functions (or tasks) not having enough time to run.
E. Functions (or tasks) not getting the necessary parameters on run-time.