Text, Images, Video and Sound ASCII-7 In the early days, a was used, with of 0 s and 1 s, enough for a typical keyboard. The standard was developed by (American Standard Code for Information Interchange) Each group of 7 bits was mapped to a single keyboard character. Byte = More common: 8 bits = 1 byte Abbreviation: 1 byte (B) Kilobyte (KB) = 1,024 bytes (210) 1,024 = 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 Megabyte (MB) = 1,048,576 bytes (220) Gigabyte (GB) = 1,073,741,824 bytes (230) ASCII-8 IBM later extended the standard, using 8 This was known as This gave unique combinations of 0 s and 1 s. 1
Unicode Although ASCII works fine for English, many other languages need more than 256 characters, including numbers and punctuation. Unicode uses a 16 bit representation, with 65,536 possible symbols. Unicode can handle all languages. www.unicode.org Non-text Files: Representing Images and Sound Pixels A monitors screen is divided into a grid of small unit called picture elements or pixels. Each Color intensity of red, green and blue represented as a quantity from 0 through 255. Higher the number the more intense the color. Black has no intensity or no color and has the value (0, 0, 0) White is full intensity and has the value (255, 255, 255) Between these extremes is a whole range of colors and intensities. Grey is somewhere in between (127, 127, 127) 2
First a word about Pixels Per Inch PPI stands for pixels per inch. PPI is a measurement of image resolution that defines the. An image that is 1600 by 1200 pixels at 300ppi will print at a size of 5.3 by 4 inches. Or it could be printed at 180 ppi for a printed size of 8.89 by 6.67 inches. The. you will get--but only up to a point. is generally considered the when it comes to ink jet printing of digital photos. The higher the PPI value, the better quality print you will get--but only up to a point. RGB Colors and Binary Representation True color systems require bytes or per pixel. There is 8 bit and 16 bit color, which gives you less of a color palette. An 8 inch by 10 inch image scanned in at 300 pixels per inch: 8 x 300 = 2,400 pixels 10 x 300 = 3,000 pixels 2,400 pixels by 3,000 pixels = 7,200,000 pixels or 7.2 megapixels At 24 bits per pixel (7,200,000 x 24) = 172,800,000 bits or 21,600,000 bytes (21.6 megabytes) RAM memory, video memory, disk space, bandwidth, File Compression Typical computer screen only has about 100 pixels per inch, not 300. Images still require a lot of memory and disk space, not to mention transferring images over the network or Internet. A means to change the representation to use fewer bits to store or transmit information. Information sent via a fax is either black or white, long strings of 0 s or long strings of 1 s. Run-length encoding Many fax machines use run-length encoding. uses binary numbers to specify how long the first sequence (run) of 0 s is, then how long the following sequence of 1 s is, then how long the following sequence of 0 s is, and so on. 0-100 1-373 0-96 etc. Fewer bits needed than sending 100 0 s, then 373 1 s etc. Run-length encoding is a, meaning that the original representation of 0 s and 1 s can be reconstructed exactly. 3
JPEG Compression JPEG Joint Photographic Experts Group JPEG is a Our eyes are not very sensitive to small changes in hue (chrominance), but we are sensitive to brightness (luminance). This means we can store less accurate description of the hue of the picture (fewer bits) and our eyes will not notice it. This is a lossy compression scheme, because we have lost some the original representation of the image and it cannot be reconstructed exactly. With JPEG we can get or more, without being able to see a difference. There are in pictures that can be lumped together without our noticing. Because of this, when Run-length compression is used there is more compression because there is less variations in the hue. MPEG Compression Scheme MPEG (Motion Pictures Experts Group) MPEG compression is similar to JPEG, but applied to movies. JPEG compression is applied to each frame. Then interframe coherency is used, which only records and transmits the differences between frames. Digitizing Sound Many definitions of analog. (Our definition) is a wave form analogous to the human voice. The telephone systems uses an analog wave to transmit your voice over the telephone line to their Central Office. Two parts of the wave: Amplitude of the wave which equates to volume. Frequency per second, which equates to pitch. Computers are digital devices, so the analog wave needs to be converted to a digital format. Converting Analog to Digital requires three steps: 1. 2. 3. 4
Sampling. The more samples you take, the more accurately you represent the original wave, and the more accurately you can reproduce the original wave. Quantifying This is the process of giving a value to each of the samples taken. The larger the range of numbers, the more detailed or specific you can be in your quantifying. Coding This is the process taking the value quantified and representing it as a binary number. Audio CDs use for coding. 16 bits gives a range from. Actually: 15 bits are used for the range of numbers 1 bit is used for + (positive) or (negative) 32,768 positive values and 32,768 negative values How many bits does it take to record one minute of digital audio? 1 minute = samples per second This equals. Each sample requires bits. 2,646,000 samples times 16 bits per sample equals bits. 42,336,000 bits times 2 for stereo equals for 1 minute of audio. 84,672,000 bits divided by 8 bits per byte equals 10,584,000 bytes for of audio. (More than ) of audio equals 635,040,000 bytes or (megabytes)! MP3 Compression Compressing digital audio means to reduce the number of bits needed to represent the information. There are many sounds, frequencies, that the human ear cannot hear, some too high, some too low. These waves can be removed without impacting the quality of the audio. MP3 uses this sort of compression for a typical compression ratio of 10:1, so a one minute of music takes instead of 10 megabytes. A key advantage to digital representation of information, images and sounds, is that the it can be without losing a bit of the quality. 5