You are on page 1of 2
University of Liberal Arts Bangladesh (ULAB) Department of Computer Science and Engineering CSE307: Microprocessor & Interfacing Section-02 (8.30 AM-9.50 AM) (M/W) Instructions Read the instructions carefully before answering and submitting your work. Answer ALL questions. ‘There are 11 questions in total. Marks for each question are indicated in brackets. ‘The answers should be typed where possible, unless you requested for handwritten submission. Submission must be as a single pdf file. File name must be folk (For instance, 007-CSI ved this pattern, StudentID_CSE307_02_Mid_Assessment.pdf 17.02 Mid_Assessment.pdf) The task is to be completed open-book (i.e. with reference to slides, textbooks) but without collusion (i.e. working independently) Plagiarism is strictly prohibited. If plagiarisin is found in your work, department will take immediate action. Do not consult with other students or other students’ work, or share your work with other students. Do not make copies and/or re-distribute this document. Submission Deadline [11th April 2021 (Sunday) 11.59 PM). 1of2 University of Liberal Arts Bangladesh (ULAB) Department of Computer Science and Engineering CSE307: Microprocessor & Interfacing Section-02 (8.30 AM-9.50 AM) (M/W) Midterm Assessment Spring 2021 ‘Total mark: 25 10. cr Attempt all questions Differentiate between Microprocessor and Micro-controller. [2 marks] . A program has just calculated an important value which is contained in register $8. The program now calls a function to print out the value. What might be in $8 upon return? [2 mark: In MIPS, why is the program counter (PC) incremented by 4 each time? Explain with examples [2 marks] . Is the following instruction correct? Explain Why or Why not? (2 marks] ori $0,$9,0x32 . Is the following instruction correct? What does it do? [2 marks] andi $8,$0,0xFFFF- ‘The R-Type instruction supports sub & snbiu, However why don't MIPS support snb & subiu in type instruction? Explain with examples [2 marks] . MIPS registers are 32-bit long. How do you load a value of 0x1FEBC8RD into a register? Explain with an example. [2 marks] What is the bitwise AND, OR & XOR, NOR of the following? [3 marks] FEED BECA Ox . Write a pseudocode with MIPS Instruction Set that can identify positive and neg- ative numbers from an array of numbers. [3 marks] Sample input: 1] Sample output: [N, P, N, P, P .N, N] Suppose register $5 contains an integer value. How can you multiply the value of $5p register by 59. [2 marks] Write an assembly program in MIPS which can calculate the factorial for a given number. [3 marks] Sample input: 5 Sample output: 120 *** Good Luck *** 2of2

You might also like