# Lab 2: Karnaugh Maps & 2-Input NAND & NOR Circuits Solution

Introduction

The goal of this lab is for you to prepare the design of combinational circuits and implementation of them on the Digital Design board during the lab session.

The objectives of this lab are to be able to:

· Simplify an expression in both Product-of-Sums and Sum-of-Products forms.

· Design circuits using only a signal type of gate.

· Use Karnaugh maps.

· Implement a Gray Code

· Prepare circuit diagrams.

NOTE: Your completed pre-lab worksheet is to be submitted in class on Friday, September 16, 2016.

Part 1: Pre-Lab Exercises: Complete Before the Lab

1. Write down a simplified expression for the function, F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13) in Sum-of-Products (SOP) form. (Use a Karnaugh map to assist with the simplification.)

– Show your work and the simplified equation, 𝐹, on “PreLab 2 worksheet”

(electronic version provided below and separately in Connex resources)

2. Draw a logical circuit that represents the expression in 1 (above) using OR gates, AND gates and inverters on the main inputs, A, B, C and D.

– Your circuits should be drawn with a circuit drawing program, two are available in the lab, Visio and Logic Works. Copy your circuit drawing onto the PreLab 2 worksheet.

3. Now create the Product-of-Sums (POS) form of F.

4. Now draw the POS form of the circuit using OR and AND gates (plus inverters on the main inputs.)

5. Finally, re-draw the circuit using only 2-input NOR gates (plus inverters on the main inputs.)

– Using the Data Sheet for the 7402 chips, label each gate input and output with the pin of the chip that will be used in your lab construction. Add these labels to your circuit, then paste into your PreLab 2 worksheet.

NOTE: You can and should check your solutions to the pre-lab exercises with your course instructor or lab leader (both hold office hours) who will have a solution set available at all office hours & classes.

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 2 of 4

6. Digital Systems generally represent ‘human’ information via some sort of code. For example, BCD is a binary coded representation of the decimal values 0 through 9. It is often necessary in digital circuits to convert from one code to another. Other codes have other properties. As an example, a Gray code has the property that the code words for successive decimal digits differ in exactly one bit. The table below shows a three bit pattern, labeled as “ABC” and a corresponding Gray code to represent this pattern.

Input

Gray Code

ABC

X Y Z

0 0 0

0 0 0

0 0 1

1 0 0

0 1 0

0 1 0

0 1 1

1 1 0

1 0 0

0 0 1

1 0 1

1 0 1

1 1 0

0 1 1

1 1 1

1 1 1

Using the table above complete three Karnaugh maps for the functions X, Y, and Z in terms of the three inputs A, B and C.

– Show your work and the simplified equations for 𝑋, 𝑌, and 𝑍 on the PreLab 2 worksheet.

7. Draw a circuit that realizes 𝑋, 𝑌, and 𝑍 using only 2-input NAND gates and Inverters on the inputs. Using the Data Sheets for the 7432 and 7400 chips, label each gate input and output with the pin of the chip that will be used in your lab construction. Then copy and paste into your PreLab 2 worksheet.

Part 2: Procedures for the In-Lab Exercises

1. Greet your lab instructor and review your marked Pre-Lab Worksheet 2. Inform him/her that you have reviewed the posted solution set before attending the lab.

2. Build the circuit as designed in the Pre-Lab exercise #4 and test to ensure it functions.

3. Demo the working circuit to your instructor.

4. Build the circuit as designed in the Pre-Lab exercise #7 and test to ensure it functions.

5. Demo the working circuit to your instructor.

6. Do we want to do something with these circuits and Design Works?

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 3 of 4

Pre-Lab Worksheet #2 NAME: _________________ LAB Section: B0__

1. The SOP of : F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13)

AB\CD

00

01

11

10

00

01

11

10

2. The circuit that represents the SOP of F(A,B,C,D) using OR gates, AND gates and inverters (on main inputs).

3. The POS of : F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13)

AB\CD

00

01

11

10

00

01

11

10

4. Draw the POS form of the circuit using OR and AND gates (plus inverters on the main inputs.)

5. Re-draw the circuit using only 2-input NOR gates (plus inverters on the main inputs.) Include pin numbers.

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 4 of 4

6. Karnaugh maps and simplified functions X, Y, and Z

A\BC

00

01

11

10

0

1

X

A\BC

00

01

11

10

0

1

Y

A\BC

00

01

11

10

0

1

Z

7. Draw circuits for 𝑋, 𝑌, and 𝑍 using only 2-input NAND gates and Inverters on the inputs. Include chip pin numbers on all inputs and outputs.

Finally, write a list of things that you learned in doing this pre-lab:

The goal of this lab is for you to prepare the design of combinational circuits and implementation of them on the Digital Design board during the lab session.

