Question: Derive the logic gates for a 2-bit Arithmetic Logic Unit (ALU) with four micro-operations. Note: when answering the below questions, optimize your solution by


Derive the logic gates for a 2-bit Arithmetic Logic Unit (ALU) with four micro-operations. Note: when answering the below questions, optimize your solution by reducing the number of logic gates used. 1) Complete the table below by showing the select input bits and the necessary groupings. (5 points) Select Inputs Micro-Operation F=A-B-1 F=A+B+1 F=AVB F = ashl A Description Subtraction with borrow Addition with carry Logic OR Arithmetic shift left 2) Draw a detailed logic circuit of the ALU's arithmetic unit. (10 points) 3) Draw a detailed logic circuit of the ALU's Logic and Shift unit. (10 points) 4) Use block diagrams of the arithmetic, logic and shifting units in order to draw the block diagram of the complete ALU. (5 points) 4. subroutine (10 pts) [MSP430 Microcontroller Basics, section 4.6] a. When a subroutine is called, what happens to the stack? b. What would happen if a subroutine changes the top value of the stack? c. What instruction enters a subroutine? d. What instruction returns from a subroutine? e. How do you pass parameters to a subroutine? .text mov.W mov.w mov.w push.w push.w call pop.w pop.w jmp subroutine: ; subroutine adds add.w add.w ret ending: jmp #1, R10 #4215h, R8; data 1 # 38A6h, R9; data 2 R8 R9 #subroutine R9 R8 ending value in R10 to data values on stack R10,2 (SP) R10,4 (SP) ; infinite loop to end program f. In this program, why are 2(SP) and 4(SP) used to address the values on the stack? g. In this program, how were parameters passed to the subroutine?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
