Define and understand the functions of logic gates

Resources | Subject Notes | Computer Science

Boolean Logic - IGCSE Computer Science

Boolean Logic

Introduction

Boolean logic is the foundation of digital circuits and computer science. It deals with logical operations that can produce either true or false results. These operations are represented by logic gates.

Basic Concepts

Boolean Values

Boolean logic uses two basic values: True and False. These values are often represented by 1 and 0 respectively.

Boolean Operators

Boolean operators are used to combine or manipulate Boolean values. The main operators are:

  • AND: The result is True only if both input values are True. Symbol: & or &
  • OR: The result is True if at least one of the input values is True. Symbol: | or | |
  • NOT: The result is the opposite of the input value. If the input is True, the output is False, and vice versa. Symbol: ~ or '

Truth Tables

Truth tables are used to show the output of a Boolean expression for all possible combinations of input values.

AND Truth Table

Input A Input B Output (A AND B)
0 0 0
0 1 0
1 0 0
1 1 1

OR Truth Table

Input A Input B Output (A OR B)
0 0 0
0 1 1
1 0 1
1 1 1

NOT Truth Table

Input Output (NOT Input)
0 1
1 0

Logic Gates

Logic gates are electronic circuits that implement Boolean logic operations. They are constructed using transistors.

AND Gate

An AND gate outputs True only if both of its inputs are True. It's represented by a circle with a connecting line.

Suggested diagram: AND gate symbol

OR Gate

An OR gate outputs True if at least one of its inputs is True. It's represented by a circle with a connecting line and a dot.

Suggested diagram: OR gate symbol

NOT Gate

A NOT gate inverts its input. If the input is True, the output is False, and vice versa. It's represented by a circle with a slash through it.

Suggested diagram: NOT gate symbol

NAND Gate

A NAND gate is the inverse of an AND gate. It outputs False only if both of its inputs are True. It has an AND gate symbol with a circle added to the output.

Suggested diagram: NAND gate symbol

NOR Gate

A NOR gate is the inverse of an OR gate. It outputs True only if both of its inputs are False. It has an OR gate symbol with a circle added to the output.

Suggested diagram: NOR gate symbol

XOR Gate

An XOR (Exclusive OR) gate outputs True if only one of its inputs is True. It outputs False if both inputs are the same (both true or both false).

Suggested diagram: XOR gate symbol

Combinational Logic Circuits

Combinational logic circuits are circuits where the output depends only on the current input values. They are built using logic gates.

Examples include:

  • Half Adder: Adds two single-bit binary numbers.
  • Full Adder: Adds two single-bit binary numbers and a carry-in bit.
  • Multiplexer: Selects one of several input signals and forwards it to a single output.

Further Learning

Explore different combinations of logic gates and how they can be used to create more complex digital circuits.