What are binary digits?

advertisement
Digital technology
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Contents:
Base 2 and base 10 number system
Bits and bytes
PN diodes
Boolean logic
Logic gates
Digital and analog basics
Storing devices for digital
Changing Analog to digital
How cds store in 1 and 0
What are CCDs?
Image capturing
Sampling for analog to digital conversion
Work cited pages
What are binary digits?
Computers use binary numbers, and
therefore use binary digits in place of
decimal digits. The word bit is a
shortening of the words "Binary digIT."
Whereas decimal digits have 10
possible values ranging from 0 to 9,
bits have only two possible values: 0
and 1.
Decimal and binary numbers.
• You can see that in binary numbers, each bit holds the value of
increasing powers of 2. That makes counting in binary pretty easy
• E.g 1011 means
• 1 * 23) + (0 * 22) + (1 * 21) + (1 * 20) = 8 + 0 + 2 + 1 = 11
• Some more examples
• 10 = 1010
11 = 1011
12 = 1100
13 = 1101
14 = 1110
15 = 1111
16 = 10000
Bits and bytes.
• Bits are rarely seen alone in computers. They
are almost always bundled together into 8-bit
collections, and these collections are called
bytes.
• With 8 bits in a byte, you can represent 256
values ranging from 0 to 255, as shown here:
• 0 = 00000000
1 = 00000001
2 = 00000010
...
254 = 11111110
255 = 11111111
Bits and bytes continued
• CD uses 2 bytes, or 16 bits, per sample. That
gives each sample a range from 0 to 65,535, like
this:
• 0 = 0000000000000000
1 = 0000000000000001
2 = 0000000000000010
...
65534 = 1111111111111110
65535 = 1111111111111111
Analog at a glance
As a technology, analog is the process of
taking an audio or video signal (in most
cases, the human voice) and translating it
into electronic pulses. Digital on the other
hand is breaking the signal into a binary
format where the audio or video data is
represented by a series of "1"s and "0"s.
A to D
• Digital technology breaks your voice (or
television) signal into binary code—a
series of 1s and 0s—transfers it to the
other end where another device (phone,
modem or TV) takes all the numbers and
reassembles them into the original signal.
The beauty of digital is that it knows what
it should be when it reaches the end of the
transmission.
Is the duplication perfect?
• But like any tansferred technology, digital
has a few shortcomings. Since devices are
constantly translating, coding, and
reassembling your voice, you won't get the
same rich sound quality as you do with
analog.
Can we use the digital phone
using an analog line?
• There are digital-to-analog adapters that not
only let you use analog equipment in a digital
environment, but also safeguard against frying
the internal circuitry of your phone, fax, modem,
or laptop. Some adapters manufactured by
Konexx come designed to work with one specific
piece of office equipment: phone, modem,
laptop, or teleconferencer. Simply connect the
adapter in between your digital line and your
analog device.
Comparing Analog Vs. Digital
• http://telecom.hellodirect.com/docs/Tutorial
s/AnalogVsDigital.1.051501.asp
Visit the above site for more details of
Analog Vs. Digital
Ancient way of recording the
analog way
• In the Beginning: Etching Tin
• Thomas Edison is credited with creating the
first device for recording and playing back
sounds in 1877. His approach used a very
simple mechanism to store an analog wave
mechanically. In Edison's original phonograph,
a diaphragm directly controlled a needle, and
the needle scratched an analog signal onto a
tinfoil cylinder . (see the clip in the link below)
• http://communication.howstuffworks.com/analogdigital1.htm
An analog wave
Image from
www.howstuffworks.com
Analog Wave
What is it that the needle in Edison's phonograph is
scratching onto the tin cylinder? It is an analog wave
representing the vibrations created by your voice.
For example, here is a graph showing the analog
wave created by saying the word "hello":
Analog recording
contd….
• The waveform was recorded electronically
rather than on tinfoil, but the principle is the
same. What this graph is showing is,
essentially, the position of the microphone's
diaphragm (Y axis) over time (X axis). The
vibrations are very quick -- the diaphragm is
vibrating on the order of 1,000 oscillations
per second. This is the sort of wave
scratched onto the tinfoil in Edison's device.
Notice that the waveform for the word "hello"
is fairly complex.
Getting in to the digital world
• In a CD (and any other digital recording technology), the
goal is to create a recording with very high fidelity (very
high similarity between the original signal and the
reproduced signal) and perfect reproduction (the
recording sounds the same every single time you play it
no matter how many times you play it). To accomplish
these two goals, digital recording converts the
analog wave into a stream of numbers and records
the numbers instead of the wave. The conversion is
done by a device called an analog-to-digital
converter (ADC). To play back the music, the stream
of numbers is converted back to an analog wave by
a digital-to-analog converter (DAC). The analog wave
produced by the DAC is amplified and fed to the
speakers to produce the sound.
Converting an analog wave to
digital wave
• http://communication.howstuffworks.com/a
nalog-digital3.htm
Here is a typical wave (assume here
that each tick on the horizontal axis
represents one-thousandth of a
second):
……………..contd…
• When you sample the wave with an
analog-to-digital converter, you
have control over two variables:
• The sampling rate - Controls how
many samples are taken per second
• The sampling precision - Controls
how many different gradations
(quantization levels) are possible
when taking the sample
Convert the curve to numbers
• In the following figure, let's assume that the
sampling rate is 1,000 per second and the precision
is 10:
The green rectangles represent
samples. Every one-thousandth of a
second, the ADC looks at the wave
and picks the closest number
between 0 and 9. The number
chosen is shown along the bottom
of the figure. These numbers are a
digital representation of the original
wave. Want to know the digital form
of this curve? 7 8 9 5 3 4 0 3 7 5
Binary form? For individual digit
7
8
9
and so on
111 1000 1001 …………..
• When the DAC recreates the wave from these
numbers, you get the blue line shown in the
following figure:
You can see that the blue line
lost quite a bit of the detail
originally found in the red
line, and that means the
fidelity of the reproduced
wave is not very good. This is
the sampling error. You
reduce sampling error by
increasing both the sampling
rate and the precision
In the following figure, both the rate and the
precision have been improved by a factor of 2 (20
gradations at a rate of 2,000 samples per second)
and then 4000 samples/sec.:
CDs and DVDs.
• http://electronics.howstuffworks.com/cd.ht
m
• Exploring Sound: Digital Sound
– Laser discs such as CDs and DVDs carry
digital information, which is represented by
the binary code -- combinations of 1s and 0s.
Any number can be represented in binary
code. Learn how this information is encoded
in the clip in the above link
CD’s and DVD’s
• Data is stored digitally
– A series of ones and zeros read by laser light
reflected from the disk
• Strong reflections correspond to constructive
interference
– These reflections are chosen to represent zeros
• Weak reflections correspond to destructive
interference
– These reflections are chosen to represent ones
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
CD’s and Thin Film Interference
• A CD has multiple tracks
– The tracks consist of a sequence of pits of
varying length formed in a reflecting
information layer
• The laser beam shines on a metallic layer
through a clear plastic coating
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
A CD’s pits and bumps
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
Reading a CD
• As the disk rotates, the laser
reflects off the sequence of
bumps and lower areas into
a photodector
– The photodector converts the
fluctuating reflected light
intensity into an electrical string
of zeros and ones
• The pit depth is made equal
to one-quarter of the
wavelength of the light
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
Reading a CD
• When the laser beam hits a rising or falling
bump edge, part of the beam reflects from the
top of the bump and part from the lower adjacent
area
• Light reflecting from the top and bottom of the pit
is a half-wavelength out of phase, so the
intensity drops.
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
Reading a CD
• The bump edges are read as ones
• The flat bump tops and intervening flat
plains are read as zeros
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
DVD’s
• DVD’s use shorter wavelength lasers
– The track separation, pit depth and minimum
pit length are all smaller
– Therefore, the DVD can store about 30 times
more information than a CD
Source:
www.physics.byu.edu/faculty/rees/106/PPT/Class26.ppt
• In the case of CD sound, fidelity (the
similarity between the original wave and
the DAC's output ) is an important goal, so
the sampling rate is 44,100 samples per
second and the number of gradations is
65,536. At this level, the output of the DAC
so closely matches the original waveform
that the sound is essentially "perfect" to
most human ears .
Why is a CD’s capacity approximately
750 mb?
• One thing about the CD's sampling rate and precision is
that it produces a lot of data. On a CD, the digital
numbers produced by the ADC are stored as bytes, and
it takes 2 bytes to represent 65,536 gradations. There
are two sound streams being recorded (one for each of
the speakers on a stereo system). A CD can store up to
74 minutes of music, so the total amount of digital data
that must be stored on a CD is:
44,100 samples/(channel*second) * 2 bytes/sample * 2
channels * 74 minutes * 60 seconds/minute = 783,216,000 bytes
(Convert to kbs and then Mbs.)
What is a digital image?
• Essentially, a digital image is just a long string of 1s and 0s
that represent all the tiny colored dots -- or pixels -- that
collectively make up the image. If you want to get a picture
into this form, you have two options:
• You can take a photograph using a conventional film
camera, process the film chemically, print it onto
photographic paper and then use a digital scanner to
sample the print (record the pattern of light as a series of
pixel values).
• You can directly sample the original light that bounces
off your subject, immediately breaking that light pattern
down into a series of pixel values -- in other words, you
can use a digital camera
•
Capturing image
A CMOS sensor
• The image sensor employed by
most digital cameras is a charge
coupled device (CCD). Some
cameras use complementary
metal oxide semiconductor
(CMOS) technology instead. Both
CCD and CMOS image sensors
convert light into electrons.
• A simplified way to think about
these sensors is to think of a 2-D
array of thousands or millions of
tiny solar cells.
Digitisation of the light
• http://www.olympusmicro.com/primer/digit
alimaging/concepts/concepts.html
http://electronics.howstuffworks.com/digital-camera1.htm
The above site has a video clip to explain the digitisation of the light .
Digital Camera Resolution
Photo courtesy Morguefile
The size of an image taken at
different resolutions
• The amount of detail that
the camera can capture is
called the resolution,
and it is measured in
pixels. The more pixels a
camera has, the more
detail it can capture and
the larger pictures can be
without becoming blurry
or "grainy."
Capturing Color
• Unfortunately, each photosite is colorblind. It only keeps
track of the total intensity of the light that strikes its
surface. In order to get a full color image, most sensors
use filtering to look at the light in its three primary
colors. Once the camera records all three colors, it
combines them to create the full spectrum
For illustrations and explanations visit:
http://electronics.howstuffworks.com/digital-camera3.htm
Work cited pages
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Complete binary mathematics.
http://www.binarymath.info/
convert binary numbers to decimals
http://www.bellaonline.com/articles/art48652.asp
Basic principles of magnetic recording using digital data in HDD.
http://www.usbyte.com/common/HDD.htm#top
storage types
http://www.jegsworks.com/Lessons/lesson6/lesson6-2.htm
Details of DVDs.
http://electronics.howstuffworks.com/dvd3.htm
Optical recording in a CD.
http://physicsworld.com/cws/article/print/1383/1/world-11-10-7-2
Detailed study of dvds and cds comparison. More emphasis on technology of data
capture.
http://www.iti.unistuttgart.de/~ghermanv/Lehre/Seminar/material/Presentation4/talk.pdf
For complete know how on CCDs and image capture in a digital camera
www.howstuffworks.com
Download