The phrase "**if and only if**", which is often shortened to "**iff**", is a Logical term often found when discussing Mathematics and Philosophy.

An equivalent expression of **iff** is: Necessary and Sufficient. And is sometimes called: Equivalence.

###### Definition

p |
q |
p iff q |

T |
T |
T |

T |
F |
F |

F |
T |
F |

F |
F |
T |

###### Exclusive Nor

*Iff* is the same thing as the: **exclusive nor**.

Or, in other words, is the same thing as: `not (p xor q)`

.

###### Symbols

The symbol I've seen used most for representing **iff**, is a horizontal double shafted, double pointed arrow. So there's 2 shafts/lines (like on an Equal Sign), and each end of it has an Arrow Head.

I've also read that 3 horizontal lines is sometimes used to represent **iff**. I.e.,....

≡

As in....

```
p
```*≡* q

For those involved in Web Development, this symbol can be generated in HTML with the code....

```
```**≡**

In many programming languages, **iff** is written as....

```
==
```

As in....

```
if (a
```*==* 5) {
x := y * 2;
}