MGMT 1030 Lecture Notes - Lecture 20: Operand, Instruction Set
![](https://new-preview-html.oneclass.com/xMWbKnB0DLaXj8bxO6DoQqvpr74k3ed2/bg1.png)
MGMT 1030 Lecture 20 Notes – Shift and Rotate Instructions, Bit Manipulation Instructions
and Single Operand Manipulation Instructions
Introduction
Single Operand Manipulation Instructions
• Commonly included are a NOT instruction, which inverts the bits on a single operand
• As well as AND, (inclusive) OR, and EXCLUSIVE-OR instructions, which require two
source arguments and a destination.
• In addition to the NOT instruction described in the previous paragraph, most computers
provide other convenient single operand instructions.
• Most of these instructions operate on the value in a register, but some instruction sets
provide similar operations on memory values as well.
• Most commonly, the instruction set will contain instructions for NEGATing a value, for
INCREMENTing a value, for DECREMENTing a value, and for setting a register to zero.
• There are sometimes others.
• On some computers, the increment or decrement instruction causes a branch to occur
automatically when zero is reached
• This simplifies the design of loops by allowing the programmer to combine the test and
branch into a single instruction.
Bit Manipulation Instructions
• Most instruction sets provide instructions for setting and resetting individual bits in a
data word.
• Some instruction sets also provide instructions for operating on multiple bits at once.
• Bits can also be tested, and used to control program flow.
• These istructios allow prograers to desig their ow flags i additio to
commonly provided negative/positive, zero/nonzero, carry/borrow, and overflow
arithmetic flags.
find more resources at oneclass.com
find more resources at oneclass.com