Lab 9
3/23 COMP 411
Shifting in MIPS
Connor & Michael
In this lab we will:
Understand how to combine shifts with AND
Review XOR
Quiz
Shift operation
AND operation
int bit = 1;
int myVar = bit & 1;
(value of myVar is 1)
int bit = 0;
int myVar = bit & 1;
(value of myVar is 0)
Exercise 1: using Shift with AND
Exercise 2: using XOR and shift
Other cool tricks w/ AND