CPE 201/EE 236 Lab 2

(UNR/2005 Spring)

Logic Gates


Introduction (5 points):

      Boolean algebra can be represented mathematically by using symbols called logic gates. The three basic operations of Boolean Algebra (AND, OR, and NOT) can be represented by three logic gates (AND, OR, and NOT).


Objective (5 points):

       The objective of this lab is to acquaint you with the 3 basic logic gates: AND, OR, and NOT. Additionally, you will learn about XOR gates.

       For background information, an AND gate only outputs a 1 if both of its inputs are 1's. One way to think about this is to think - "If its inputs are 1 AND 1,then it outputs a 1" - . An OR gate outputs a 1 if either of its inputs are 1's. Finally, a NOT gate simply outputs the opposite of the input. As for the other gate, it's up to you to figure out how it works.
       Truth tables will be used to gather information about each gate/circuit you will be analyzing. Truth tables contain a column on the left side that lists all possible combinations of inputs to the circuit, and a column on the right side that lists each output as a result of the inputs. Each truth table will have 2n rows, where n is the number of inputs. Here is an example truth table for a logic gate that will be introduced in this lab that has 2 inputs (A, B) and 1 output (Z):

AB Z
00 0
01 1
10 1
11 0

       All the logic gates we will be using are located in the "Logic Gates" palette in EWB. Additionally, in order to reduce the pains of obtaining a truth table, you will be using a "Logic Converter" at the output of each circuit. The "Logic Converter" is located in the "Instruments" palette.


Procedure (80 points):

  I)  Combinational Logic (20 points):

Derive truth tables for the following circuits in EWB using the "Logic Converter". Include a picture of each circuit along with the "Logic Converter" used for determining the truth table in your lab report. (Important notice: please mark in your circuit picutre the input and output ends with letters such as "A", "B"....)




  II)  Design and Implementation (30 points):

  Design and test the following circuits in EWB. Each circuit has 2 inputs (A and B), and one output. Make sure you take a picture of each circuit to include in your lab write-up. (Hint: Start by creating a truth table for each circuit)

  1. A circuit that outputs "1" ONLY when A is "0" and B is "0" (5 points).
  2. A circuit that outputs "1" ONLY when A is "0" and B is "1" (5 points).
  3. A circuit that outputs "1" ONLY when A is "1" and B is "0" (5 points).
  4. A circuit that outputs "1" ONLY when A is "1" and B is "1" (5 points).
  5. Using only NAND gates implement an OR gate (5 points).
  6. Using only NAND gates implement an XOR gate (5 points).


  III)  Learn to use breadboard to test IC gates. Show the operation processes to the lab TA (20 points):

  1. About breadboard: power lines, ground lines, column lines, divides.

  2. About IC chip: notch orientation, pin numbering (counterclockwise), power/ground pins, input pins, output pins, and number of pins,

  3. How to push a chip onto the breadboard.

  4. How to take a chip off the breadboard (be careful and use chip puller!!).

  5. Test XOR (7486) on breadboard (using EWB for 7486/XOR logic diagram).

7486/xor


   IV) Write the decimal, binary, and hexadecimal numbers for the decimal number pairs : (2n-1) , (2n),  where n = 1,  2,  3, ..., 10, 11, 12.  Try to remember them by heart. They can save you lots, lots of time in your future courses and projects (Please note the number of 0's or 1's in their binary formats) (10 points).

Conclusion (5 points):