Logic, Shifting, Rotating, and Stacks

  • James T. Streib


As introduced in most first semester computer science courses and previously discussed in Chapter 4, various relationals in an if statement can be connected via the use of logical operators such as “and” (&&), “or” (∥), and “not” (!), where these operators in assembly language work with comparisons between variables, registers, and literals. However, sometimes it is necessary to not just compare the contents of variables or registers but check the individual bits within a memory location or a register. These types of operations are known as bit-wise operations. An example of this is when interfacing with an external device, when often only a single bit is needed to be checked or set on the external device.


Memory Location Assembly Language Code Segment Arithmetic Instruction Assembly Language Programmer 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag London Limited 2011

Authors and Affiliations

  • James T. Streib
    • 1
  1. 1.Department of Computer ScienceIllinois CollegeJacksonvilleUSA

Personalised recommendations