6.3. Bit and Field Operations

We have seen how arithmetic and logical operations work bitwise with two source operands to form a single result. In shift operations, all of the bits move as one, to the left or right, in the amount determined by one of the source operands. In deposit and extract operations, selected bits from the source operands are assembled into a new result.

6.3.1. Shift Instructions

Computer architectures usually provide some instructions that shift a bit pattern to the left or right. Early architectures offered shifts by only a single bit position, while modern architectures tend to offer shifts by multiple bit positions. The Itanium architecture offers left logical, right logical, and right arithmetic shift instructions: ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.