## Logic Circuits

Logic circuits for digital systems are mainly categorized as combinational and sequential. Combinational circuits are time independent. They are employ logic gates. Outputs are a function of the present inputs which means they do not depend upon previous inputs. Operations can be specified by Boolean function. The most important combinational circuits are adders, subtractors, comparators, decoders, encoders, multiplexers.

On the other hand, sequential circuits are time dependent which requires a clock cycle. They use storage elements in addition to logic gates. Outputs are a function of the inputs and the state of the storage elements. Because state of the storage elements is a function of previous inputs, the outputs are depending on present as well as inputs. Operation can be specified by time sequence of inputs and internal states.

## Combinational Circuit

If there are *n* input variables, it has *2 ^{n}* possible input combinations. For each input combination there is one possible value for each output variable. If

*m*output variables, there are

*m*output functions, each with in-terms of

*n*input variables.

## Analyze Procedure

- Requires that we determine the function that the circuit implements
- Make sure that the given circuit is combinational by verifying “No Feedback” and “No Memory Element”
- Starts with a given logic diagram, compute

- A set of Boolean function
- A truth table
- An explanation of the Circuit Operation

- Design Verification.

As an example we analyze the following logic diagram.

You should label all the gate outputs that are a function of Inputs. After that determine Boolean function for each gate output.

T_{1} = A + B + C

T_{2} = ABC

F_{2} = AB + AC + BC

Now you label the gates that are a function of input variables and previously labeled gate outputs.

F^{‘}_{2} = (AB + AC + BC)^{ ‘}

T_{3} = F^{‘}_{2} T_{1}

F_{1} = T_{3} + T_{2}

Now we can combine above two steps and obtain the output Boolean function in term of input variables.

F_{1} = T_{3} + T_{2}

= F^{‘}_{2 }T_{1} +ABC

= (AB + AC + BC)^{ ‘} (A + B + C) +ABC

= (A^{‘} + B^{’) (}A^{‘} + C^{’) (}B^{‘} + C^{’) (}A+ B +C) +ABC

= (A^{‘} + B^{‘}C^{’) (}AB^{‘} + AC^{‘} + BC^{‘} +B^{‘}C) +ABC

=A^{‘}BC^{‘} + A^{‘}B^{‘}C + AB^{‘}C^{‘} +ABC

So far now we have derived the Boolean function. Next one is the truth table. To obtain the truth table from the logic diagram first thing is to determine the number of input variables. For n inputs, there are 2^{n} possible combinations.

- Label gate outputs that are a function of inputs and obtain the truth table of those gates that are a function of the input variables only.
- Label the gate that are a function of previously labeled gate and obtain truth table for them.
- Repeat the process above until all outputs are determined.

## Design Procedure

There are four steps in combinational design procedure. Let’s discuss each with following example.

**Design Specification**

Design a circuit which has 3 inputs and a one Output with following requirements.

- When the input is less than 5, Output = 0
- Otherwise Output = 1

**Step 1**

According to the given specs of the circuit determine the number of inputs and outputs and assign a symbol to each.

So, we know that when the input is less than 5, Z should be 0. First of all, label the inputs as A, B, C and the Output as Z. Since there are three inputs we can say that input is a 3-bit binary.

- Inputs: A.B, C
- Output: Z

Z = 0 for 000_{2}, 001_{2}, 010_{2}, 011_{2}, 100_{2}

Z = 1 for 101_{2}, 110_{2}, 111_{2}

**Step 2**

Derive the truth table to define the required relationship between inputs and outputs.

**Truth table**

**Step 3**

Simplify the Boolean function for each output as a function of input variables.

Use Karnaugh Map to Minimization. See the previous post about Karnaugh Maps here

Z = (B+ C). A

**Step 4**

Draw the logic diagram and verify the correction of the design by manually or with simulations.

Simulations is done by NI Multisim 14.2