Intel 64 and IA-32 Architectures Software Developers Manual Volume 2A, Instruction Set Reference, A-M
Vol. 2 3-11
INSTRUCTION SET REFERENCE, A-M
If BitBase is a memory address, the BitOffset can range has different ranges
depending on the operand size (see Table 3-2).
The addressed bit is numbered (Offset MOD 8) within the byte at address
(BitBase + (BitOffset DIV 8)) where DIV is signed division with rounding towards
negative infinity and MOD returns a positive number (see Figure 3-2).
Figure 3-1. Bit Offset for BIT[RAX, 21]
Table 3-2. Range of Bit Positions Specified by Bit Offset Operands
Operand Size Immediate BitOffset Register BitOffset
16 0 to 15 −2
15
to 2
15
− 1
32 0 to 31 −2
31
to 2
31
− 1
64 0 to 63 −2
63
to 2
63
− 1
Figure 3-2. Memory Bit Indexing
02131
Bit Offset ← 21
63
BitBase +
07775 0 0
BitBase −
0777500
BitBase BitBase −
BitOffset ← +13
BitOffset ← −
BitBase − BitBase