User: alciro    User
 Original    Translate to:  Deutsch  English  Français  中文  
 

Microcontroladores 8051

4.3. Logical Instructions

Logical instructions microcontroller 8051.

Instructions Boolean logic for data processing.

ANL destination, origin. AND (AND) logic. And so do it logical operation between the source byte and destination byte.

MOV A,#0F0H ; A<-F0H Mover al acumulador el dato inmediato F0H
ANL A,#10H ; A<-(A).10H Realiza la AND lógica entre el acumulador y el dato inmediato.

AND logic.

ORL destination, origin. OR (O) logic of bits. So do it logical operation OR between the source byte and destination byte.

XRL destination, origin. XOR (exclusive OR) logic bits. So do it exclusive OR logical operation between the source byte and destination byte.

A
B
XOR
0 0 0
0 1 1
1 0 1
1 1 0

Accumulator

CLR A. A = 0, Remove the battery.

CPL A. A = A, Complement the accumulator (add A1).

SWAP A. A 3-0 <-> A 7-4, swap the nibbles of the accumulator.

Bit rotation

RL A. Rotate to the left of the battery.

RLC A. Rotate accumulator left through carry.

A. RR clockwise rotation of the accumulator.

A. RRC Rotate accumulator right through carry.

8051 microprocessor rotations Accumulator
Loading
copyright © 2007-2021  www.alciro.org  All rights reserved.         
Share |