Digital equipment (such as a calculator or a computer) utilizes circuits with
two stable states associated with the values 0 and 1. A number system that
utilizes only 0s and 1s is called a **binary number system**. Each binary
digit is called a **bit**.

A **logic gate** has
one or more digital inputs and just one output. The output value is determined by the
combination of input values. Logic gates (NOT gates or inverters, AND gates, and
OR gates) are fundamental elements from which
more complicated circuits can be built. **Digital logic** refers to the
properties of such circuits and the methods used to design and implement them.

**Boolean algebra** (named for the mathematician, George Boole) is used to
define and manipulate expressions that represent digital circuits. Many of the
laws of normal algebra also work in Boolean algebra but some do not.
Furthermore, Boolean algebra has some new properties that have no counterpart in
normal algebra.

Any combinational digital circuit can be designed using logic gates. In this section you will see how symbolic logic and digital logic are related and learn how to design a digital circuit to implement a function defined by a truth table.

**Logic gates** perform simple logic operations (such as NOT,
AND, and OR) and are the fundamental building blocks of digital
circuits. In digital logic, a value of 1 corresponds to TRUE and a value of 0
corresponds to FALSE. That is, to convert a symbolic truth table to the
corresponding digital logic table, replace each TRUE with a one and each FALSE
with a zero:

Symbolic Logic ValueDigital Logic ValueTRUE 1 FALSE 0

A ** NOT gate**, also known as an **inverter**, has one input and its output value is the opposite
of its input value.

Input Output 0 1 1 0

The symbol used to indicate an inverter on a circuit diagram is shown below. The triangle indicates a buffer; a component that amplifies a digital signal. The small circle at the output indicates the NOT or inversion operation.

In Boolean algebra, the NOT operation is indicated by a bar over the operand as indicated in this table:

0 1 1 0

An **AND gate** has two or more inputs. Its output is 1
(i.e., true) only if all of its inputs are 1.

A B A AND B 0 0 0 0 1 0 1 0 0 1 1 1

Notice that the AND operation produces the same results as numeric multiplication. Consequently, in digital logic the AND operation is written as multiplication:

A B AB 0 0 0 0 1 0 1 0 0 1 1 1

The symbol for a two-input AND gate is shown below.

The definitions and symbols for AND gates with more than two inputs are similar. Shown below are the definition and symbol for a three-input AND gate. Remember that though the notation looks like multiplication, it represents the AND operation.

A B C ABC 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

An **OR Gate** has two or more inputs. Its output is 1
if any one or more of its inputs have a value of 1. Put another way, its
output is 0 if only if all of its inputs are 0.

A B A OR B 0 0 0 0 1 1 1 0 1 1 1 1

The outputs are very similar to those you would get if this were a numeric addition table (only the last row is different). Because of this similarity, in digital logic the OR operation is usually indicated by addition.

A B A + B 0 0 0 0 1 1 1 0 1 1 1 1

Here is the symbol used to represent a two-input OR gate:

The definitions and symbols for OR gates with more than two inputs are similar. Shown below are the definition and symbol for a three-input OR gate. Remember that the + symbols denote the OR operation and not numeric addition.

A B C A+B+C 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1

The logic gates described in the previous section are used to design digital
circuits. The output value of a **combinational circuit** is defined solely
on the basis of its input values. The output of a **sequential circuit** is
based on its input values and its previous output value. We will not be
designing any sequential circuits.

The initial step in designing a digital circuit is to derive a Boolean expression based on the circuit's truth table. This is a two step process.

Step 1. For each row in the truth table having an output value of one, form a product (AND) expression that will equal one. This product will contain one factor for each input variable. Since the resulting product must be 1, each factor must equal one. When forming the product for a given row, apply this rule to each variable:

If the value for the input variable is 1 then use the variable as a factor in the product; otherwise use the NOT of the variable as the factor.

For example, if the value of A in a given row is 1 then A would appear as a factor in the corresponding product. If the value of A is 0, however, then would appear as a factor in the product.

Step 2. The Boolean expression for the circuit is found by adding (ORing) the
products found in step one and is called the **sum of products**
expression.

Design a digital circuit whose output values are defined by the following table.

Inputs |
||

A |
B |
Output |

0 | 0 | 0 |

0 | 1 | 1 |

1 | 0 | 1 |

1 | 1 | 0 |

When designing a digital circuit, we look only at the rows in which the output value is one. For each such row write a product (AND) that results in a value of one. In order for the product to be one, each factor in the product must be one. That is, the AND operation (denoted as a product) is one only if all of the terms have a value of one.

Consider the second row in the body of the table above. We will use a factor of (NOT A) in the product since has a value of one when A is zero. Since the value of B is one, we will use a factor of B in the product. Our final product is B since this product will give us a value of 1 in the second row:

In a similar fashion, we write a product that results in a value of 1 in the third row:

Now that we have found the appropriate product for each row, the output can be
expressed as the sum of the products:** **

To construct this circuit, we will need two NOT gates (one for each variable), two 2-input AND gates (one for each "product"), and a 2-input OR gate (to "add" the two "products"):

The inverters are used to obtain NOT A and NOT B respectively. The upper AND gate generates the product of NOT A AND B. The lower AND gate generates the product of A AND NOT B. The OR gate generates the sum (OR) of these two products.

A truth table can be used to verify that the sum of products expression generates the correct results:

This digital circuit actually has a practical application. It finds the arithmetic sum of two binary digits.