MGMT 1030 Lecture Notes - Lecture 20: Operand, Instruction Set

42 views2 pages
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 istructios allow prograers 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
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents