Docsity

Embedded Final || A+ Graded Already., Exams of Computer Security

Toggle sidebar
bg1
Embedded Final || A+ Graded Already.
L2
Order the abstraction levels from low to high correct answers atoms
transistors
gates
digital circuits
architectural units (cash, register file, FIFO, ALU)
system components (CPU, UART, RAM)
L2
Which file types are mostly or entirely in machine language binary and unintelligible to humans?
C File
Assembly file
Object file
Executable file correct answers C File -- Int
Assembly file -- Int
Object file -- Unint
Executable file -- Unint
L2
(T/F) The compiler that is used inside CCS (Code Composer Studio) for compiling C code to be
executed on MPS432 chip is a native compiler. correct answers False
L2
The tool that translates high-level language to assembly is called _____
The tool that combines object files to create one executable is called _____
The tool that translates assembly to machine code is called ____ correct answers Compiler
Linker
Assembler
L2
(T/F)
- A computer is a device that has a keyboard and a monitor and can run arithmetic and logical
operations.
- All computer systems are embedded systems.
- All embedded systems are computer systems.
- Embedded systems always use low-end microcontrollers rather than high-end microprocessors.
- In today's world, embedded systems consist of about 90% of the computer systems. correct
answers F
F
T
F
F
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download Embedded Final || A+ Graded Already. and more Exams Computer Security in PDF only on Docsity!

Embedded Final || A+ Graded Already.

L

Order the abstraction levels from low to high correct answers atoms transistors gates digital circuits architectural units (cash, register file, FIFO, ALU) system components (CPU, UART, RAM) L Which file types are mostly or entirely in machine language binary and unintelligible to humans? C File Assembly file Object file Executable file correct answers C File -- Int Assembly file -- Int Object file -- Unint Executable file -- Unint L (T/F) The compiler that is used inside CCS (Code Composer Studio) for compiling C code to be executed on MPS432 chip is a native compiler. correct answers False L The tool that translates high-level language to assembly is called _____ The tool that combines object files to create one executable is called _____ The tool that translates assembly to machine code is called ____ correct answers Compiler Linker Assembler L (T/F)

  • A computer is a device that has a keyboard and a monitor and can run arithmetic and logical operations.
  • All computer systems are embedded systems.
  • All embedded systems are computer systems.
  • Embedded systems always use low-end microcontrollers rather than high-end microprocessors.
  • In today's world, embedded systems consist of about 90% of the computer systems. correct answers F F T F F

L

