ABSTRACT

A logical function performs AND, NAND, OR, NOR, exclusive-OR (XOR), exclusive-NOR (XNOR), logical operations on two registers (or one register plus one constant value), and NOT (invert) logical operation on one register. The following logical macros are described in this chapter: R1andR2 (R1 AND R2), RandK (R AND K), R1nandR2 (R1 NAND R2), RnandK (R NAND K), R1orR2 (R1 OR R2), RorK (R OR K), R1norR2 (R1 NOR R2), RnorK (R NOR K), R1xorR2 (R1 EXOR R2), RxorK (R EXOR K), R1xnorR2 (R1 EXNOR R2), RxnorK (R EXNOR K), inv_R (Complement of R). These macros are applied to two 8-Bit registers (R1 and R2) or to an 8-Bit register (R) and an 8-Bit constant (K). An example is considered to show the application of logical macros presented in this chapter.