ARM Instruction Set: Binary Arithmetic and Logic Instructions Assembler input: ADC|ADD|AND|BIC|EOR|ORR|RSB|RSC|SBC|SUB[S] ,, Assembler output: High byte as standard Sixth nybble contains AL subinstruction code and S flag Bits 21-23 (3-bit cardinal) are AL subinstruction code Bit 20 is S flag Fifth nybble is first source register Fourth nybble is destination register Bottom three nybbles depend on base instruction grouping If base instruction code is 0 or 1 then: Bit 4 determines whether shift factor is a register or a constant 0 Shift factor is a constant Bits 7-11 (5-bit cardinal) are shift factor Bits 5-6 are barrel shifter subinstruction code 1 Shift factor is a register Third nybble is register containing shift factor Bit 7 is 0 (indicating AL instruction, NOT multiply instruction) Bits 5-6 are barrel shifter subinstruction code Low nybble is second source register If base instruction code is 2 or 3 then: Bottom three nybbles are an immediate constant The following subinstruction codes apply if the base instruction code is 0 or 2. Value Base instruction mnemonic 0 AND 1 EOR 2 SUB 3 RSB 4 ADD 5 ADC 6 SBC 7 RSC The following subinstruction codes apply if the base instruction code is 1 or 3. Value Base instruction mnemonic 4 ORR 6 BIC