BIC

From ARMwiki
Revision as of 00:15, 31 May 2011 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
BIC
Instruction BIC[S]
Function Bit Clear
Category Data processing
ARM family All
Notes -

Contents

BIC[S]

BIC will perform a bitwise AND of one register with the complement of a second. This sounds complicated, so think of it as a simple way to clear selected bits in a register - BIC with 1 clears that bit, and with 0 leaves it unchanged.

Operand 1 is a register, operand 2 can be a register, shifted register, or an immediate value (which may be shifted).

If the S bit is set (BICS), the N and Z flags are set according to the result, the C flag is updated according to the shifter, while the V flag is not altered.

BIC is useful for clearing selected bits in a register.

Syntax

  BIC<suffix>  <dest>, <op 1>, <op 2>

Function

  dest = op_1 AND (NOT op_2)

Example

  BIC  R0, R0, #3  ; clear bits zero and one of R0

Technical

The instruction bit pattern is as follows:

31 - 28 27 26 25 24 - 21 20 19 - 16 15 - 12 11 - 0
condition 0 0 I 1 1 1 0 S op_1 dest op_2/shift
Personal tools
Namespaces

Variants
Actions
Navigation
Contents
Toolbox