Download No Slide Title

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Alternating current wikipedia , lookup

Electronic musical instrument wikipedia , lookup

Buck converter wikipedia , lookup

Stray voltage wikipedia , lookup

Voltage optimisation wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Music technology (electronic and digital) wikipedia , lookup

Oscilloscope types wikipedia , lookup

Mains electricity wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
w
Digital Information
Engineering Science
EEE116J1
Prof Paul Maguire
[email protected]
eee116j1 1
w
Examples of Digital Communication
• Computer to Computer
– email, web browsing, downloading files
• Text Messaging
• Digital TV
• Within Computer
–
–
–
–
central processing unit (CPU) to RAM
RAM to hard disk
RAM to CD
to printer, to screen, to camera, to PDA
eee116j1 2
w
Analogue World
• Most things in our world are ANALOGUE
• Analogue means Continuously Changing
– example: music or speech is due to constantly changing pitch and
volume
– door opening. We can open it at any width
• DIGITAL
–
–
–
–
–
not Continuous but DISCRETE
certain values only
compare PIANO to VIOLIN
imagine a door with only a few fixed opening positions
compare a RAMP to STAIRS
• DIGITAL IS APPROXIMATE
eee116j1 3
w
Continuous v Discrete
Discrete Staircase
Continuous Ramp
eee116j1 4
w
An Analogue System
• Record and Playback Audio Cassette System
Amplifier
microphone
Amplifier
cassette
speaker
• But what if we want to use a CD player instead of cassette?
Amplifier
microphone
Analogue
to Digital
converter
CD
Digital to
Analogue
converter
Amplifier
speaker
• We need to convert to DIGITAL then record to CD
• and convert to ANALOGUE to playback from CD
eee116j1 5
w
What is digital information
• Digital information is REAL WORLD information but
converted into specific format
• CODE
• The format is chosen so that Electronic Devices can work
with it.
• Digital information is a LIST of NUMBERS
• Analogue information can be Voltage, Light Intensity,
Sound Intensity, Temperature, Colour etc. etc. etc.
• How do we convert one to other.
eee116j1 6
w
A Picture
Each square is called a picture element
PIXEL.
Each Pixel has a Number (or address)
Each Pixel is filled with ONE colour
eee116j1 7
The Picture can be described as a list
of {Pixel No, Colour}
starting at Top Left, finishing at
Bottom Right
w
Image Description
Picture is made up of 20 x 10 elements = 200 pixels
1 red
2 blue
3 orange
4 orange
5 pink
6 pink
7 green
.
.
.
200 green
eee116j1 8
w
Colour Codes
eee116j1 9
w
Colour Image Description
red green blue
1 red
2 blue
3 orange
4 orange
5 pink
6 pink
7 green
.
.
.
200 green
•
•
•
•
•
•
•
•
•
•
•
1
2
3
4
5
6
7
.
.
.
200
255
0
255
255
255
0
0
182
182
111
0
255
0
0
176
0
128
0
255000000000000255255182000255182000255111176
One long number describes a picture, nine digits for each pixel
eee116j1 10
w
How long is the digital code?
• So our simple picture requires
– 200 pixels x 9 digits per pixel
– = 1800 digits
• Full screen picture
– say 1024 x 768 pixels for a
typical screen
– = 786,432 Pixels
– = 786,432 x 9 digits
– = 7,077,888 digits
eee116j1 11
•Now we have a list of
numbers.
•Still not in a suitable
format.
•Simpler example:
•a voltage varying in time
w
SNAPSHOT AUDIO
eee116j1 12
w
Simple Sine Wave
• Imagine playing a pure
note on, say a Flute
• Amplitude of voltage
varies with Time
0
20
40
60
80
100
15
10
5
amplitude
• Capture with microphone
which captures the sound
waves and converts it to a
voltage wave
time
0
-5
-10
Vpp
-15
eee116j1 13
w
Convert to Digital
• In Analogue format we can pick
ANY value of TIME
• and measure ANY value of
VOLTAGE
eee116j1 14
• For digital format
• we measure at fixed intervals of
time
• we have a set of allowed
voltages
w
Setting allowed voltage values
Choose no of allowed
voltages
e.g N = 8
6 5
3.75
4
Max voltage range is:
-5V to +5V i.e 10V
Vn = n Vmax /N
Vn = 1.25 n
n = 1, 2, 3…. N
so
Vn = 1.25, 2.5, 3.75, 5
and for negative too
eee116j1 15
2
1.25
Volts
Volts
Allowed voltages are
given by:
2.5
0 0
0.000.00
0.02
0.02
0.04
0.04
-1.25
-2
-2.5
-4
-3.75
-6 -5
Timee
Tim
0.06
0.08
0.08
w
Measurement Time Interval
Say we make a
measurement every
5ms
5
3.75
2.5
1.25
Volts
Voltage at these points
must be converted into
allowed points
0
0.00
0.02
0.04
0.06
0.08
-1.25
Rule is: Set at closest
value of allowed
voltage
Allocate numbers to
voltages starting at -5V = 0
-2.5
-3.75
-5
Tim e
Set of numbers are: 5 6 7 7 6 4 3 2 0 0 0 2 3 4 6
eee116j1 16
w
Sampling
Sampling is the name
given to the process of
converting an
Analogue signal
to a
series of digital values
3.75
2.5
1.25
Volts
Look at what would
happen if we convert
digital series back to
analogue
Accurate?
5
0
0.00
0.02
0.04
-1.25
-2.5
-3.75
-5
Tim e
eee116j1 17
0.06
0.08
w
Accuracy
• To improve accuracy:
5
– increase number of
measurements
– Sampling Rate
4.5
4
3.5
– increase number of allowed
voltages
– Sample Resolution
Volts
3
2.5
2
1.5
1
0.5
Results in a lot more
information
eee116j1 18
0
0.0000
0.0020
0.0040
0.0060
Time
0.0080
0.0020
0.0100
w
Changing the Grid Size
eee116j1 19
w
Binary Numbers
• The conversion of analogue
information gives us a list of
numbers
• So far, we have used decimal
numbers
• But electronic equipment e.g.
computers cannot easily work
with decimal numbers
• BINARY numbers are better
• BINARY NUMBERS
• Only 2 values allowed
• 0 or 1
– decimal
• 10000 | 1000 | 100 | 10 | 1
•
4
1
2
1 8
•
•
•
•
•
•
eee116j1 20
– binary
1024|512|256|128|64|32|16|8|4|2|1
1 1 0 1 1 1 0 0001
110 1110 0001 =
1024+512+128+64+32+1 = 1761
11 bit number
Max decimal value is 211 = 2048
For an N-bit number, max = 2N
w
Why Binary?
• Hard disk: billions of magnets
per square inch. Magnets are
either north or south.
• Call North 1 and South 0
• RAM (computer memory) is an
array of billions of cells
containing 1 transistor and 1
capacitor.
• Capacitor charged = 1,
uncharged = 0
eee116j1 21
• CD
• Flat disk with a spiral. Along
the length of the spiral, it is
divided up into small sections.
Each section contains either a
pit (hole) or a land (no pit)
• Pit = 1, no pit = 0
• Optic Fibres
• Transmit sequence of light
pulses.
• Pulse present = 1
• Pulse absent (no light) = 0
w
Bits and Bytes
• 1 bit = 1 or 0
• 8 bits = 1 byte
• Quality determined by sample
rate per second and
• no of bits per sample
• example CD:
• sample rate = 44kHz
• 12 bit = resolution
• no of allowed voltages
• = 212 = 4096
• How much data on a CD?
eee116j1 22
• Each sample requires a 12 bit
binary number
• 44000 per sec
• 12x44000 = 528 kBits/sec
• = 66 kB/s: B = byte = 8 bits
• How long is a CD? = 80 mins
• Total data = 66kB x 80 x 60
• = 316 MB
• anything wrong with this?
w
Download a high resolution picture
• Say 1200 x 800 pixels
• 16 million possible colours
• How many bits do we need to
represent 16 x 106
• 2N = 16 x 106, so N = 24
• So 1 picture = 1200x800x24 bits
• = 23 Mbits = 2.8MB
• Download at 50 kbits/s
• = 7.6 mins
eee116j1 23
•
•
•
•
•
A digital movie
1 frame = picture = 3MB
25 frames/sec = 75 MB/sec
2 hour movie = 540 GB = DVD
download time 24000 hours!
• To download a digital film for
showing in a cinema, each
frame will be 10-100 time more
detailed
• So that it can be expanded onto
a large screen
• Better modems!
• Compression