# Computing in the Modern World Data Representation Wayne

Computing in the Modern World Data Representation Wayne Summers STEM Honors Camp June 8, 2012 Data Representation NUMBERS

Essential Questions: How can the two-state nature of transistors be used to represent information? How are decimal numbers converted to binary numbers and vice versa? What is the 8-bit ASCII code? There are 10 kinds of people in the world: those who understand binary and those who dont.

Pre-exercises Magic trick (parity bits) : tack board with colored cards Representing numbers : Binary digit counting cards (1, 2, 4, 8, 16, 32) Decimal, Binary, Hexadecimal Decimal Binary

Hexadecimal 1 0000 0001 1 2 0000 0010

2 3 0000 0011 3 4

0000 0100 4 5 0000 0101 5 6

0000 0110 6 7 0000 0111 7

8 0000 1000 8 9 0000 1001 9

10 0000 1010 A 11 0000 1011

B 12 0000 1100 C 13 0000 1101

D 14 0000 1110 E 15

0000 1111 F 16 0001 0000 10 Data Representation

LETTERS Representing letters : Letter card & some words Data Representation IMAGES Essential Questions: How is the binary system used to

represent images? What is a pixel? How is a pixel used to represent images? a. Describe how a picture is digitized and represented in a computer. Examples http://www.printactivities.com/HiddenPictur es/004_SunAndTree.html (paint by number picture per student)

What's the secret code for talking to spacecraft? http://spaceplace.nasa.gov/binary-code/re directed/ (build poster) RGB Hexadecimal / Decimal Converter http://www.psyclops.com/tools/rgb/ Data Representation SOUNDS Essential Questions:

How is the binary system used to represent sound? What is a sound sample? What is amplitude? How is a sound sample used to represent a sound? Sound Representation Analog Digital

Characteristics of Sound Amplitude Wavelength (w) Frequency ( ) Timbre

v=f* Hearing: [20Hz 20KHz] Speech: [200Hz 8KHz] Digital Representation of Audio Must convert wave form to digital sample quantize Sampling (in time)

Measure amplitude at regular intervals How many times should we sample? CS 414 - Spring 2009 Example Suppose we have a sound wave with a frequency of 1 cycle per second 1.5 1 0.5

0 -0.5 -1 -1.5 CS 414 - Spring 2009 Example If we sample at one cycle per second, where would the sample points fall? 1.5

1 0.5 0 -0.5 -1 -1.5 CS 414 - Spring 2009 Example If we sample at 1.5 cycles per second,

where will the sample points fall? 1.5 1 0.5 0 -0.5 -1 -1.5 Sampling - Example If we sample at two cycles per second,

where do the sample points fall? 1.5 1 0.5 0 -0.5 -1 -1.5 Nyquist Theorem For lossless digitization, the sampling rate

should be at least twice the maximum frequency response. In mathematical terms: fs > 2*fm where fs is sampling frequency and fm is the maximum frequency in the signal Quantization 1.5 1 0.5

0 -0.5 -1 -1.5 3-bit Quantization A 3-bit binary (base 2) number has 23 = 8 values. 7 6 Amplitude

5 4 3 2 1 0 Time measure amp. at each tick of sample clock 4-bit Quantization A 4-bit binary number has 24 = 16 values.

14 12 Amplitude 10 8 6 4 2 0

Time measure amp. at each tick of sample clock A The Digital Audio Stream Its just a series of sample numbers, to be interpreted as instantaneous amplitudes: one for every tick of the sample clock. Previous example: 11 13 15 13 10 9 6 1 4 9 15 11 13 9 This is what appears in a sound file, along with a

header that indicates the sampling rate, bit depth and other things. Common Sampling Resolutions Word length Uses 8-bit integer Low-res web audio

16-bit integer CD, DAT, DV, sound files 24-bit integer DVD-Video, DVD-Audio 32-bit floating point

Software (usually only for internal representation) 16-bit Sample Word Length A 16-bit integer can represent 216, or 65,536, values (amplitude points). We typically use signed 16-bit integers, and center the 65,536 values around 0. 32,767 0

-32,768 Audio File Size CD characteristics - Sampling rate: 44,100 samples per second (44.1 kHz) - Sample word length: 16 bits (i.e., 2 bytes) per sample - Number of channels: 2 (stereo)

- Examples - http://x2.i-dat.org/~csem/UNESCO/1/index.html#se How big is a 5-minute CD-quality sound file? b. Describe how a sound/song is digitized and represented in a computer. An audio file format is a container format for storing audio data on a computer system. They can be divided in three basic groups: uncompressed audio file formats, lossless compression audio formats and

lossy compression audio file formats. uncompressed audio file formats The most used and known uncompressed audio file format is PCM (Pulse-code modulation) usually stored as a .wav on Windows or as .aiff on MAC. flexible file formats designed to store more or less any combination of sampling rates or bitrates. CD-quality sound files in uncompressed PCM

format are large in size - around 10 MB per minute. lossless compression audio formats require more processing for the same time recorded, more efficient in terms of disk space used, FLAC (Free Lossless Audio Codec) audio format similar to MP3, audio information is compressed file without any loss in its audio quality (similar

to how Zip works) lossy compression audio file formats most used audio format today best known is MP3 (MPEG-1 Audio Layer 3) patented digital audio encoding format common audio format for consumer audio storage, de facto standard of digital audio compression for the transfer and playback

of music on digital audio players. Sound links The Digital Representation of Sound,Pa rt One: Sound and Timbre Part Two: Playing by the Numbers Data Representation MULTIMEDIA

Multimedia combination of several media types: audio stream, moving images (movie/video), audio+video, animation, interactive animation Sample-based Digital Video Video is represented in discrete units called frames

Frame: Similar to a still image Video has a frame rate; unit: frames/second (fps) E.g., 15 frames/second Time-dependent medium Illusion of motion depends on frame rate Dont perceive motion below about 15 fps 40

Video Frames Each frame has a resolution (w=width by h= height)-- typically the same resolution for all the frames in video h w 41 Frame Rates

Movies American TV (NTSC) European TV (PAL) Peter Jackson's The Hobbit fps = 48 (5120-by-2700 cameras)

fps = 24 fps = 30 fps = 25 42 Video and multimedia files contain digitally capturing, recording, processing, storing, transmitting, and reconstructing a sequence of still images representing scenes in motion

and of course captured or recorded audio. basically data container formats, that are used for audio-with-video playback. video file formats AVI (Audio Video Interleave) developed by Microsoft. Audio or video content can be compressed with a wide variety of video or audio and video codecs MPG (MPEG), developed by Moving Picture Experts Group. ISO standard used

by many multimedia devices (DVD players, Blu-RAY, portable players, computers). video file formats MP4, MPEG-4 multimedia file format, contains encoded video and advanced audio coding (AAC)-encoded audio content. MOV, a Apple QuickTime multimedia container format that can store one or

more tracks of data such as video, audio, text, and effects. Video Compression How compression works http://www.youtube.com/watch? feature=player_embedded&v=kyztYavfFMs Codecs http://www.youtube.com/watch? v=_13PCNDO-pE&feature=player_embedded

Data Representation SOFTWARE Asse mbly La nguage: Start: .org \$8020 SEI LDA #\$80 STA \$0315

LDA #\$2D STA \$0314 CLI RTS INC \$D020 JMP \$EA31 Machine Code: 8020 78 0111 1000

8021 A9 80 1010 1001 1000 0000 8023 8D 15 03 8026 A9 2D 8028 8D 14 03 802B 58 802C 60 802D EE 20 D0 8030 4C 31 EA QUESTIONS???

http://cs.ColumbusState.edu [email protected] [email protected]

## Recently Viewed Presentations

• Zygomycetes (Rhizopus, Rhizomucor, Absidia, Mucor sp.) Cryptococcus . neoformans. and . C. gatti. Opportunistic/ Hospital Acquired Fungal Infections. Cryptococcus neoformans is a fungus that lives in the environment throughout the world. People can become infected after breathing in the ...
• Ontario Cancer Registry, 2016 (Cancer Care Ontario) NOTES: Incidence rates are standardized to the age distribution of the 2011 Canadian population. Liver cancers exclude intrahepatic bile duct cancer. For ICD-O-3 site and histology codes for cancer type, see Table A4...
• UNIT III. Group Technology and FMS. ... A part coding system consists of a sequence of symbols that identify the part ... A single machine cell consists of one CNC machining center combined with a parts storage system for unattended...
• History of Alligator Farms in Florida. Alligators have been hunted for their leather and meat for centuries. Alligator leather was used to make boots for confederate troops during the civil war.
• Like Fenelon did, Existential Psychology differentiates between normal and neurotic anxiety, normal anxiety is an element of life preservation as well as the potential drive for inner growth (Yalom 1998). While neurotic anxiety is a symptom of psychic stagnation.
• Sadlier-OxfordVocabulary Level E. Unit #11 . To Allude (verb) Many comedies, including Family Guy, allude to (reference) films and culturally significant events for humorous effects. These allusions work best when the audience is familiar with the reference. ... Sadlier-Oxford Vocabulary...
• Reducing Recidivism and Improving Other Outcomes for Young Adults in the Juvenile and Adult Criminal Justice Systems (New York: The Council of State Governments Justice Center, 2015) Schiraldi, Vincent, Bruce Western and Kendra Bradner. Community-Based Responses to Justice-Involved Young Adults....
• The chemosynthetic vent bacteria are the base of the food chain at hydrothermal vents. Vent bacteria are capable of producing 'cell food' by chemosynthesizing the minerals (especially sulfur compounds) in the water.