The objectives of this lab are to be able to:

· Simplify an expression in both Product-of-Sums and Sum-of-Products forms.

· Design circuits using only a signal type of gate.

· Use Karnaugh maps.

· Implement a Gray Code

· Prepare circuit diagrams.

NOTE: Your completed pre-lab worksheet is to be submitted in class on Friday, September 16, 2016.

Part 1: Pre-Lab Exercises: Complete Before the Lab

1. Write down a simplified expression for the function, F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13) in Sum-of-Products (SOP) form. (Use a Karnaugh map to assist with the simplification.)

– Show your work and the simplified equation, 𝐹, on “PreLab 2 worksheet”

(electronic version provided below and separately in Connex resources)

2. Draw a logical circuit that represents the expression in 1 (above) using OR gates, AND gates and inverters on the main inputs, A, B, C and D.

– Your circuits should be drawn with a circuit drawing program, two are available in the lab, Visio and Logic Works. Copy your circuit drawing onto the PreLab 2 worksheet.

3. Now create the Product-of-Sums (POS) form of F.

4. Now draw the POS form of the circuit using OR and AND gates (plus inverters on the main inputs.)

5. Finally, re-draw the circuit using only 2-input NOR gates (plus inverters on the main inputs.)

– Using the Data Sheet for the 7402 chips, label each gate input and output with the pin of the chip that will be used in your lab construction. Add these labels to your circuit, then paste into your PreLab 2 worksheet.

NOTE: You can and should check your solutions to the pre-lab exercises with your course instructor or lab leader (both hold office hours) who will have a solution set available at all office hours & classes.

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 2 of 4

6. Digital Systems generally represent ‘human’ information via some sort of code. For example, BCD is a binary coded representation of the decimal values 0 through 9. It is often necessary in digital circuits to convert from one code to another. Other codes have other properties. As an example, a Gray code has the property that the code words for successive decimal digits differ in exactly one bit. The table below shows a three bit pattern, labeled as “ABC” and a corresponding Gray code to represent this pattern.

Input

Gray Code

ABC

X Y Z

0 0 0

0 0 0

0 0 1

1 0 0

0 1 0

0 1 0

0 1 1

1 1 0

1 0 0

0 0 1

1 0 1

1 0 1

1 1 0

0 1 1

1 1 1

1 1 1

Using the table above complete three Karnaugh maps for the functions X, Y, and Z in terms of the three inputs A, B and C.

– Show your work and the simplified equations for 𝑋, 𝑌, and 𝑍 on the PreLab 2 worksheet.

7. Draw a circuit that realizes 𝑋, 𝑌, and 𝑍 using only 2-input NAND gates and Inverters on the inputs. Using the Data Sheets for the 7432 and 7400 chips, label each gate input and output with the pin of the chip that will be used in your lab construction. Then copy and paste into your PreLab 2 worksheet.

Part 2: Procedures for the In-Lab Exercises

1. Greet your lab instructor and review your marked Pre-Lab Worksheet 2. Inform him/her that you have reviewed the posted solution set before attending the lab.

2. Build the circuit as designed in the Pre-Lab exercise #4 and test to ensure it functions.

3. Demo the working circuit to your instructor.

4. Build the circuit as designed in the Pre-Lab exercise #7 and test to ensure it functions.

5. Demo the working circuit to your instructor.

6. Do we want to do something with these circuits and Design Works?

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 3 of 4

Pre-Lab Worksheet #2 NAME: _________________ LAB Section: B0__

1. The SOP of : F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13)

AB\CD

00

01

11

10

00

01

11

10

2. The circuit that represents the SOP of F(A,B,C,D) using OR gates, AND gates and inverters (on main inputs).

3. The POS of : F(A,B,C,D) = Sm(1,2,3,5,6,9) + Sd(7,10,11,12,13)

AB\CD

00

01

11

10

00

01

11

10

4. Draw the POS form of the circuit using OR and AND gates (plus inverters on the main inputs.)

5. Re-draw the circuit using only 2-input NOR gates (plus inverters on the main inputs.) Include pin numbers.

Lab 2: Karnaugh Maps & 2-input NAND/NOR Circuits

CSC 355 Last update Aug. 2016 Page 4 of 4

6. Karnaugh maps and simplified functions X, Y, and Z

A\BC

00

01

11

10

0

1

X

A\BC

00

01

11

10

0

1

Y

A\BC

00

01

11

10

0

1

Z

7. Draw circuits for 𝑋, 𝑌, and 𝑍 using only 2-input NAND gates and Inverters on the inputs. Include chip pin numbers on all inputs and outputs.

Finally, write a list of things that you learned in doing this pre-lab:

You'll get a 444.6KB .ZIP file.