Circuit Analysis
Asst. Prof. Mohanad Alayedi
Department of Software Engineering
Haliç University
mohanadysalayedi@halic.edu.tr
CEN203, Summer 2024
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 1
Logic functions of N variables
➢ Important concept – analyze digital circuits
• Given a circuit
- Create a truth table
- Create a minimized circuit
➢ Approaches
• Boolean expression approach
• Truth table approach
➢ Leads to minimized hardware Provides insights on how to
design hardware
• Tie in with K-maps (next time)
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 2
The Problem
➢ How can we convert from a circuit drawing to an equation or
truth table?
➢ Two approaches
➢ Create intermediate equations
➢ Create intermediate truth tables
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 3
Label Gate Outputs
1. Label all gate outputs that are a function of input variables.
2. Label gates that are a function of input variables and previously labeled gates.
3. Repeat process until all outputs are labelled.
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 4
Approach 1: Create Intermediate Equations
➢ Step 1: Create an equation for each gate output based on its input.
➢ R = ABC
➢S = A + B
➢ T = C’S
➢ Out = R + T
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 5
Approach 1: Substitute in subexpressions
➢ Step 2: Form a relationship based on input variables (A, B, C)
➢ R = ABC
➢S = A + B
➢ T = C’S = C’(A + B)
➢ Out = R+T = ABC + C’(A+B)
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 6
Approach 1: Substitute in subexpressions
➢ Step 3: Expand equation to SOP final result
➢ Out = ABC + C’(A+B) = ABC + AC’ + BC’
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 7
Approach 2: Truth Table
➢ Step 1: Determine outputs for functions of input variables.
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 8
Approach 2: Truth Table
➢ Step 2: Determine outputs for functions of intermediate variables.
T = S * C’
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 9
Approach 2: Truth Table
➢ Step 3: Determine outputs for function.
R + T = Out
A B C R S T Out
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 1 1 1
0 1 1 0 1 0 0
1 0 0 0 1 1 1
1 0 1 0 1 0 0
1 1 0 0 1 1 1
1 1 1 1 1 0 1
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 10
More Difficult Example
➢ Step 3: Note labels on interior nodes
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 11
More Difficult Example: Truth Table
➢ Remember to determine intermediate variables starting from the inputs.
➢ When all inputs determined for a gate, determine output.
➢ The truth table can be reduced using K-maps.
A B C F2 F’2 T1 T2 T3 F1
0 0 0 0 1 0 0 0 0
0 0 1 0 1 1 0 1 1
0 1 0 0 1 1 0 1 1
0 1 1 1 0 1 0 0 0
1 0 0 0 1 1 0 1 1
1 0 1 1 0 1 0 0 0
1 1 0 1 0 1 0 0 0
1 1 1 1 0 1 1 0 1
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 12
Summary
➢ Important to be able to convert circuits into truth table and equation
form
➢ WHY? ---- leads to minimized sum of product representation
➢ Two approaches illustrated
➢ Approach 1: Create an equation with circuit output dependent
on circuit inputs
➢ Approach 2: Create a truth table which shows relationship
between circuit inputs and circuit outputs
➢ Both results can then be minimized using K-maps.
CEN203, Fall 2024 2024, Dr. Mohanad Alayedi (Haliç University) 13