Digital Logic Design · Lab 1 · read before the labAll labsGo to the lab →

The six gates and the first theorems.

Fifteen minutes of reading. Play with the gates below; then the trainer, the breadboard and the chips will feel familiar.

01

Binary logic

A digital signal has two values: 1 (HIGH, true) and 0 (LOW, false). A logic gate takes one or more such inputs and gives an output that depends only on the present inputs. The truth table lists the output for every combination of inputs: two inputs have 2 x 2 = 4 rows, three inputs 8 rows, n inputs 2n rows.

1 = 5 V

On the trainer a logic switch at 1 gives +5 V and at 0 gives 0 V. An LED lights for a 1.

2ⁿ rows

Every new input doubles the truth table. List the rows in binary order: 00, 01, 10, 11.

74xx

The 74 series TTL chips each hold a few identical gates: four two input gates, or six inverters.

02

The six gates

AND gives 1 only when all inputs are 1. OR gives 1 when any input is 1. NOT inverts. NAND and NOR are AND and OR followed by NOT (the small circle on the symbol). XOR gives 1 when the inputs differ. Click the inputs:

AB
X = 0
ABX
000
010
100
111

X = A . B · on the trainer: IC 7408

03

The trainer

The digital logic trainer supplies everything around the chips: a +5 V supply, 16 logic switches (S0 to S15) for inputs, 16 LEDs (L0 to L15) for outputs, push switches, toggle switches, a clock, a seven segment display and a voltmeter. Each switch and LED has gold header holes; you wire from those holes to the breadboard.

  • Any switch S0 to S15 and any LED L0 to L15 works the same; the steps suggest S2 to S9.
  • Wire with the power off when you can, then switch POWER on and test.
  • In the virtual lab, hover over any hole to see what it is joined to and its level.
04

The breadboard

abcdefghij

Click a hole. Green holes are joined to it inside the board: a column of five (a to e, or f to j), or a whole rail row. The channel in the middle separates the two halves, so a chip straddling it has every pin on its own column.

05

Chip pins and power

7408Quad 2-input AND11A21B31Y42A52B62Y7GND83Y93A103B114Y124A134B14VCC

Hold the chip with its notch on the left. Pin 1 is at the bottom left, the pins count up to the right, then continue along the top from right to left. Most 14 pin chips have VCC on pin 14 and GND on pin 7, but not all: check every new chip.

A chip works only when it has power: +5 V on VCC and 0 V on GND. For every chip in this lab that is pin 14 and pin 7. The easiest way: wire +5 V and GND to the red and blue rails of the breadboard once, then each chip's VCC and GND to the rails.

06

TTL voltage levels

Reads as HIGH: logic 1. A gate output gives about 3.4 V for 1 and 0.2 V for 0, so there is room for noise on both sides.

An input that is not connected (floating) acts as a 1 on TTL chips, which often hides a missing wire. Never leave an input you use floating: wire it to a switch, to +5 V or to GND.

07

Boolean theorems

A + A.B = A

Absorption: if A is 1 the output is 1; if A is 0, A.B is 0 too. B never matters.

A.(A+B) = A

The dual form: swap AND and OR. Again the output just follows A.

A + A' = 1

And A.A' = 0. With A + 0 = A and A.1 = A these let you simplify any expression.

In Task 3 you prove absorption with real gates: two chips are enough, and the output LED copies switch A whatever switch B does.

08

De Morgan's laws

First law(A + B)' = A' . B'a NOR equals an AND of inverted inputs
Second law(A . B)' = A' + B'a NAND equals an OR of inverted inputs

Break the bar and change the sign. In Tasks 4a and 4b you build both sides of each law on two LEDs and watch them agree on every row.

09

Faults to avoid

  • No power: a chip without VCC or GND does nothing; its outputs stay dark.
  • Reversed supply: +5 V on pin 7 and GND on pin 14 destroys the chip (on the bench and here).
  • 12 V: the +12 V post is not for TTL chips. One touch on VCC or an input damages the chip.
  • Outputs joined: two outputs on one wire, or an output wired to +5 V or GND, fight and overheat.
  • +5 V wired to GND: the trainer supply trips. Remove the wire.
10

Check yourself

Q1A 7408 has 14 pins. How many AND gates does it have, and which pins are VCC and GND?

Four two input AND gates. VCC is pin 14 and GND is pin 7.

Q2Which gate gives 1 when its two inputs are different?

XOR (exclusive OR), the 7486.

Q3You wired an AND gate but the LED stays on for every row. What could be wrong?

An input may be floating (it reads 1), or the LED is wired to a switch instead of the gate output.

Q4Simplify A + A.B.

A (absorption).

Q5Write (A . B)' with De Morgan.

A' + B'.

I am ready, go to the lab →