CS 120 Lecture Notes - Lecture 16: Bitwise Operation, Machine Code
Document Summary
Qtspim and we mips are different ways to program using mips. Sw: store word: writes a data word from a register into memory. sw , 5(sh, writes to memory word 5. Lw: load word: read a data word from memory into a register. lw , 1(sh, reads memory word 1 into . Addi: add immediate: adds the immediate specified in the instruction to a value in a register, addi , , -12; = b, = a, b = a 12, saves the answer in . Add: addition: adds two registers together, saves it in the destination register, add , , . And: used to mask bits (force any unwanted bits to 0, and , , , does the bitwise and operation on and , and stores it in . Or: used to combine bits from two registers, or , , , does the bitwise or operation on and , and stores it in .