0% found this document useful (0 votes)
5 views11 pages

Chap 6 - Rev

Chapter 6 discusses various file formats and storage types, including MIDI, MP3, JPEG, and text files, highlighting their characteristics and differences. It explains lossy and lossless compression, detailing how they affect file size and quality, and compares primary and secondary storage, including RAM, ROM, HDD, and SSD. The chapter also covers offline storage options like optical media and flash memory, detailing their operation and differences.

Uploaded by

louqman.huawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Chap 6 - Rev

Chapter 6 discusses various file formats and storage types, including MIDI, MP3, JPEG, and text files, highlighting their characteristics and differences. It explains lossy and lossless compression, detailing how they affect file size and quality, and compares primary and secondary storage, including RAM, ROM, HDD, and SSD. The chapter also covers offline storage options like optical media and flash memory, detailing their operation and differences.

Uploaded by

louqman.huawei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Chapter 6: File Format & Storage

Chapter 6
File Format
1. MIDI – (Musical Instrument Digital Interface)
A standard adopted by the electronic music industry for controlling devices that produce music, such as synthesisers and
sound cards.
Note: MIDI doesn’t contain any actual music.
Definition:
- Musical Instrument Digital Interface file
- Stores a set of commands / instructions for how the sound should be played
- Does not store the actual sounds
- Data in the file has been recorded using digital instruments
- Specifies when each note plays and stops playing // Specifies key on/off
- Specifies duration of the note
- Specifies volume of the note
- Specifies the type of instrument
Features of MIDI file
- Stores the notes played and not the sound
- Contains instructions/commands for digital instruments
- Played on a digital instrument e.g. synthesiser
- Stores data about notes e.g. pitch byte
- Can be a compressed format
- Can edit individual notes

2. MP3 (.MP3)/MP4 (.MP4)


Definition: File compression system for music which does not noticeably affect the quality of the sound.
- MP3 is a format for digital audio
- MP3 is an actual recording of the sound
- MP3 is a lossy compression format
- Recorded using a microphone

Features of an MP3 file


- Contains actual sound
- Contains samples of the sound wave
- Contains metadata
- Uses lossy compression
- Recorded using microphone // played on an MP3 player

1
Chapter 6: File Format & Storage
Q: How MP3 retained music quality (3)
- Uses perceptual music shaping
- Removes sounds human ear can’t hear properly
- If two sounds played at same time, softer sound is removed
Q: MP3 file compression reduces the size of a music file by 90%.
(a) A music track is 80 MB in size. Calculate the file size after compression. (1)
100% - 90% = 10%
10/100 × 80 = 8mb

(b) How many MP3 files of the size calculated above could be stored on an 800 MB CD? (1)
800/8 = 100
Note: Both MP3 & MP4 are examples of lossy compression.

Q: Difference between MP3 and MIDI


MP3
- Digital recording of sound
- Produced by recording software / microphone
- Used when distributing sound files
- Compressed file format
MIDI
- Instructions of how to make sound
- Non-audio recording
- File created using digital musical instruments
- Produced by synthesizer
- Used when composing music
- Instruments can be changed
3. JPEG (.JPEG)
Definition:
- Joint photographic experts group
- Commonly used for lossy compression for digital images
- Used for saving storage space
- Used for increasing transmission speed/reduced download time

2
Chapter 6: File Format & Storage
Q:

(a) Why is picture X fuzzy?


- Low resolution
- Low bit map image
- Picture has less pixels
(b) Even the sharp image in picture Y would become fuzzy if enlarged. Why would this happen?
- As picture is enlarged covers larger area so pixel density gets smaller and sharpness of image is lost
- Pixels become too big
(c) State a drawback of storing sharp quality bitmap image files.
- Uses up large amount of memory/storage space
- Download/upload takes longer
Q: Tom wants to store a 16-bit colour image file. The image size is 1000 pixels. Calculate the size of the file in byte.
1000 x 16 = 16 000
16 000 / 8 = 2000 bytes
4. Text File (.TXT/.PDF)

Lossy/Lossless Compression
Q: Describe benefits of compressing the file to send it.
- File size is reduced
- so it uses less storage space
- so faster transmission
- so quicker to download
- so uses less bandwidth
1. Lossy Compression
- When decompressed, some detail is lost and file is not exactly like the original.
E.g.
- JPEG: Used to store pictures
- MP3: Used to store sound files
- MP4
Reason: It would make the file smaller than lossless compression / the file would stream faster than lossless
compression. The quality of the video can be reduced but it can still be viewed
Lossy compression on an image file
Benefit: Smaller file size reduces download

3
Chapter 6: File Format & Storage
Lossy compression on an image
- A compression algorithm is used.
- Permanently deleting some data
- Colour depth can be reduced
- Resolution can be reduced
- Less bits will be required for each pixel

Lossy compression on a sound file


- A compression algorithm is used
- Discards any unnecessary sounds using perceptual music shaping
-It removes background noise / sounds humans can’t hear
- Reduces sample size
- Reduces sample rate
- The data is permanently removed

Benefit of using lossy than lossless to compress a sound


- The file size will be smaller than lossless
- Requires less storage space
- Requires less time to transmit
- Quicker to download
Drawback of using lossy than lossless to compress a sound
- The quality of the sound will be reduced
- The original file cannot be restored
Lossy compression on a video
- Use compression algorithm
- This would remove all the unnecessary data from the file//removes detail that the human eye may not see
- Redundant data is removed
- Reduce colour depth
- Reduce image resolution
- Reduce sample rate
- Reduce sample resolution
- Reduce frame rate
- Use perceptual music shaping
- Data is permanently removed

4
Chapter 6: File Format & Storage
2. Lossless Compression
- When decompressed the original file is restored with no loss of data
E.g.
- Text File
- Database file
- Program code
Why program code needs to use lossless rather than lossy
- Lossy would remove data
- Lossless does not remove data
- Can be restored to original state otherwise code will not run correctly
Lossless Compression on a text:
- A compression algorithm is used
- The file is restored back to original after decompression // No data loss in the process
- Repeated words are identified and are indexed into a table
- Repeated words are identified and are replaced with their index
- Repeated words are identified and their positions are stored in the table
- Repeated words are identified and the number of times the word appears is stored
Q: Describe how the size of the text file can be reduced (3)
- The file can be compressed
- The compression that is used is lossless
- Use of a compression algorithm
- Repeated words can be indexed
- Repeated word sections (e.g. “OU”) can be replaced by a numerical value
- Convert file to pdf

Describe how lossless compression reduces the size of a sound file.


- Uses a compression algorithm
- Does not permanently remove any data
- Repeated patterns of notes are identified and are replaced with a value
- Example of compression algorithm is RLE

Describe how lossless compression reduces the file size of the photos.
- A compression algorithm is used
- No data is removed in the compression process
- Repeated pixels are identified and are indexed
- Use RLE

5
Chapter 6: File Format & Storage
Reason to compress sound using lossless
- To provide the highest quality of music file
- The user is able to listen to the original sound file
- No loss of quality for the sound file provided
Drawback of using lossless
Streaming speed may be slower and may affect listening experience
- User may need more bandwidth to stream that could be more expensive
- It would be a larger file size so may take longer to upload
- … so will take up more storage space on webserver

Memory Storage
Q: Difference between Primary and Secondary
– Primary RAM and ROM
– Secondary HDD and SSD

– Primary is directly accessible by CPU


– Secondary is not directly accessible by CPU

– Primary is internal to computer


– Secondary can be internal or external to the computer

– Primary stores boot up instructions and can hold data whilst being processed
– Secondary stores files/software

– Primary has faster access speed


– Secondary has a slower access speed

– Primary has both volatile and non-volatile


– Secondary is non-volatile

6
Chapter 6: File Format & Storage
Primary Storage (RAM/ROM)
Definition:
Primary Storage: Main memory inside a computer directly accessed by the CPU.
1. ROM (Read Only Memory)
- ROM is a non-volatile memory.
- Data in ROM cannot be changed.
- ROM is read only
- ROM is permanent
Application:
- ROM is used to store BIOS
- To store bootstrap
- To store factory settings.
2. RAM (Random Access Memory)
- RAM is a volatile memory.
- RAM is temporary
- Data in RAM can be changed.
- RAM can have read/write operations

Application:
- Store operating system currently in use.
- Store files currently in use.
The role of RAM
- Allows data to be stored so it is directly accessible by the CPU
- Stores data temporarily
- Stores OS currently in use
- Stores data/programs that are currently in use
- Allows multitasking
Secondary Storage (HDD/SSD)
Definition:
SecondaryStorage: Non-volatile memory that is accessed by a device that is part of a computer system/ not directly
accessed by the CPU.
1. HDD (Hard Disk Drive) (Magnetic)
- Storage device has platters
- Platters divided into tracks
- Platter is rotated
- Has a read/write arm that moves across storage media
- Read/writes data using electromagnets
- Uses magnetic fields to control magnetic dots of data
- Magnetic field determines binary value

7
Chapter 6: File Format & Storage
2. SSD (Solid State Drive)
What is meant by SSD
- Solid state drive
- Non-volatile
- Secondary storage
- Flash memory
- Has no moving parts
- Uses transistors and cells that are laid out in a grid
- Uses control gates and floating gates
- Can be NAND/NOR (technology)
- Use EEPROM technology

Operation of SSD
- Data is flashed onto (silicon) chips
- Can use flip-flops
- Uses transistors/control gates/floating gates to control the flow of electrons
- The electric current reaches the control gate and flows through to the floating gate to be stored
- When data is stored the transistor is converted from 1 to 0
- Writes (and reads) sequentially

Benefit of SSD:
- Less power consumption
- Run cooler
- Data access is faster
- Occupies less physical space/more compact
- More reliable

Benefit of magnetic HDD


- Magnetic is cheaper per unit of data
- Magnetic has more longevity // Magnetic can perform more read/write cycles
Explain Benefit of magnetic HDD
-Greater longevity likely to be a lot of read/write functions each day
- Cheaper per unit of data stored better value to purchase
- No requirement for portability as a server, it does not need to be moved
- Trusted technology it has been traditionally used for many years

8
Chapter 6: File Format & Storage
Similarity between HDD and SSD
- They are both non-volatile
- They are both secondary storage // Both not directly accessed by the CPU
- They both have a high capacity of storage
- Both have read and write abilities

Differences between HDD and SSD


- HDD has moving parts but SSD does not
- HDD uses magnetic storage whereas SSD uses flash memory
- HDD is slower to access data than SSD
- HDD will create heat, whereas SSD runs cooler
- HDD has higher power consumption than SSD
- HDD have greater longevity/more read-write cycles whereas SDD has lower longevity/limited number of read-write
cycles
- HDD larger in physical size/heavier than SSD
- HDD is normally cheaper for the same capacity of storage as SSD
- HDD is available in a larger storage capacity than SSD

Off-line Storage
Definition:
Off-line Storage: Non-volatile memory that can be removed from a computer system.
1. Optical (use laser to read)
(i) CD/DVD
- Red Laser
- Single spiral track
- DVD use dual layer technology
Q: Describe how data is read from a CD/DVD
- Red laser is used.
- Laser shines onto surface of the disk.
- It is rotated to be read.
- Data is represented on the surface using pits and lands.
- Pits and lands represent binary values.
- Pits reflect light back differently.
(ii) DVD-RAM
- Red laser
- Concentric tracks
(iii) Blu-Ray
- Blue laser
- Single Spiral track (1.1 mm)

9
Chapter 6: File Format & Storage
Q: Differences between Blu-ray discs and DVDs
- Blu-ray discs use blue lasers & DVDs use red lasers
- Storage capacity of Blu-ray discs is much higher than standard DVDs
- Blu-ray discs use one polycarbonate layer; DVDs use two layers
– Blu-ray discs have a built-in secure encryption system

Q: Differences between DVD-R and DVD-RAM


– DVD has one spiral track & DVD-RAM has several concentric tracks.
– DVD-RAM can be written to and read from at the same time & DVD-R only allows the read operation to occur.
– DVD-R only allows data to be read (can’t write to it) whereas DVD-RAM allows reading and writing operation.
Q: How to data is written to optical media
- The disc is rotated
- Laser beam is used
- The laser beam makes indentations on the surface of the disc/pits and lands
- The data is written in a spiral / concentric tracks
- The pits and lands represent binary values/1s and 0s
- It is called burning data to the disc
Q: Similarities between CD and DVD
- Both need a red laser to read/write data
- Both are spun to be read
- Both use spiral tracks for data
- Both are optical storage
- Both are off-line storage // both non-volatile
- Both use pits and lands to store data

Q: Difference between CD and DVD


- DVD can be dual layer, but CD can only be single
- DVD has higher storage capacity
- DVD has a shorter wavelength laser
- DVD are spun faster
- DVDs have a higher data transfer rate

10
Chapter 6: File Format & Storage
2. Flash memory (USB Flash memory drive)
- Use solid-state technology e.g. SD card: Use in mobile phone
- Flash memory

How Flash memory operates


- Data is flashed onto (silicon) chips
- Can use flip-flops
- Uses transistors/control gates/floating gates to control the flow of electrons
- The electric current reaches the control gate and flows through to the floating gate to be stored
- When data is stored the transistor is converted from 1 to 0
- Writes (and reads) sequentially

3. Removable Hard disk


e.g. Hard disk

Q: A remote-controlled model car contains RAM, ROM and a solid state drive. The car receives radio signals from its
remote control. It can only receive radio signals of a certain frequency. The manufacturer sets this frequency and the
owner cannot change it. The owner of the model car can input their own sequence of movements from an interface
underneath the car.
Describe the purpose of each of the three types of memory supplied with the car. (3)
RAM: - Contains instructions/program/data currently in use
ROM:
- Contains the start-up/bootstrap program
- Contains/stores the setting for frequency
Solid State drive:
- Stores the instructions/program/data (to operate the car)

11

You might also like