Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

logic
gates
and
or
not

Logic gates

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Logic gates are the fundamental building blocks of circuits. Circuits are used to perform operations in a computer system. They are mainly used in the arithmetic logic unit known as ALU.

There are 5 main logic gates.

  • AND
  • OR
  • NOT
  • NOR
  • NAND

These logic gates take inputs and give a single output.

AND gate

The AND gate gives 11 as an output when all the inputs are 11. If there are any 00's in the input, the AND gate gives 00 as an output. Think of it as multiplication between 00 and 11.

widget

OR gate

The OR gate gives 11 as an output when at least one of the inputs is 11. If all inputs are 00, the output is 00. Think of it as addition between 00 and 11.

widget

NOT gate

NOT is a simple gate that takes in a single input and reverses its value. Whatever the input, this gate outputs the opposite (i.e., if 11 is inputted, it gives 00 as the output).

widget

NOR gate

The NOR gate is opposite to the OR gate. It gives 11 as an output whenever all inputs are 00 (i.e., 11 is not an input).

widget

NAND gate

The NAND gate gives 11 as an output when there is a single 00 as an input. It gives 00 as an output whenever all inputs are 11. NAND is opposite of AND.

widget

RELATED TAGS

logic
gates
and
or
not
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring