Unformatted text preview: Digital Information Binary Coding Digital Sampling CDs and DVDs UCSD: Physics 8; 2007 Binary Numbers for Digital Representation Our number system uses the place of a digit to represent the value we use base10 for numbers There are 10 digits used...0,1,2,3,...9 after which we use a 1 in the next place Electronics prefers base 2, or binary notation Only two numbers: 0 (off, no current) and 1 (on) 0 00000000 (8bit) 1 00000001 (8bit) 2 00000010 (8bit) 3 00000011 (8bit) (1 + 2) 4 00000100 (8bit) 127 01111111 (8bit) (1 + 2 + 4 + 8 + 16 + 32 + 64) If we want to represent negative numbers, we could make up some rule, like: 127 11111111 (8bit): first bit indicates negative This is one of several representations (esp. for handling negative numbers) 2 UCSD: Physics 8; 2007 How Binary Works: Instead of a 1's place, 10's place, 100's place, etc. which is 100 place, 101 place, 102 place, etc. for base ten We have a 1's place, 2's place, 4's place, 8's place... which is 20 place, 21 place, 22 place, 23 place, etc. for base 2 In decimal, when we get to 9, we've run out of digits next number is 10 after 9999 is 10000 In binary, when we get to 1, we've run out of digits next number is 10 after 1111 is 10000 3 UCSD: Physics 8; 2007 Example: Binary to Decimal What is 01101011 in decimal? we'll ignore our special rule for negative here: only positive By analogy, what does 642 mean? 6 100's plus 4 10's plus two 1's 6 102 + 4 101 + 2 100 01101011 is then: 76543210 are the powers of 2 for the digits above = 0 27 + 1 26 + 1 25 + 0 24 + 1 23+ 0 22+ 1 21 + 1 20 = 0 128 + 1 64 + 1 32 + 0 16 + 1 8 + 0 4 + 1 2 + 1 1 = 64 + 32 + 8 + 2 + 1 =107 4 UCSD: Physics 8; 2007 Example: Decimal to Binary Let's represent 99 in binary form By analogy, in decimal, we don't need any thousand'splace, or hundred's place (these are zero) meaning you could write 99 as 00000000000099 99 is not big enough to need any of the higher places We do need 9 10's, then left over with 9 If in binary, we have a 128's place, 64's place, etc.: then 99 doesn't need a 128: 128 is too big but does need a 64, leaving 9964=35 remaining 35 needs a 32, leaving 3 remaining 3 does not need a 16, 8, or 4, but does need 2, leaving 1 remaining 1 needs one 1 to finish out So result is 1100011 What is ... (binary) in decimal? Several questions 5 UCSD: Physics 8; 2007 How many digits/bits 3 decimal digits lets you represent 0999 1000, or 103 possible numbers Generally, N decimal digits gets you 0 to 10N = 10N possibilities 1 3 binary digits gets you 07 (23 = 8 possibilities) 000, 001, 010, 011, 100, 101, 110, 111 In general, N binary bits gets you 2N possibilities In a similar way, a license plate with a format ABC 123 has (26) (26) (26) (10) (10) (10) = 17,576,000 possibilities enough for most states 6 UCSD: Physics 8; 2007 Adding Binary Numbers Same rules apply as for adding decimal numbers: when you exceed the available digits, you "carry" extra digits Let's add 46 and 77 00101110 and 01001101 11 00101110 = 2 + 4 + 8 + 32 = 46 + 01001101 = 1 + 4 + 8 + 64 = 77 0 1 1 1 10 1 1 = 1 + 2 + 8 + 16 + 32 + 64 = 123 The rules are: 0 + 0 = 00 1 + 0 = 0 + 1 = 01 1 + 1 = 10 (0, carry a 1) 1 + 1 + 1 = 11 (1, carry a 1) What is ...+ ....? 7 UCSD: Physics 8; 2007 Digital Representation of Analog Quantities Sound waveform can be digitized At uniform time intervals, amplitude of waveform is characterized by an integer number 8bit (from 127 to 127) (low resolution) 12bit (from 2047 to 2047) 16bit (from 32767 to 32767) (high resolution) sound amplitude sound waveform time digitized sample points, uniform in time 8 UCSD: Physics 8; 2007 Digital Audio Formats Must sample at greater than twice the highest frequency you want represented in the sound clip Nyquist frequency = maximum frequency that is well sampled = sampling frequency/2 Human hearing sensitive up to 20,000 Hz CDs recorded at 44,100 Hz (44,100 samples/second) Must have reasonable resolution (finegrain) 8bit has only 42 dB dynamic range (sounds grainy) 16bit has 84 dB range: CD's at 16bit Stereo is usually desirable (separate waveforms) CD's then read 2 44,100 16 = 1.4 million bits/sec in familiar units: 1411.2 kbits/sec 74minute disc then contains 6.26 billion bits = 783 MB one second of CD music contains 176 kB of data data CDs use some space for error correction: get 650 MB 9 UCSD: Physics 8; 2007 All that information on one little disk?! CDs are truly marvels of technology Data density: 6.26 billion bits over R2 area R = 60 mm = 60,000 m A = 11 billion m2 0.55 bits per micronsquared: 1.34 micron square per bit Bits arranged in spiral pattern from center out Outer 40 mm / 1.34 micron 74 minutes = 4440 seconds 30,000 wraps 67 revolutions per second Bits Pit Pits pressed into aluminum foil digital 0; No pit digital 1 10 UCSD: Physics 8; 2007 Arrangement on the CD Pits are arranged in long spiral, starting at center and spiraling outward toward edge Are pits bits? Are nonpits bits? 11 UCSD: Physics 8; 2007 Readout Mechanism Laser focuses onto pit surface Reflected light collected by photodiode (light sensor) Intensity of light interpreted as bit value of zero or one Separate side beams ensure tracking "ride" between adjacent tracks on spiral polarizing beamsplitter separates outgoing from incoming light 12 UCSD: Physics 8; 2007 The real deal... 13 UCSD: Physics 8; 2007 Optical Requirements Pits are small! micron size; laser wavelength is 0.78 m (red) Cannot (quantummechanically) focus laser smaller than its wavelength and have to work real hard to come close 14 UCSD: Physics 8; 2007 Noise Immunity Can scan ahead (array of detectors) Build up multiplereads of same block Hardly affected by dust/scratches on surface beam is 0.51 mm in diameter as it encounters disk most of beam sees around dust or scratch pits actually only 0.11 m deep 1.2 mm 0.8 mm 15 UCSD: Physics 8; 2007 Why All the Fuss? Why Go Digital? Sound, images are inherently analog: sound is continuously variable pressure amplitude light is represented by a continuous mixture of wavelengths and brightness But reproduction of these with high fidelity would require precision recording, precision equipment exact height of ridges in vinyl record groove critical exact signal strength of radio wave determines brightness of pixel on TV screen devicedependent interpretation (tuning) subject to variation Digital information means unambiguous data CD pit is either there or it isn't Electronically handled as 0V or 5V: easy to distinguish everybody has access to the fullprecision information 16 UCSD: Physics 8; 2007 DVD Technology DVDs make many leaps beyond CD technology: 0.65 m laser: smaller wavelength gives smaller focused spot smaller pits greater data density can be doublesided double layer in some cases (4 layers altogether) data compression Density of pits up 4 times, plus 4 surfaces holds 16 times as much as CD Data compression extremely important for DVDs avoids redundant coding of repetitive information (e.g., still scenes, backdrops, even music waveforms) 17 UCSD: Physics 8; 2007 Data Compression Two types: lossless and lossy Lossless examples zipped computer files, GIF images, stuffit can completely recover errorfree version of original toy example: 00010001000100010001000100010001 notice 0001 appears 8 times could represent as 10000001, where first 4 bits indicate number of times repeated, second four is repeated pattern compresses 32 bits into 8, or 4:1 compression ratio Lossy examples JPEG, MP3, MPEG, ipod uses look/sound okay, mostly by cheating ignoring information they eye/ear is not adept at noticing irrecoverable errors introduced into data 18 UCSD: Physics 8; 2007 Audio Compression Imagine a perfect sine wave could represent this as lots of samples (many bits) or could represent as 2 numbers: One for the frequency and one for the amplitude (few bits total) MP3 recipe break into short bits (576 samples) shorter (192) when something abrupt is happening characterize frequencies and amplitudes present represent as fewer numbers of bits if one frequency dominates, can ignore the rest ear's limitation allows us to do this achieve compression of about 11:1 19 UCSD: Physics 8; 2007 References & Assignments References: How CDs work: http://electronics.howstuffworks.com/cd.htm DVDs: http://electronics.howstuffworks.com/dvd.htm MP3: http://computer.howstuffworks.com/mp3.htm also: http://en.wikipedia.org/wiki/Mp3 http://computer.howstuffworks.com/filecompression.htm iPod: http://electronics.howstuffworks.com/ipod.htm 20 ...
View
Full Document
 Spring '08
 Tytler
 Physics, Binary numeral system, Positional notation, Decimal

Click to edit the document details