8/24/2015
Welcome!!!
PHGN317 DigitalElectronics
August26,2015
BrianHuang
[Link].c@[Link]
MeettheTAs/SupportStaff
Textbook/Reference
SteveHill LabManager
CaseyCartwright
DavidGrisham
SarahDunn
EmilyMakoutz
MichaelYoung
Look for homework problems
for each lecture
Homework problems are posted for each lecture.
Try these the night after the lecture - they will provide
you with a direct metric of how well you understood the
days material.
The solutions are also posted.
If you struggle with the problems - that is a message to
you that you need extra help!
A newsletter is sent out via email at the end of each
month that summarizes the concepts you should be
familiar with at that point in the course.
Beginreview
8/24/2015
Extracreditdoaprojectthatchanges
theworld...
Extracreditdoaprojectthatchanges
theworld...
Announcing the Blaster
Hackers/Maker space
[Link]
MainPoints
DigitalElectronics
Well meet next Wednesday 4 to 6 PM in the electronics lab.
Come make/hack your own project or help with on going
projects
Quad Copters
Autonomous Vehicles
3D LED displays
[Link]
Hack a DVD player to make laser tweezers
GPS systems
????
I. Why digital?
CDs/[Link]
[Link]
[Link]
[Link]
[Link]
Wecancontrol/Manipulatedigital!
EmphasizessignalsthatareeitherTRUE(1)or
FALSE(0).
Emphasizeslogicanddecisiontrees.
AnalogElectronics
Emphasizessignalsthatcancoverarangeof
values.
AnalogElectronicsworkswithsignalsthatcanbe
anyvalueacrossarangeofvalues.
1.1 Analog versus Digital
Analog
Digital
Continuously
variable
Discrete (1 or 0)
Amplification
Switching (ON/OFF)
Voltages
Numbers
8/24/2015
1.2 Digital logic levels
ThresholdsandMargins
5V
Logic High
2V
Undefined
0.8 V
Logic Low
0V
Binary system has only two digits, 0 and 1
1.3 Why we use digital
1.4Binarynumbersystem
Digital is repeatable.
As scientists and engineers, we want to be able
to make quantitative measurements of physical
phenomena.
Digital electronics enables unprecedented
control over acquisition and analysis.
Using our knowledge of analog electronics, this
semester we will learn to create effective digital
systems useful for general experimentation.
Binarysystemusesjusttwodigits/symbolsfor
counting forusweuse1and0 but,wecould
useanytwosymbols
IntheDecimalsystem
Whatisthemaximumvalueyoucanrepresent
with2digits?
with3digits?
with6digits?
Howmanyvaluescanyourepresentwith
your10symbols?
EachsymboliscalledabitforBinarydigIT.
1.4Binarynumbersystem
With
1bit,wecancount0to1(indecimal)
0,1
2bits,wecancount0to3(indecimal)
00,01,10,11
3bits,wecancount0to7(indecimal)
000,001,010,011,100,101,110,111
4bits,wecancount0to15(indecimal)
0000,0001,0010,0011,0100,0101,0110,0111,
1000,1001,1010,1011,1100,1101,1110,1111
Foratotalof totalnumbers.
WithNbitswecancountupto
For example, with 8 bits, we can count up to
28 - 1= 255 for 256 numbers (including 0)
8/24/2015
Reviewofplacevalue(using10s)
2385
1000
100
10
1.4Binarynumbersystem
1
Any number can be written using only two Binary digITS or bits, 0 and 1.
Writtenanotherway:
2385
10
Example:
10
10
10
Wejustdontnormallythinkofthisway!
The most significant bit (msb) is the 1 (the left most bit) and the
least significant bit (lsb) is 0 (right most bit)
Decimaltobinaryconversion
Learnyourpowersof2
20 =1
21 =2
22 =4
23 =8
24 =16
25 =32
26 =64
10102 = (1 x 23) + ( 0 x 22) + (1 x 21) + (0 x 20)
= 8 + 0 + 2 + 0 = 10
Sumthepowersof2
Problem: Convert 23
27 =128
28 =256
29 =512
210 =1024
211 =2048
212 =4096
213 =8192...
to binary.
How many bits do we need?
Count: 32, 16, 8, 4, 2, 1 we need at least 5 bits.
Start subtracting away powers of 2 from 23
23
7
7
3
1
7
too much!
3
1
0
Decimaltobinaryconversion(yourturn)
Decimaltobinaryconversion
Sumthepowersof2technique
Divideby2technique
Problem: Convert 61
Problem: Convert 61
to binary.
Technique: Divide successively by 2, ignoring remainders
until you have a quotient of 0.
5
How many bits do we need? ____
61
29
13
5
1
1
29
13
5
1
0
to binary.
61
30
15
7
3
1
/
/
/
/
/
/
2
2
2
2
2
2
=
=
=
=
=
=
30
15
7
3
1
0
remainder 1 (LSB)
remainder 0
remainder 1
remainder 1
remainder 1
remainder 1 (MSB)
8/24/2015
Readabout,andbeabletoconvertusing
otherbases
Octal (base 8)
BinaryCodedDecimal(BCD)
Some binary machines represent digital numbers other
than straight binary, e.g., BCD. In BCD each decimal digit is
represented by four binary bits.
Hexadecimal (base 16) uses symbols:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Example: convert 390610 to BCD
3
9
0
0011
1001
0000
Gray code
6
0110
390610 = 0011 1001 0000 0110BCD
Binary coded decimal (BCD)
[Link]
ArithmeticReview
Conversion flowchart
AddingandSubtractinginBinary
Binary
Hexidecimal
decimal
BCD
Octal
Binary addition
Remember:
00,01,10,11
Add111102 and11002
1100
11110
+ 1100
101010
Allyouneedtoknowis:
00,01,10,11
Binary subtraction
Subtract 011 from 100
Remember:
00,01,10,11
Carry bits
100
- 11
1
Check:410 (=1002) 310(=112)=110
It seems trivial - but make sure you understand it ! In about 2 weeks
youll be asked to design a circuit that adds for homework, and then
build it in the lab.
8/24/2015
Binary subtraction
Subtract 011 from 100
Remember:
00,01,10,11
Binary subtraction
(Your turn)
Subtract 011 from 1001
1 10
100
- 11
1
1001
- 11
110
Check:410 (=1002) 310(=112)=110
Check:910 (=>10012) 310 (=>112)=610
Lecture Exercises
Remember:
00,01,10,11
110
Homework Exercises 1 - 4
Solutions on Blackboard
LON-CAPA