E21 Digital Logic Design Lecture #1
Introduction
- Why digital logic?
-
Focus of the course
-
Basics of digital logic (pretty simple)
-
Programmable digital devices: flexible design
-
Trouble-shooting digital circuits
-
Sensors and how to integrate them into digital systems
-
Microcontrollers and FPGAs as the "brains" of small (embedded) digital systems
-
Group project
- Combine sensors with digital systems
- Security system for the lab
- Keypads, motion sensors, infrared sensors, laser diodes & photodiodes
- Microcontroller/FPGA as a brain
-
Expectactions
- Keep up: we will move quickly through much of the introductory digital logic topics
- Let me know if we're moving too quickly or too slowly
- Lab work is very important, because you won't learn about digital design unless you do it
- Digital design is 10% fun (at best) and 90% turn the crank
- We should be using good tools to make turning the crank faster & easier
Syllabus
-
Textbook(s): I am going to select a second one, don't worry about it now.
-
Problem sets: Handed out thursday of each week, due the following thursday.
-
Labs: you can work in pairs.
-
Labs: will occur approximately each week, although some labs may extend to 2 weeks as appropriate.
-
Group project: labs will lead into the project, which will start around the middle of the semester.
-
Group project: current thinking is that we'll design a security system for the lab.
-
Lab Notebooks: each of you will need to keep a lab notebook (to be handed in with each lab).
In this notebook you need to keep enough information for someone else (like me) to recreate
your work. You should also sign and date each entry as you complete it. Some of your work
could potentially lead to a patent.
-
Late policy: it is not in your interest to be late with anything. Turn in what you have on time.
-
Web stuff: most things I will hand out on-line. http://www.swarthmore.edu/NatSci/bmaxwel1/classes/E21
-
All exams will be in-class exams, and there will be a final
The basis of digital systems
1's and 0's
-
Representing logical values as voltages
-
Hi range v. Lo range with a section in the middle (unspecified value)
-
Different hardware families have different ranges
-
As long as we can guarantee the specs, a digital system can reproduce a signal given specified inputs.
Logic gates
-
AND, OR, NOT (and symbols)
-
NAND
-
NOR
-
XOR, Buffer, Multiple input AND, OR, NAND, and NOR functions
SSI components
Small-Scale Integration components were the first building blocks.
-
Usually use 20 gates or less
-
Usually cost around 25 cents
-
7400 series (letters tell you the family, numbers the configuration & function)
-
7400 is a quad 2-input NAND gate
-
7404 is a hex inverter
-
7432 is a quad 2-input OR gate (and so on)
SSI components are usualy used to interface with other, more complex components. It's not efficient
to use them as the base building blocks except in some prototypes.
Number Systems
Living with 1's and 0's is fine if you can use them to represent something.
-
Binary is a number system (base 2)
-
Conversion from decimal to binary: keep dividing by 2
-
Conversion from binary to decimal: sum up the value of each place containing a one
Using binary numbers can be a real pain, and they are difficult to read.
-
Octal and Hexadecimal are two number systems that make it easier to read "bits"
-
Octal is base 8, and 3 bits (binary numbers) make one octal number.
-
Hexadecimal is base 16, and 4 bits make one hexadecimal number
-
Hexadecimal is preferred, because we think in terms of bytes (8 bits) not 3, 6, or 9 bit values
-
Explain hexadecimal (0-9, A-F)
-
Convert 61453 (decimal) to hex -> F00D
So how do we represent negative numbers?
-
Use a sign bit.
-
Use two's-complement representation (subtract from rn)
-
Think about it as a wheel
-
In binary, complement each digit and then add 1
-
Range: one more negative digit than positive: -rn to (rn - 1)
-
Binary Coded Decimals: 0-9 using 4 bits
-
Packed BCD representation (use a fixed number of 4-byte chunks with one chunk being the sign)
-
Gray codes: used for encoding position: only one bit changes at a time
-
ASCII codes: used for encoding both actions and characters (note BCD representation is consistent w/ASCII)
-
Encoding actions: traffic light example: NS go, NS wait, NS delay, EW go, EW wait, EW delay, G/Y/R for each, 6 codes
-
Often choose an encoding that minimizes the number of gates needed