#### Before you keep reading...

Runestone Academy can only continue if we get support from individuals like you. As a student you are well aware of the high cost of textbooks. Our mission is to provide great books to you for free, but we ask that you consider a $10 donation, more if you can or less if $10 is a burden.

#### Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

# Negated Gates

Finally, it is useful sometimes to think about the opposites of the three basic logical rules (AND, OR and XOR). These opposite, or “Not” rules, do the exact opposite of the regular versions. For instance, AND gives an output of 1 only if both inputs are 1. NAND (Not AND) gives an output of 0 only if both inputs are 1.

Below are the truth tables for the negated gates shown next to the gate they negate.

###
OR vs NOR Gates

Truth table for OR
Input 1 |
Input 2 |
Output |

0 |
0 |
0 |

0 |
1 |
1 |

1 |
0 |
1 |

1 |
1 |
1 |

Truth table for NOR
Input 1 |
Input 2 |
Output |

0 |
0 |
1 |

0 |
1 |
0 |

1 |
0 |
0 |

1 |
1 |
0 |

OR reports 1 if either input is 1. NOR is the exact opposite - it reports 0 if either input is 1 (and only gives 1 if both inputs are 0).

###
AND vs NAND Gates

Truth table for AND
Input 1 |
Input 2 |
Output |

0 |
0 |
0 |

0 |
1 |
0 |

1 |
0 |
0 |

1 |
1 |
1 |

Truth table for NAND
Input 1 |
Input 2 |
Output |

0 |
0 |
1 |

0 |
1 |
1 |

1 |
0 |
1 |

1 |
1 |
0 |

AND gives a 1 only if both inputs are 1. NAND does the opposite - that is the only time it gives a 0.

###
XOR vs XNOR Gates (Also known as ENOR)

Truth table for XOR
Input 1 |
Input 2 |
Output |

0 |
0 |
0 |

0 |
1 |
1 |

1 |
0 |
1 |

1 |
1 |
0 |

Truth table for XNOR
Input 1 |
Input 2 |
Output |

0 |
0 |
1 |

0 |
1 |
0 |

1 |
0 |
0 |

1 |
1 |
1 |

XOR gives a 1 if the two inputs are different (0 1 or 1 0). XNOR gives a 1 only if they are the same!

####
Self Check

You have attempted

of

activities on this page