9 Logical Macros

 

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 operations on one register. As an example, Figure 9.1 shows an AND logical function that will retrieve AND and two values from sources labeled source A and source B and will store the result in destination C. AND, NAND, OR, NOR, XOR, and XNOR logical functions have the form of Figure 9.1, with two source values and one destination register. In these, the logical function is applied to the two source values and the result is put in the destination register. However, the unary invert (INV) logical function has one source register and ...

Get Building a Programmable Logic Controller with a PIC16F648A Microcontroller now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.