CS 120 Lecture Notes - Lecture 16: Bitwise Operation, Machine Code

80 views2 pages

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 .

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents