eecs2021_midterm_Feb10_STUDENT_VERSION_C_SOLUTIONS_v2

pdf

School

York University *

*We aren’t endorsed by this school

Course

2021E

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

9

Uploaded by Count_Field_Heron13

Report
You are not permitted to have a cell phone on you!! York University Department of Electrical Engineering and Computer Science EECS 2021 Winter 2016 – Midterm Feb 10, 2016 Version C Solutions Guidelines and Instructions: 1. This is a 80 minute, closed-book test. It is worth 20% of your final grade. 2. You may have a clear bottle of water. 3. Purses, bags, pencil cases, etc. are to be placed at the front of the class or under your chair. 4. Spread out. Ensure that there is at minimum one empty chair between you and your neighbour. 5. Be sure your student number is filled-in correctly on the Scantron sheet and on the exam booklet (2 marks; 1 mark each) . 6. Answer ALL questions by filling in the appropriate letters on the Scantron sheet provided using a pen or an HB / No. 2 pencil. Your answers are machine marked so be sure to fill in the bubbles very carefully. Also circle your answers on the examination paper as backup. Both the question sheets and the answer sheet must be submitted together. 7. You may not leave within the first 30 or last 10 minutes of the exam. At the end of the exam, remain seated until all exams are collected. This is to ensure no exams are stolen or go missing. Failure to follow these instructions may result in your grade being reduced. 8. No electronic calculator is permitted. Original, unmodified slide rules are, however. 9. Other electronic aids (i.e. cellphones, wearable electronics, etc.) are not permitted. 10. If you need to use the washroom, please contact the instructor or invigilator. 11. Unmodified, paper dictionaries are allowed. 12. Keep your eyes on your own work. At the discretion of the invigilators, students may be asked to move. 13. All questions are given a weight of 1, except where noted. 14. Datasheets and other documents required for some of the questions are provided and do not need to be returned. 15. Return both the exam question booklet and the scantron sheet by the end of the exam.
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016)
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 1. What is 0x221F in binary? a) 0b1010101010111111 b) 0b1010101010111101 c) 0b1010101010111111 d) 0b1010101010111111 e) 0b0010001000011111 f) None of the above Question 2. What is -24 16 in two’s complement binary form? a) 0b11100111 b) 0b10100011 c) 0b11011100 d) 0b11010001 e) 0b11001101 f) None of the above Question 3. What is 821 10 in hexadecimal? a) 0x2674 b) 0x335 c) 0x234 d) 0x214 e) 0x232 f) None of the above Question 4. What is (-0x23) + 0x08, in 8-bit two’s complement binary? a) 0b11100101 b) 0b11111101 c) 0b11100111 d) 0b01110001 e) 0bb0011001 f) None of the above
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
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 5. What does “TRIS” stand for, in the context of the PIC32? a) Sadness b) Tristate c) Trislaterate d) Trigger State e) Tristatutory f) None of the above. Question 6. When compiling C code for use in an microprocessor system like the PIC32 with MIPS cores, what is the step after running the assembler that creates a machine-executable file? a) Compiling b) Linking c) Assembling d) Disassembling e) Debugging f) None of the above. Question 7. What is 0x22 – 0x11, in 8-bit two’s complement binary? a) 0b01101111 b) 0b00110101 c) 0b11011100 d) 0b01110001 e) 0b00110011 f) None of the above Question 8. If I use the following addition assembler operation in the context of adding values from two registers and storing the result in another register, which register is the final value of the addition being stored in? ( note: assume that the command, as written, is valid. There are no syntax errors ) add S1, S2, S3 a) S1 b) S2 c) S3 d) S2+S3 e) 0(S3) f) None of the above.
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 9. If I want to move a value stored in a register into main memory, which assembler mnemonic should I use? a) lw b) subiu c) mult d) srl e) sw f) None of the above. Question 10. What is an atomic operation in the context of the PIC32? a) It’s radioactive, man. It’s hot. Real hot. Don’t touch. b) It’s so fast you need a GHz-scale oscillator to speed it up any further. c) It’s a small operation that can be combined with other assembler operations to form molecular macro code. d) It’s an operation that can’t be interrupted e) It’s the tiniest operation possible. Even smaller than the smallest Assembler operation. f) None of the above.
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 11. Perform the following division operation: 12 divided by 5. You are to calculate the individual steps that are performed on an ALU, as discussed in class last week. We know that the 8-bit register containing a 4-bit remainder and a 4-bit quotient will change from one calculation step to another. What are the remainder and quotient values at the end of the 3 th major step (assuming that Step 1 is the initialization step and that Step 5 is the final step that generates the final value the of remainder and of the quotient). [3 pts] a) Remainder: 0b1011 ; Quotient: 0b1010 b) Remainder: 0b0011 ; Quotient: 0b1010 c) Remainder: 0b0011 ; Quotient: 0b0000 d) Remainder: 0b0001 ; Quotient: 0b001 e) Remainder: 0b0010 ; Quotient: 0b0010 f) None of the above.
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
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 12. using the PIC32mx250f128B data sheet provided, what is the maximum divisor possible to get the peripheral bus clock to be as slow as possible, as compared to the system clock? a) 1 b) 2 c) 4 d) 8 e) 16 f) None of the above. Question 13. using the PIC32mx250f128B data sheet provided, if I want my PIC32’s system clock to be driven by an RC Oscillator, which configuration setting would I have to change or set? a) JTAGEN b) FMOSC c) FPLLODIV d) FPBDIV e) FPLLMUL f) None of the above.
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 14. Assume that the multiplier hardware on your MIPS processor is set up like the multiplier discussed last week. It takes one clock cycle to initialize the ALU, product register and all other necessary hardware. It takes 4 clock cycles to get through each stage (one sequence of shift, test, add, etc. is considered a stage) of the multiplication. If the clock has a period of 2 nanoseconds (ns), how long does it take to multiply two eight-bit numbers into a 16-bit product register? The register for the multiplicand is 8-bits wide. a) 55 ns b) 34 ns c) 32 ns d) 27 ns e) 9 ns f) None of the above. ( 1*2ns + 8*4*2ns = 66ns )
EECS 1570 Winter 2016 Lab Test 1 (Faculty version) (Feb, 2016) Question 15. Perform the following multiplication operation: 2 multiplied by 3, where 2 is the multiplicand and 3 is the multiplier. You are to calculate the individual steps that are performed on an ALU, as discussed in class last week. We know the ALU feeds an 8-bit product register using the 4-bit multiplicand and multiplier values. What is the value of the 8-bit product register at the end of Step 4 (assuming that Step 1 is the initialization step and that Step 5 is the final step that generates the final value the of 8-bit product). [3 pts] a) 0b00011000 b) 0x00111001 c) 0b10010000 d) 0b00001100 e) 0x3D f) None of the above.
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