# Spring 2001 CSCI 255 Lab 2

This lab is scheduled for the week of 29 January - 2 February.

## Getting started

Before starting you may need to install some switches (inputs) and LED's (outputs) on your breadboard. In order words, your breadboard needs to look like it did at the end of Lab 1.

You should be able to find a post-Lab 1 breadboard constructed by at a previous lab session. However, don't just assume that previous lab group did a perfect job. Check out their work.

## The plan

This week you are going to implement two two-input Boolean functions using standard TTL circuits. The two functions are given in the following table:

x y f g
0 0 0 1
0 1 1 1
1 0 0 0
1 1 0 1

You should immediately recognize the first function as f(xy) = xy. The second one is a bit harder. It's g(xy) = x' + y, also known to fans of symbolic logic as x → y.

You are going to implement these circuits with two chips.

7400
7404
Hex inverter

That gives you six inverters and four two-input NAND gates for your implementation. Your first job is to figure out how to algebraicly implement f and g with these two chips.

We'll show you how to implement f(xy) = xy. Use an inverter to compute x'. Then NAND x' and y together and invert the output of the NAND. This gives you

• f(xy) = NOT(NAND(NOT(x), y))

Since we used two inverters and one NAND for f, that leaves four inverters and three NAND's for g.

What? You're not sure how you can make a logical OR with a NAND. Recall deMorgan's law:

• (α + β)' = α' β'

Still having trouble? What if we move invert both sides?

• α + β = (α' β')'

Well, if you insist, we'll do one more; but then you're on your own.

• α + β = NAND(α', β')

### Instructor check-off

Get the Lab 2 check-off form and write in equations for both f and g using inverters (NOT's) and two-input NAND gates. Have the lab instructor verify your work.

You'll notice that the Lab 2 check-off form has a space for some circuit schematic. We've already drawn in one for f. Now you draw in one for g.

## Task 3: Planning the wiring

The datasheets for the 7400 and the 7404 show how the pins of the chips are used. Since you don't have easy access to a computer during this lab, we're going to include pictures of the chip layout on the lab check-off form.

Your third task is to add some lines to this drawing showing how you will wire the two chips to implement the circuit specified in your schematic. Be sure to include wires for the circuit inputs, coming from the switches, and for the circuit outputs, going to the LED display. Also, include wires for power and ground.