Chapter 8

Logical, Bit, Shift, and Rotate Instructions

The logical operations of AND, OR, exclusive-OR, NOT, and TEST are presented in this chapter; these instructions execute the Boolean equivalent of the corresponding operations in digital logic circuits. Also covered are the instructions that operate on single bits, such as bit test (BT), bit test and set (BTS), bit test and reset (BTR), bit test and complement (BTC), bit scan forward (BSF), and bit scan reverse (BSR).

Shift instructions are also presented that perform logical or arithmetic left or right shifts on bytes, words, or doublewords. The shift instructions are shift arithmetic left (SAL), shift logical left (SHL), shift arithmetic right (SAR), shift logical right (SHR), double precision ...

Get X86 Assembly Language and C Fundamentals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.