Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

logical statementd and branching A. What happens to a number when we shift left

ID: 3797498 • Letter: L

Question


logical statementd and branching

A. What happens to a number when we shift left by 4? (ex. What happens when we shift 0011 left by 2?) B. What happens to a number when we shift right by 3? (ex. What happens when we shift 1100 left by 2?) C. The register sto has the value 0x00000020 in it (this is reset at the beginning of each part) a. What is the value of $12 after the following line? sll $12, StO, 3 b. What is the value of $12 after the following lines? sll $t0, $t0, 4. addi St2, Sto. 4. c. What is the value of $12 after the following lines? addi $t1, $zero, 16 3-1 16 beq $t0, 1, Else andi St2, $to, 1 Done Else: ori $12, $t0, 1 Done:

Explanation / Answer

Ans A) When we shift left a number by 4 , we get back the same number.

Ans B) When a number is shifted right by 3, for example if 0011 is right shifted by 3 we get 0110 i.e 6.