Model Midterm Term

.pdf

School

New Jersey Institute Of Technology *

*We aren’t endorsed by this school

Course

CS 610

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

5

Uploaded by SuperMagpie4063

Report
ECE 692 Spring 2021 Midterm 1. ELFs are made by a) gcc b) objcopy c) makeelf d) sudo rm -rf 2. Compilers are used to make a) object, linkable, and/or executable files. b) linker scripts. c) immutable directories. d) Micro-controllers. 3. What is the value of the overflow flag for this, A+B, example? The dots can have any binary values. A01.. 2 B01.. 2 a) V=1 b) V=0 c) V=100? 4. (Ref) R0 = 11101 2 SUBS R3, R0, R1 ; What are the values for the C, Z, V, and N flags? Assume that starting point of the flags are C=1, Z=0, V=0, and N=0. a) C=1, V=0, Z=0, N=0 b) C=0, V=0, Z=0, N=0 c) C=1, V=1, Z=0, N=0 d) C=1, V=0, Z=0, N=1 5. Unsigned subtraction is correct when the carry flag is 0. a) False b) True 6. Shift operations possibly can change the carry and overflow flags. a) False b) True 7. Thumb-2 instruction set allows a) 16/32 bits instructions that are a trade-off between CPU performance and code density. b) only 32 bits and allow a higher code density. c) 32/64 bits instructions together. d) the only way to make programs out of ARM instructions. 8. Cortex-A processors are likely to be found in a) a cellphone, tablet or laptop. b) a toaster. c) a real-time dependent system. d) small, non-graphical devices.
9. Compilers can combine assembly and C/C++ language code. a) True b) False 10. A Load-Store instruction set a) cannot directly access the data stored in memory. b) computes the result after loading data onto the stack. c) is not used in modern processors. d) does not exist. 11. Assembler directives are used to provide a) assembler specific compilation information. b) direct linking of object files. c) only direct execution of load instructions. d) align code to memory. 12. The Keil ENTRY assembler directive a) specifies the entry point of an application. b) specifies the starting point where the stack begins. c) doesn’t exist. d) is not an assembler directive. 13. ALIGN=2 aligns the following instructions/pseudo instructions to addresses a) with a multiple of 4. b) with a multiple of 2. c) that are 2 bytes offset off of word addresses. d) is not real. 14. The Interrupt Program Status Register (IPSR) is used a) to pass exception or interrupt information. b) for arithmetic flags. c) doesn’t exist. d) to store information when subroutines are running. 15. The arithmetic instructions updates the carry flag in APSR a) if an S is suffixed to the end of the instruction. b) always. c) never. d) never, because the carry flag is not in the APSR. 16. If variable a=0x12345678 and mask=0xFF000000 what is the result of a ^= mask? a) 0xED345678 b) 0xFE345678 c) 0x00345678 d) 0xED000000
17. (Ref) What does ADD R0, R1, R2, LSL #3 do? a) R0 = R1 + R2 * 8 b) R0 = R1 + R2 / 8 c) R0 = R1 – R2 * 8 d) R1 = R0 + R2 * 8 18. (Ref) Suppose r0 = 0xFFFFFFFF, r1 = 0x00000001, and r2 = 0x00000000. Initially the N, Z, V, C flags are 0. Find the values of the flags and r3 for ADD r3, r0, r2 . a) R3 = 0xFFFFFFFF, N=0, Z=0, V=0, C=0 b) R3 = 0xFFFFFFFF, N=1, Z=0, V=0, C=0 c) R3 = 0x00000000, N=0, Z=0, V=0, C=0 d) R3 = 0x00000000, N=0, Z=1, V=0, C=1 19. (Ref) Suppose r0=11101 2 and r1=10110 2 . What are the N, Z, C, V flags for SUBS r3, r0, r1 . Assume initially N=0, Z=0, C=1, V=0. a) N=0, Z=0, V=0, C=1 b) N=0, Z=0, V=0, C=0 c) N=1, Z=0, V=0, C=1 d) N=1, Z=0, V=0, C=0 20. Suppose mask = 0x00000F0F and P = 0xABCDABCD. What is the result of Q = P | mask . a) Q = 0xABCDAFCF b) Q = 0xABCDAECE c) Q = 0xABCDA0C0 d) Q = 0x00000B0D
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help