How many PCB boards are there in the Launchpad and Boosterpack? correct answers 2 L (T/F) MCU (Microcontroller unit) consists of a CPU (Central Processing Unit), memory and some other peripherals. correct answers True L (Y/N) Is any of the following components part of MSP432 MCU?

  • simple peripherals such as buttons and LEDs
  • Blocks that are in charge of reset, clock, and power
  • Several timers
  • Different types of memory
  • Analog interface including ADC (Analog to Digital Converter)
  • Digital interface including UART SPI, I2C, I/O ports
  • CPU correct answers N Y Y Y Y Y Y L What is the XDS What is the MSP432 correct answers - the is the emulator on the launchpad board that helps program/debug the main microcontroller
  • the main microcontroller on the Launchpad board L On the Launchpad, how many chips (also known as microchips, or IC's) are there? correct answers More than 4 L For the following components, choose if they're related to the Boosterpack, Launchpad, or MSP432 chip.
  • Joystick
  • ADC (Analog-to-Digital Converter)
  • Large round S1 and S2 buttons
  • Timer_A
  • Timer
  • UART
  • micro-USB port
  1. A struct in the C programming language is a composite data type (or record) declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer.
  2. In C, a struct can be returned value of a function.
  3. In C, it is possible to pass a struct to a function by its pointer and get it modified by the function. correct answers True True True L Consider an 8-bit number A is equal to 11001100. What can we say about value of A in decimal? correct answers It can be either -52 or 204. L Which one of the following numbers can fit in a 2's complement 16-bit register? correct answers -2^ L How many bits in a signed character? correct answers 8 L How many bits in an integer (MSP432)? correct answers 32 L Does adding 0x0fffefee and 0x0efffffff result in an overflow? correct answers We do not have sufficient information to answer this question with yes or no. L What is the lowest number that can be stored in a signed short? (Hint: A C short is two bytes.) correct answers -2^ L What is the highest number that can be stored in an unsigned long? (Hint: A C long is four bytes.) correct answers 2^32- L Which one is bit 23 mask (BIT23)? correct answers (1<<23) L A single-bit bitmask is a bitstring where all the bits are 0 except for a single bit, which is 1. If that single bit is located at index i, we call the bitmask BITi. For example, BIT0 is equal to 1 and BIT1 is equal to 2 and BIT2 is equal to 4, and so on. If we intend to reset bits 10 and 20 of an integer, and we like to create a macro mask, what should go in the blank space below?. If we intend to reset bits 10 and 20 of an integer, and we like to create a macro mask, what should go in the blank space below?

#define NEW_MASK .... x = x & ~NEW_MASK; A. (BIT10 | BIT20) B. BIT10 | BIT C. BIT10 & BIT D. ~(BIT10 | BIT20) correct answers A L Which one is bit 4 mask? A. 2^ B. 2^ C. 2^3 correct answers 2^ L A C expression to compute a * 19 (a times 19) is: (Recall that one time shift to left doubles an integer. ) A. (a << 16) + (a << 3); B. (a << 4) + (a << 1) + a; C. (a << 4) + (a << 1) + 1; D. (a << 4) + (a << 2) + a; correct answers B L What selects a certain input among multiple inputs? What is able to cut off a path in the circuit? What can act as a basic analog to digital converter? correct answers Multiplexor Tri-state buffer Schmitt trigger L On the Launchpad board, Button 2 is connected to Port __ , Pin __ and the red LED is connected to Port __ , Pin __. correct answers 1, 2, L (T/F) In MSP432, a digital I/O cannot be used for any other purpose such as an analog input. In MSP432, any digital I/O pin can be configured to be a digital input. In MSP432, any digital I/O pin can be configured to be a digital output. In MSP432, a digital input can use any of these three options: 1) attached pull-up resistor, 2) attached pull-down resistor, 3) no attached resistor. correct answers F T T T

Two Three Three L (T/F) One single port has multiple memory addresses that are associated with different pins One single port has multiple memory addresses that are associated with different functionalities. One single port has one single memory address. One single pin has one single memory address. correct answers F T F F L (T/F) Consider typical 32-bit and 16-bit microcontrollers (Links to an external site.) and choose which of the below statements are true or false. The datapath of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. The address bus of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. The Registers of a 32-bit microcontroller have twice as many bits as a 16-bit microcontroller. The ALU of a 32-bit microcontroller is capable of handling operands that are twice as wide as a 16-bit microcontroller. The address space of a 32-bit microcontroller is twice as big of a 16-bit microcontroller. f correct answers T T T T F L (T/F) In memory-mapped i/o, peripherals and memory certainly share a physical address bus. In memory-mapped i/o, peripherals and memory certainly share the same address space. In memory-mapped i/o, memory and the peripherals may share a physical address bus. In memory-mapped i/o, the processor uses the same instruction for reading from memory and reading from an i/o. correct answers F T T T L (T/F) API is a special form of HAL.

HAL is a special form of API. HAL functions can be found in the driverlib manual. We can use driverlib functions to develop (implement or write the code for) HAL. HAL stands for Hardware Abstraction Level. Driverlib is a form of API. Driverlib is a form of HAL. correct answers F T F T F T F L For each of the programming methods, choose whether the high-level code can be easily ported from one processor, such as MSP432, to another processor, such as PIC32. noHAL_noDriverlib: not portable noHAL_Driverlib: not portable HAL_noDriverlib portable correct answers Not portable Not portable Portable L What is the reason to use HAL? Choose "yes" for all that applies. It makes the code more readable. It makes the code easier to port from one processor to another. It reduces the size of the machine code binary after compilation. It improves the efficiency of the program (e.g. it becomes faster or uses fewer resources.) correct answers Yes Yes No No L What can you say about FSM? Choose between T/F. FSM stands for Finite State Machine. FSM is a mathematical model of computation. FSM is an abstract machine. FSM is the C code that implements a certain algorithm. FSM is a mechanical machine that is capable of doing calculations. FSM is a machine that can go into an infinite number of states.

A. Graphics_drawString(g_sContext_p, (int8_t *)"Test", -1, 10, 10, true); B. Graphics_drawString(g_sContext_p, (int8_t *)"Test", -1, 10, 10, false); C. Graphics_drawString(g_sContext_p, (int8_t *)"Test", 0, 10, 10, false); correct answers A L Choose if the below statements on the subject of debouncing buttons (switches) are true or false. Switch debouncing is some form of signal filtering. When we press a button, the two metals of the button do not create instant contact, instead, they connect and disconnect several times until they settle in the pressed state and remain connected. There is only one method to debounce a button. Switch debouncing is some form of signal amplification. Switch debouncing creates the illusion of a perfect switch to the user. In an FSM, it is possible that some inputs are Don't Care for some of the transition arcs. It is possible to use analog components such as resistors and capacitances to debounce a switch. correct answers T T F F T T T L In terms of duplex: What is SPI? What is I2C? What is UART? correct answers Full Half Full L In terms of serial or otherwise: What is SPI? What is I2C? What is UART? correct answers Serial Serial Serial L In terms of synchronous or asynchronous: What is SPI?

What is I2C? What is UART? correct answers S S A L Consider a communication scheme where each symbol (baud) represents two bits. If the bitrate in this communication is 10 Kbit/sec, what is the baudrate? correct answers 5k L Consider a communication scheme where the bitrate is 1 Mbit/sec. The bits are packaged as packets of 20 bits, where 4 bits are used to specify the start and stop of the package and other protocol-related information. The rest of the bits are data bit. What is the data rate (in bits per second)? correct answers 0.8M L What is the odd parity for this 8-bit piece of data 10101111? What is the even parity for this 8-bit piece of data 11101111? correct answers 1 1 L What are the number of bits in a UART packet of data with the default number of start bits, 8 data bits, 2 stop bits, and no parity bits? correct answers 11 L (T/F) In UART, sender, and transmitter share a clock signal. In UART, baud rate is equal to bit rate. In UART, bit rate is equal to data rate. correct answers F T F L (T/F) UART is asynchronous. UART is always half-duplex. UART has two data lines between sender and transmitter. correct answers T F T L Assume we are transmitting single bytes with a parity bit. Choose T/F. When sending ASCII of 'L', the odd parity is 0. When sending 0x23, the even parity is 0.

Where is the best place to keep project variables, such as FSM states? correct answers in an application struct L Choose T/F: Launchpad has a dedicated serial port for UART communication. Most modern laptops have a dedicated serial port for UART communication. The UART frame arriving at Launchpad port is routed directly to MSP432. MobaXterm is an application that provides a variety of communication terminals including serial (UART). XDS11 receives a USB package from the Launchpad USB port and converts it to a UART frame before passing it to MSP432. correct answers F F F T T L According to the Launchpad schematics, XDSET_RXD is ..... correct answers directly across P1.3_BCLUART_TXD and is connected to it when a jumper is present. L According to MSP432 datasheet, is it possible for P2.3 to have the below roles? Choose Y/N

  1. RXD (Rx of UART)
  2. TXD( Tx of UART)
  3. SIMO (SIMO of SPI)
  4. SOMI (SOMI of SPI) correct answers N Y Y N L Which one of the below components is part of a UART module on MSP432? Choose between "Yes" and "No" Transmit State Machine Transmit shift register Receive shift register Baud rate generator The error flag generator Transmit and Receive buffers correct answers y y y

y y y L Which one is the correct formula for UCBRF where N is the division factor? A. INT(N/16) B. INT([(N/16) - INT(N/16)] × 16) C. INT([(N/16) - INT(N/16)] / 16) D. INT([(N16) - INT(N16)] / 16) correct answers B L Which of these functions were written by the device manufacturer (part of Driverlib or Grphics library), and which were written by the application programmer (Matthew Zhong and Leyla Nazhand-Ali)? GFX_print Graphics_drawString GFX_removeSolidCircle LED_isLit correct answers AP DM AP AP L (T/F) HAL_refresh and App_GuessTheColor_loop could be called in any order. correct answers True L Choose if any of the below computer systems is working under real-time constraints or not? A small microcontroller implementing the anti-lock brake system of a car. A massive supercomputer which is performing DNA sequencing. The MCU inside a joystick that handles the joystick operations. A laptop zipping up a large folder while the human user is anxiously waiting. correct answers Y N Y N L What is the clock frequency of a processor whose clock period is 1ms? correct answers 1kHz L

You can have an unlimited number of software timers. In the Guess-the-Color project, Timer.h can be found in the HAL folder. correct answers T T T L How do we initialize a SW timer to wait for 8 seconds? correct answers SWTimer_construct(8000) L SWTimer_elapsedCycles is called when using which functionality? (Check all that apply.)

  1. stopwatch
  2. timer
  3. percentage of time elapsed correct answers 1, 2, AND 3 L Which of the following is the correct way to start the SW timer defined earlier in the code as blinkingTimer? A. SWTimer_start(blinkingTimer); B. SWTimer_start(*blinkingTimer); C. SWTimer_start(&blinkingTimer); correct answers C L (T/F) Consider an A/D with n = 4 and Vref- = 0V and Vref+ = 4V. Assume the A/D uses the floor of the conversion formula when turning non-integers to integers. There are 16 possible digital outputs. If the input is 0 V, the output is 0000. The voltage value of LSB is 0.25 V. If the input voltage is 0.95, the output is 0011. The A/D analog span is 4 V. If the input voltage is 1.95, the output is 1000. correct answers T T T T F F L (T/F) Consider an A/D with n =1, Vref - = 0V, Vref+ = 1V. Assume the A/D uses the floor of the conversion formula when turning non-integers to integers. If the input is 0.4 V, The output is 0. If the input is 0.7 V, The output is 0.

LSB is worth 0.5 V. correct answers T F T L Consider two A/Ds n= 4, Vref-=0, Vref+=2V n = 8, Vref-=-1V, Vref+ = 1V Choose all that is correct. The digital resolution of the second A/D is higher than the first one. The voltage resolution (1LSB or analog resolution) of the second A/D is larger than the first one. Both A/D have the same full-scale range or analog range. correct answers T F T L Consider a D/A with n = 2, Vref- = -1V and Vref+ = +1V. Choose all that is correct. The LSB is worth 0.5V. If the input is 00, the output is -1V. If the input is 11, the output is +1V. If the input is 10, the output is 0V. The digital resolution is 2 bits. The analog resolution is 2/3 of a volt. correct answers T T F T T F L Assume we have recorded the conversion result of the microphone input in 15th storage location of the ADC. Which instruction correctly reads the result? A. int *result = ADC14_getResult(14); B. int result = ADC14_getResult(14); C. int *result = ADC14_getResult(ADC_MEM14); D. int result = ADC14_getResult(ADC_MEM14); correct answers D L In a binary-weighted ladder D/A with n = 8, if the resistor attached to MSB is 256 kilo-ohm, what is the resistance of the resistor connected to LSB? correct answers ~33 Mega-ohm L

For a signal with the bandwidth of 1KHz, what is the minimum sampling rate that guarantees the sampled data is free of distortion, i.e. it is close enough to the original signal? correct answers 2000 samples per second L Assume you have used Equation 11 of chapter 22 in MSP432 user manual and based on the values at hand in your A/D setup, you have figured that the right side of the inequality is 1ms. What can you say about the sampling speed? It is more than or equal to 1000 samples per second. It is less than or equal to 1000 samples per second. It is equal to 1000 samples per second. correct answers It is less than or equal to 1000 samples per second. L Assume in an A/D the maximum possible sampling rate is 4000 samples per second. What is the maximum possible bandwidth of a signal we can sample without distortion? correct answers 2kHz L (T/F) Between an A/D and D/A with the same number of bits, building an A/D is always more costly than D/A. correct answers T L What is the number of amplifiers needed in an n-bit A/D flash converter? correct answers 2^n - 1 L Which statements are true about SAR and flash converter? They are both Analog to Digital converters. SAR is smaller but slower compared to the flash converter. SAR is both smaller and faster than the flash converter. correct answers T T F L For a SAR A/D with n = 10, what is the first digital guess? correct answers 512 L Mechanism of SAR implementation is based on binary search linear search machine learning

op-amps with feedback. correct answers binary search L For a 10-bit SAR resolving one bit takes 1us. In other words, one round of making a digital guess, D/A conversion, comparison with the analog input and finally making a decision about the bit at hand takes 1us. How long does it take to do a complete conversion of an analog input? We do not have enough information. always 1us. always 10us. on avarage 5us. correct answers always 10us. L Consider a processor that uses a Timer32 to generate PWM. Imagine a situation when the PWM is in the "on" cycle and the processor gets busy with another task, and therefore, is not able to change the "on" state to "off" state at the right moment. Nevertheless, the processor is not busy during the "off" cycle and switches back to the "on" cycle at the proper time. What happens to the PWM? The duty cycle of the PWM goes higher than the desired value. The duty cycle of the PWM goes lower than the desired value. The duty cycle of the PWM does not change, but the whole pulse gets shifted (delayed) correct answers The duty cycle of the PWM goes higher than the desired value. L (T/F)

  1. We can use Timer32 to generate a square wave with a varying duty cycle (PWM).
  2. Using PWM is an expensive, but highly effective control solution for applications such as motor speed control, oven temperature control, etc.
  3. In order to know our exact location on earth, we use an accurate measurement of time (as in GPS). correct answers T F T L The PWM is NOT suitable for which of the below applications? steering a self-driving car control the speed of a motor control the temperature of an oven create a certain RGB color mix correct answers steering a self-driving car L Choose True/False: