*Rocco Arizzi*Show bio

Rocco has a PhD. in Electrical Engineering, a graduate certificate in Cybersecurity, and has taught university Math, Physics, Engineering, and Computer Science.

Lesson Transcript

Instructor:
*Rocco Arizzi*
Show bio

Rocco has a PhD. in Electrical Engineering, a graduate certificate in Cybersecurity, and has taught university Math, Physics, Engineering, and Computer Science.

In electronics, logic gates operate basic functions, providing a foundation for digital circuits. Learn about NAND, NOR, and XOR logic gates. Explore logic truth tables, functional completeness, and Boolean logic.
Updated: 01/23/2022

The three basic Boolean logic operations of AND, OR, and NOT are the most familiar in human language and the most intuitive to understand. To a computer, however, they are just a collection of **binary truth tables**. For a general logic gate with two inputs and a single output, there are 16 possible outcomes (2^4), two of which are covered by the AND and OR gates. The single-input NOT gate adds a 17th outcome. Figure 1 reviews the truth tables that correspond to the AND, OR, and NOT gates.

It is useful in practical digital systems design to have more truth table options to choose from. The **NAND**, **NOR**, and **XOR** gates add additional diversity to the set of binary truth tables and each have their own useful properties.

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Are you a student or a teacher?

Create Your Account To Continue Watching

As a member, you'll also get unlimited access to over 84,000 lessons in math, English, science, history, and more. Plus, get practice tests, quizzes, and personalized coaching to help you succeed.

Get unlimited access to over 84,000 lessons.

Try it now
Replay

Your next lesson will play in
10 seconds

The negated AND operation, or NAND gate, is the binary complement of an AND operation:

NAND(X,Y) = NOT(AND(X,Y))

Since the NOT operation is invertible, this relationship can also be written as:

AND(X,Y) = NOT(NAND(X,Y))

Similarly, the NOR gate is defined as a negated OR operation:

NOR(X,Y) = NOT(OR(X,Y))

OR can also be expressed in terms of NOR:

OR(X,Y) = NOT(NOR(X,Y))

The definition of the OR operation is that it is TRUE if either input is TRUE. This includes the possibility that both inputs are TRUE. In contrast, the exclusive OR operation or XOR (sometimes called EOR) gate is TRUE if and only if a single input is true.

This relationship has two equally correct expressions in terms of the basic logic gates:

XOR(X,Y) = OR(AND(X, NOT(Y)),AND(NOT(X),Y)) = AND(OR(X,Y), OR(NOT(X), NOT(Y)))

The truth tables and distinctive shape set symbols are given for NAND, NOR, and XOR in Figure 2. It is readily evident that the outputs of NAND and NOR are the exact complement of AND and OR, respectively.

If the two inputs to a NAND gate are shorted together, as shown in Figure 3, the only relevant portions of the truth table are the ones for which the two inputs are equal.

This behavior is precisely equivalent to that of a negation operation. Thus, a NOT gate can be defined in terms of only a NAND gate.

NOT(X) = NAND(X,X)

This allows the AND gate to be reformulated in terms of only NAND gates.

AND(X,Y) = NAND(NAND(X,Y),NAND(X,Y))

An OR gate equivalent can also be constructed using only NAND gates, by putting two shorted (equivalent to NOT) NAND gates each at the input of a third NAND gate as shown in Figure 4.

This circuit corresponds to the following NAND-only equation:

OR(X,Y) = NAND(NAND(X,X),NAND(Y,Y))

A similar process can be repeated using only OR gates. It turns out that any logic gate can be emulated using only NAND gates or only NOR gates. This property is known as **functional completeness**. This means that an entire logic circuit can be built using only a single type of gate throughout the design. NAND and NOR gates also require the fewest number of transistors in their construction, making them an efficient choice for large microprocessors.

Let's take a few moments to review!

**AND**, **OR**, and **NOT** gates are the most fundamental logic gates because they relate to the three base operations of Boolean logic. Additional gates, however, like **NAND**, **NOR**, and **XOR** provide more design options for logic circuits with their unique truth tables. NAND and NOR gates are of particular interest because each can be used exclusively in a circuit to emulate the behavior of any other logic operation. This is called **functional completeness**.

To unlock this lesson you must be a Study.com Member.

Create your account

Are you a student or a teacher?

Already a member? Log In

BackRelated Study Materials

- Math Courses
- Teacher Resources Courses
- Elementary School Courses
- SAT Prep: Tutoring Solution
- LSAT Prep: Tutoring Solution
- Precalculus for Teachers: Professional Development
- Precalculus Algebra for Teachers: Professional Development
- Business Math for Teachers: Professional Development
- Quantitative Analysis for Teachers: Professional Development
- Prentice Hall Algebra 2: Online Textbook Help
- AP Calculus AB & BC: Exam Prep
- Fundamental Trigonometry
- College Algebra Remediation
- McDougal Littell Algebra 2: Online Textbook Help
- PSAT Prep: Help and Review
- PSAT Prep: Tutoring Solution

- Problem Solving with Irrational Numbers
- How to Subtract Complex Numbers on the Complex Plane
- Multiplication on the Complex Plane
- Representing Distances on the Complex Plane
- Using Graphing Technologies to Graph Functions
- Quiz & Worksheet - Domain & Range of Trig Functions
- Quiz & Worksheet - Applying Postulates & Theorems in Math
- Quiz & Worksheet - Using Math Models in Art
- Quiz & Worksheet - Using Math Models in Social Science
- Quiz & Worksheet - Assessment Results & Math Instruction Improvement
- Mathematical Models
- Complex Numbers & the Complex Plane
- Number Theory
- Number Patterns
- Functions and Graphs

- TExES Core Subjects EC-6 (391): Practice & Study Guide
- TExES School Counselor (252): Practice & Study Guide
- Virginia SOL - US History 1865 to Present: Test Prep & Practice
- Virginia SOL - US History to 1865: Test Prep & Practice
- Biology 202L: Anatomy & Physiology II with Lab
- Composition in Spanish
- Spanish Literature and Authors
- Reading Spanish Texts
- Fashion, Art and Design in Spanish
- Cultural Values of Spanish-Speaking Countries
- Role of Student Support in Open & Distance Learning
- TExES Principal Exam Redesign (068 vs. 268)
- Teacher Salary by State
- ESL Resource Guide for Teachers
- What is a Homeschool Co-op?
- How to Start Homeschooling Your Children
- Addressing Cultural Diversity in Distance Learning

- ASCII and Unicode to Represent Characters in Binary Code
- The Kite Runner: Baba Quotes About Amir
- The Parson's Tale in The Canterbury Tales: Prologue & Summary
- The Catcher in the Rye Chapter 2: Summary & Quotes
- Death of Aurangzeb: Cause & Place
- Flannery O'Connor: Biography, Books & Writing Style
- Lyme Disease Lesson for Kids
- Quiz & Worksheet - An Ideal Family Synopsis & Characters
- Quiz & Worksheet - Minoan Technology
- Quiz & Worksheet - Mitochondrial Protein Synthesis
- Quiz & Worksheet - Life of Mario Molina
- Flashcards - Real Estate Marketing Basics
- Flashcards - Promotional Marketing in Real Estate
- Grammar Games
- Social Studies Lesson Plans

- NYSTCE Physics (009): Practice and Study Guide
- NY Regents Exam - Earth Science: Help and Review
- Government 101: Intro to Government
- NY Regents Exam - Physics: Tutoring Solution
- Curriculum Development for Teachers
- Job Design
- Practice Management
- Quiz & Worksheet - Culture of the Anasazi Tribe
- Quiz & Worksheet - Bacterial Transformation
- Quiz & Worksheet - Neoclassical Poetry
- Quiz & Worksheet - Worcester v. Georgia
- Quiz & Worksheet - The Plot of a Story

- Wheel & Axle: Definition, Facts & Examples
- Mexican Ethnic Groups: Percentages & Demographics
- Engineering Internships for High School Students
- How to Stop Procrastinating
- Best Math Games for Kids
- Colorado Science Standards for 1st Grade
- How to Learn Accounting
- Telling Time Games & Activities
- How to Pass the Earth Science Regents Exam
- Computer Projects for Kids
- Telling Time Lesson Plan
- Civil Rights Activities for Kids

- Tech and Engineering - Videos
- Tech and Engineering - Quizzes
- Tech and Engineering - Questions & Answers

- Is {XOR, NOT} a functionally complete set of gates? Give a rigorous argument.
- Draw the NAND logic diagram for the following expression using multiple-level NAND gate circuit: F(A,B,C,D,E)=AB'+C'D'+BC'(A+B)
- Write L3 machine code routines for the following: to perform an XOR on two binary numbers stored in x3100 and x3101 store the result at x3102.
- Simplify this expression:(\bar{A} \bigoplus BC) + BC
- Design a program that uses looping to display odd numbers counting from 5 to 17 using the LMC / TLC instruction set. The program must halt after displaying 17. Write and submit as the answer to this p
- Write LC-3 machine code routines for the following: (a) To perform an NOR on two binary numbers stored in x3100 and x3101. Store the result at x3102. (b) To perform an XOR on two binary numbers stored
- What are the contents of PORTB after the execution of the C code PORTB=0x37^0xCA?
- Implement f(x, y, z) = sum of m(0, 1, 3, 4, 7) as a two-level gate circuit, using a minimum number of gates. Use NAND gates only. Enter the equation for f.
- We can perform logical operations on strings of bits by considering each pair of bits separately (called bitwise operation). Given two strings A and B A = 10110110 B = 11001000 Perform the bitwise ope
- Given the following truth table, which one of the following diagrams represents the simplest possible circuit?

Create an account to start this course today

Used by over 30 million students worldwide
Browse by subject

Upgrade to enroll

Upgrade to Premium to enroll in Math 108: Discrete Mathematics

Enrolling in a course lets you earn progress by passing quizzes and exams.

Track course progress

Take quizzes and exams

Earn certificates of completion

You will also be able to:

- Create a Goal
- Create custom courses
- Get your questions answered

Upgrade to **Premium** to add all these features to your account!

Upgrade Now
Upgrade to **Premium** to add all these features to your account!