# BIC

(Difference between revisions)

Instruction BIC[S] Bit Clear Data processing All -

## BIC[S] : Bit Clear

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