Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Attendance code: 11987688

Overview
 Why is digital electronics useful?
 The digital part of the module
 Key ideas in week 3’s videos
Electrical Engineering 1  Examples

Overview of Digital Electronics


Dr Steven Quigley

Digital Electronics What’s Good about Digital?


 Deals with signals that can only take one of two values:  Any useful signal can be corrupted by noise:
 off or on  Thermal fluctuations
 0 or 1  Environmental vibrations
 Take something we want to measure or control, e.g.  Electromagnetic interference
 position/velocity,  Aging effects (if we’re storing for a long period)
 angle/angular velocity, Original signal Noisy signal
 temperature,
 pressure,
 light level…
 Take samples at time intervals time time

 Convert to binary numbers  May be no easy way to extract the signal from the noise
 Then do useful manipulations on these numbers  Noise can be reduced by using expensive equipment

What’s Good about Digital? What’s Good about Digital?


 Digital signals and devices don’t care about the exact value  It’s the language of computers
 Complex systems may require a long sequence of processing
Original signal Noisy signal  Copying, saving, adding, subtracting
 Each stage of processing can introduce unwanted noise
These values are 1
 Digital is very robust against corruption by noise
These values are 0
time time

 They just threshold and classify: big or small


 Very cheap equipment can have excellent noise immunity
www.youtube.com/watch?v=G8GOcB6H0uQ

1th
2
3
4 st copy
nd
rd copy
copy

What’s Good about Digital? What’s Good about Digital?


 It’s the language of computers  It’s the language of computers
 Complex systems may require a long sequence of processing  Complex systems may require a long sequence of processing
 Copying, saving, adding, subtracting  Copying, saving, adding, subtracting
 Each stage of processing can introduce unwanted noise  Each stage of processing can introduce unwanted noise
 Digital is very robust against corruption by noise  Digital is very robust against corruption by noise
 Analogue does not have this property
 Here’s an example of repeated copying of a music video
using the old analogue video format

Analogue Digital
Same video after same number of copies on low cost equipment

What’s Good about Digital? The Digital Part of the Module


 It’s the language of computers  Week 3: Basic ideas
 Complex systems may require a long sequence of processing  Building blocks (logic gates)
 Copying, saving, adding, subtracting  Data formats (binary, hexadecimal, Gray)
 Each stage of processing can introduce unwanted noise  The algebra of digital devices: Boolean algebra
 Digital is very robust against corruption by noise

The Digital Part of the Module The Digital Part of the Module
 Weeks 4, 5: Microcontrollers lab  Week 4: Applying Boolean algebra
 Embedded computer chip  Take an arbitrary user requirement and turn it into a design
 Connecting to sensors/actuators  Boolean algebra tells us how to do this

 Reporting results to computer  Optimise a design


 Making an actuator respond to a sensor reading  If we have a design, Boolean algebra tells us how to find
a more efficient design that does the same thing
 That will complete our treatment of combinational logic
 Combinational logic has no sense of time, history or sequence
 Outputs are determined solely by input values at that time
The Digital Part of the Module The Digital Part of the Module
 Week 8: Systems can generate or respond to sequences, e.g.  Week 9: Systems that can do computation
 Digital clock  Arithmetic systems
 Motor controller  Programmable systems
 What goes on inside a microcontroller

Lab in Weeks 10, 11 Ideas in Week 3 Video Lectures


 Combine analogue and digital to make sensor and  Digital deals with things that have two states
control system for a robot Yes, no

 Get the robots to play follow-my-leader
 On, off
 True /False
 1, 0
 Sometimes we deal with things that are automatically true, false

Dealing with things that are True/False Dealing with things that are True/False
 Digital deals with things that have two states  Burglar alarm
 Yes, no A. the alarm is enabled
 On, off B. the upstairs window is closed
 True /False C. the downstairs window is closed
 1, 0  Sound-The-Alarm = A AND ((NOT B) OR (NOT C))
 Sometimes we deal with things that are automatically true, false

Upstairs window is closed? Upstairs window is closed?

Downstairs window is closed? Downstairs window is closed?


Dealing with things that are True/False Dealing with things that are True/False
 Sometimes things don’t obviously work as true, false  Sometimes things don’t obviously work as yes, no
 Moving a robot arm  Moving a robot arm
 Simple Yes/No is no good

Our robot only knows


• above horizontal and
• below horizontal
Can’t sense precise angle
Yes

No

Quantizing continuous values Quantizing continuous values


 We encode continuous values as numbers  We encode continuous values as numbers
 Keep moving clockwise until you reach zone 5  Keep moving clockwise until you reach zone 5
 Binary number coding can represent numbers as 1s and 0s

7 111
7
6 6
110
5 5
101
Yes
4 4
100
3 011
3
No
2 2
010
1 1
001
0 000
0

Number Formats Binary


 In everyday life we normally base-10 (denary)  For our circuits, we can only have two symbols: 0 and 1
 Example: what does the (denary) number 365 mean?  We use the base 2 (binary) number system
3100 + 610 + 51  Example: what does the binary number 101 mean?
3  102 + 6  101 + 5  100 14 + 02 + 11

The 3, 6 and 5 are called denary digits 1  22 + 0  21 + 1  20


The 1, 0, 1 are called binary digits: bits
 This system can represent any number using ten symbols: Base 10 Binary
 0, 1, 2, 3, 4, 5, 6, 8, 9 0 000
1 001 There are 2n different n-bit
 A 3 digit number can represent the range 0 to 999 2 010
binary numbers
 There are 10n different 3-digit numbers 0, 1, …, 998, 999 3
4
011
100
5 101
6 110
7 111
Getting Good Resolution Getting Good Resolution
 This example isn’t great: we can’t get an exact angle  We can get better resolution by dividing our angle into
 The control system will move the arm to somewhere many very small sectors
in sector 5, but that covers a wide range of angles

255
111
7 7
6
110 Here we’ve divided 6
5
101 180° into 256 sectors 5

4
100 Much better resolution 4
011
3 256 = 28 3
2
010 Needs 8-bit numbers 2
1
001 1
000
0 0 0

Converting binary to denary Leading zeroes


 I can put zeroes in front of number without changing its
meaning.
1101001  In base 10:
 (365)10 is the same as (00365)10
126 + 125 + 024 + 123 + 022 + 021 + 120 010000 + 01000 + 3100 + 610 + 51
= 164 + 132 + 016 + 18 + 04 + 02 + 11 0  104 + 0  103 + 3  102 + 6  101 + 5  100
= 105
 In binary
 1010 is the same as 0001010
The base of a number is often indicated by a subscript.
 e.g. (105)10 indicates the base-10 (denary) number 105 064 + 032 + 016 + 18 + 14 + 02 + 11
 (1101001)2 is its base-2 (binary) counterpart 0  26 + 0  25 + 0  24 + 1  23 + 1  22 + 0  21 + 1  20

Attendance code: 11987688

Electrical Engineering 1

Overview of Digital Electronics

You might also like