CSCE 2214 Lecture Notes - Lecture 13: Logical Conjunction, Operand, Control Flow
Document Summary
Lec 13 9-23-16 ch 2 logical and bitwise operations. / sll and srl / immediate logical operations / They are useful for extracting and inserting groups of bits in a word. The chart below shows the same logical operations for different programming languages. The term sll stands for shift left logical. Sll moves all the bits in a word to the left by a certain amount and replaces the emptied bits with 0"s. The leftmost bits are lost and the rightmost bits are filled in with. The generic code looks like so sll , , shamt #contents in rt are going to be shifted by a shamt amount to the left and stored in rd. Lecture notes page 1 sll , , 4 #contents in will be shifted to the left left and stored in rd. 4 times and stored in the same register.