This site is supported by donations to The OEIS Foundation.

Logical NAND

Logical NAND (“Not And”) is an operation on two logical values, typically the values of two propositions, that produces a value of false if and only if both of its operands are true.  In other words, it produces a value of true if and only if at least one of its operands is false.

A logical NAND of propositions $p$ and $q$ may be written in various ways.  Among the most common are these:

• $p~{\bar {\curlywedge }}~q$ • $p\barwedge q$ • $p\uparrow q$ A truth table for $p~{\bar {\curlywedge }}~q$ appears below:

 $p$ $q$ $p~{\bar {\curlywedge }}~q$ $\mathrm {F}$ $\mathrm {F}$ $\mathrm {T}$ $\mathrm {F}$ $\mathrm {T}$ $\mathrm {T}$ $\mathrm {T}$ $\mathrm {F}$ $\mathrm {T}$ $\mathrm {T}$ $\mathrm {T}$ $\mathrm {F}$ A logical graph for $p~{\bar {\curlywedge }}~q$ is drawn as two letters attached to the free node of a rooted edge:

The traversal string of this graph is ${\texttt {(}}pq{\texttt {)}}.$ The proposition $p~{\bar {\curlywedge }}~q$ may be taken as a Boolean function $f(p,q)$ having the abstract type $f:\mathbb {B} \times \mathbb {B} \to \mathbb {B} ,$ where $\mathbb {B} =\{0,1\}$ is interpreted in such a way that $0$ means $\mathrm {false}$ and $1$ means $\mathrm {true} .$ A Venn diagram for $p~{\bar {\curlywedge }}~q$ indicates the region where $p~{\bar {\curlywedge }}~q$ is true by means of a distinctive color or shading.  In this case the region consists of three adjacent cells, as shown below:

Document history

Portions of the above article were adapted from the following sources under the GNU Free Documentation License, under other applicable licenses, or by permission of the copyright holders.