Today's Outline
digital hardware basics:
resistors and LEDs
Ohm's law
transistors and switches
voltages as bits
magnetic cores
punched cards, magnetic tape
Hexadecimal numbers (Hex)
Binary-Coded Decimal (BCD)
ASCII
Project 1
Mailing List, Homework, Lab
Be sure you are signed up for the mailing list
Lab hours:
Monday and Wednesday 2:30 to 5:45
Friday 10 to 4
homework 1:
due Wednesday, September 3, in class (or email to
esb@hawaii.edu
before the start of class)
single-page answer (don't show calculations)
p. 16, exercise 1-8
p. 17, exercises 1-12, 1-15, 1-23
p. 18, exercises 1-31, 1-34
Project 1:
due Friday, August 29, in the lab
http://www2.ics.hawaii.edu/~esb/2003fall.ics331/project1.html
Voltage, Current, and Resistance
DC (Direct Current) voltage is fixed at a certain level, for example 5V
some materials are
insulators
: even with a voltage applied, very little current flows (e.g. plastic, rubber, glass)
some materials are
conductors
: with a voltage applied, strong current can flow (e.g. metal, impure water)
some materials are
semiconductors
: they normally don't conduct, but an applied voltage can turn them into conductors
Resistors and LEDs
A resistor is an electrical conductor that:
has known resistance (explained later)
can convert electrical energy to heat
A Light-Emitting Diode (LED) is an electrical conductor that:
has variable resistance (the resistance depends on the applied voltage)
can convert electrical energy to light
Ohm's law
Ohm's law: a resistor with resistance R and a voltage V applied to it has a current I flowing through it equal to: I = V/R
Ohm
(
) is the unit of resistance
Volt
(V) is the unit of voltage
Amp
(A) is the unit of current
there must be a 10V voltage for a 10-mA current to flow through a 1K
resistor
if we have 5V across a 10K
resistor, the current is 500uA
voltage, current, and resistance can all be measured with a multimeter
power is V I = V
2
/R = I
2
R. For example, 5V across 100
uses 0.25W.
In-class exercises
I have a current of 1mA. How much resistance do I need to achieve a 5V voltage drop?
a 100W, 110-volt light bulb has how much resistance? how much current does it consume?
I have a 1K
resistor designed to handle up to 1W. How much voltage can I put across it? What is the current at that voltage?
Series and Parallel Connections
two resistors in series have the same current going through them. Therefore, the voltage across each resistor is proportional to the resistance
two resistors in series have the same voltage across them. Therefore, the current through each resistor is inversely proportional to the resistance
Transistors
a bipolar transistor is a component with three terminals:
an
emitter
(positive side --
source
in an FET)
a
collector
(negative side --
drain
in an FET)
a
base
(control side --
gate
in an FET)
a transistor (in saturation mode) is a switch:
a zero voltage at the base (or gate) results in no current flowing from the emitter to the collector (source to drain)
a high (5V) voltage at the base (or gate) results in lots of current flowing from the emitter to the collector (source to drain)
Transistor gates
inverter (NOT gate)
NAND gate
NOR gate
AND gate
OR gate
driving LEDs
Voltages as bits
the circuits we will be using,
any voltage above 4.5V is a 1 bit
any voltage below 0.7V is a 0 bit
any other voltage is probably the consequence of a design or wiring error
Storage
magnetic cores:
core is magnetized by a current
core retains magnetism after current stops
an erase pulse can erase the core
the magnetic field only changes if the core was magnetized
a change in the core's magnetic field is detected by a
sense
wire
magnetic tape or disk:
spot on magnetic surface is magnetized
motion past head creates current proportional to magnetization
punched cards
Hexadecimal Numbers
16 digits: 0..9 and A..F (or a..f)
each hex digit corresponds to 4 bits
conversion to and from decimal
conversion to and from binary
Binary Coded Decimal
4 bits per decimal digit
binary 0000 (for 0) to 1001 (for 9)
arithmetic is a lot as for decimal numbers
take more space than binary numbers
ASCII
American Standard Code for Information Interchange
standard encoding for letters, digits, and many symbols
7-bit code fits in a byte
"A" is
0x41
(65), "Z" is
0x5A
(90)
"a" is
0x61
(97), "z" is
0x7A
(122)
"0" is
0x30
(48), "9" is
0x39
(57)
" " (space) is
0x20
(32)
man ascii
on unix gives the translations