Motorola M68000 User's Guide Page 143

  • Download
  • Add to my manuals
  • Print
  • Page
    / 256
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 142
CHAPTER 10
LOGICAL, SHIFT AND
ROTATE INSTRUCTIONS
In this chapter we will examine a group of instructions that can ma
nipulate the individual bits of a byte, word, or longword by performing
logical operations such as AND and OR. We will also see how shift and
rotate instructions can change the positions of all the bits in a byte or
word in interesting ways.
Truth Tables
There are four logical operations that have corresponding 68000 in
structions: NOT, AND, OR, and EOR (exclusive or). These four logical
operations can be described by the use of a truth table. AND, OR, and
EOR are operations that require two operands, while NOT only requires
one. When used as 68000 instructions, these logical operations act on
all
the bits of the operands in parallel. However, the action on individual
bits or bit pairs is the same. We can therefore describe each operation
with a truth table consisting of at most a pair of bits.
The NOT logical operation essentially reverses ones and zeros. In
other words, a 1 becomes a 0 and a 0 becomes a 1. The truth table looks
like this:
Operand
0 1
Result 1 0
NOT
The AND operation takes two operands. The resulting bit is a 1 only if
both the operand bits are 1.
129
Page view 142
1 2 ... 138 139 140 141 142 143 144 145 146 147 148 ... 255 256

Comments to this Manuals

No comments