Chapter 6: Memory and Data Storage Aims and Objectives:: - Midi - MP3 - MP4
Chapter 6: Memory and Data Storage Aims and Objectives:: - Midi - MP3 - MP4
Summary:
Aims and Objectives: • MIDI
• MP3
By the end of this chapter, the students will learn about different file formats.
• MP4
Description:
• A file format is the structure of how information is stored in a computer file. (5 min)
• In a computer, a file format is the layout of a file in terms of how the data within the file is
organized.
• A program that uses the data in a file must be able to recognize and possibly access data within
the file. For example, the program that we call a Web browser is able to process and display a
file in the HTML file format so that it appears as a Web page, but it cannot display a file in a
format designed for Microsoft's Excel program.
• A particular file format is often indicated as part of a file's name by a file name extension (suffix).
Conventionally, the extension is separated by a period from the name and contains three or four
letters that identify the format.
• There are different file formats in computer system, like:
Musical Instrument Digital Interface (MIDI) (10 min)
o MIDI was first developed in the early 80s to standardize communication between music
hardware.
o MIDI isn't music, it doesn't contain any actual sounds. o MIDI isn't a digital music file format
like MP3 or WAV
o MIDI is nothing more than data -- a set of instructions. MIDI data contains commands or
messages that tell an electronic device (musical instrument, computer sound card, cell phone
etc.) how to generate a certain sound.
o It’s like a cookbook. The MIDI cookbook tells something that already has all the ingredients
(the notes of the music) how to arrange them and play them to make music.
o Because it’s just a set of instructions, the MIDI file size is quite small (often measured in
kilobytes as opposed to the larger megabytes). How those instructions sound can vary,
depends on the device that is used to play those instructions.
o Each MIDI command has a specific sequence of bytes. The first is the status byte – it tells what
function to perform. It then transfers it to the required channel. There are 16 different
channels: from 0 -15. o Here are a few examples of typical MIDI messages/ commands:
Note On signals that a key has been pressed. The Note On message includes instructions for
what key was pressed.
Note Off signals that the key has been released.
Polyphonic Key Pressure is a measurement of how hard a key is pressed. On some keyboards,
this adds vibrato or other effects to the note.
Pitch Byte signals that the pitch of the note has been bent and tells which note to play.
Velocity byte which tells how loud to play the note.
o When a sound or voice is recorded, these MIDI messages are saved as .mid
o MIDI files are much smaller than MP3 files and that makes them ideal for storing music files
where storage is an issue i.e. storing ringtones on a mobile phone.
MPEG – 3 (MP3) (8 min)
o The name MPEG is derived from the Moving Picture Experts Group and was created by the
Fraunhofer Institute in Germany in 1991.
o MP3 (MPEG-1 Audio Layer-3) is a standard technology and format for compressing a sound
sequence into a very small file (about one-twelfth the size of the original file i.e. 90%) while
preserving the original level of sound quality when it is played.
o The compression is done using Perceptual Music Sharing.
o Perceptual music shaping reduces sounds that the human ear cannot hear properly i.e.
removes the quieter sound if a louder sound is played at the same time, without affecting the
quality too much. The human sound can only hear the louder sound.
o It is a Lossy format, since part of the file is lost during compression. o MP3 provides near CD
quality audio. It is one of the most common music file types. o Sound quality varies by such
settings as bit rate (fixed or variable), sample rate, joint or normal stereo.
o The quality of MP3 file depends on the Bit rate. o Bit rate is the number of bits used when
creating a file. There are usually 80-320 kilobits per second; anything above 200 gives a sound
quality close to the normal CD.
Summary:
Aims and Objectives:
• JPEG
By the end of this lesson the students will learn about file
• Text and number files
formats, compression, memory and storage.
• Lossless and lossy compressions
• Memory and storage
Description:
Joint Photographic Experts Group (jpeg) files o Stands for "Joint Photographic Experts Group." JPEG
is a popular image file format. It is commonly used by digital cameras to store photos since it
supports 224 or 16,777,216 colors. The format also supports varying levels of compression, which
makes it ideal for web graphics. o The 16 million possible colors in a JPEG image are produced by
using 8 bits for each color (red, green, and blue) in the RGB color space. This provides 28 or 256
values for each of the three colors, which combined allow for 256 x 256 x 256 or 16,777,216 colors.
Three values of 0 produce pure black, while three values of 255 create pure white.
o The JPEG compression algorithm may reduce the file size of a bitmap (BMP) image by ten times
with almost no degradation in quality. Still, the compression algorithm is lossy, meaning some
image quality is lost during the compression process.
o JPEG relies on properties of the human eye (for example, the human eye cannot discern between
colors when they reach a certain point of similarity) and, up to a point, no real loss of quality is
observed.
o An uncompressed image is called a Raw bitmap.
o For this reason, professional digital photographers often choose to capture images in a raw
format so they can edit their photos in the highest quality possible. They typically export the
pictures as JPEG (.JPG) images when they are shared or published on the web.
Text and number files o Text is usually stored as ASCII i.e. as a code which could be
hexadecimal or decimal value.
o Numbers can be stored as:
real 2.5454545, integer 3, date 12/08/2122 time 19:00:20, currency $15.50
o File compression on numbers and text tends to be lossless, since it is important that none of the
information/ data is lost.
o Text files use complex algorithms, for compression, that work on redundancy or repeated words.
For e.g. consider the phrase ‘this will show you how this would work’
This consists of 32 memory units (1 for each alphabet, ignoring spaces)
For repeated words like: this, how, ou, the compression algorithm
would use numbers like 1, 2, 3 respectively.
The phrase would then become ‘1 will s2 y3 2 1 w3ld work’.
After ignoring the spaces, it will take 19 memory units.
This is about 40% file compression (32-19/32 *100)
o If the whole pages are compressed, then repeated words are continuously replaced, hence
resulting in a small file size.
o This is lossless compression in which the original phrase can be reformed.
Lossless file compression o All the data bits from the original file are reconstructed when
the file is uncompressed.
o For text and number files, this is very important because any loss of data could be disastrous.
Lossy file compression o With this compression, some unnecessary bits of data are removed like in
mp3 or jpeg formats.
o In this way, reforming to the original file is impossible and is not even required since it doesn’t
detract from the quality.
• The larger the size of RAM the faster is the computer. When the computer uses up all available
RAM it has to start using the hard drive (virtual memory in form of swap files) to cache data,
which is much slower. The constant transfer of data between RAM and virtual memory (hard
drive memory) slows a computer down considerably. Especially when trying to load applications
or files.
• A typical computer system may have two to eight GB (gigabytes) of RAM, while the storage
capacity of the hard disk drive can be several hundred GB or even one TB (terabyte).
• There are two types of RAM technology: o DRAM: Dynamic random-access memory (DRAM) is a
type of random-access memory that stores each bit of data in a separate capacitor within an
integrated circuit.
The capacitor can be either charged or discharged; these two states are taken to represent
the two values of a bit, conventionally called 0 and 1.
It also contains a transistor which acts like a switch and allows the IC to read and change the
value of the capacitor.
A DRAM storage cell is dynamic in that it needs to be refreshed or given a new electronic
charge every few milliseconds to compensate for charge leaks from the capacitor or it will
lose its value.
Advantages:
- Less expensive
- Consume less power
- High storage capacity
Use: typically used in computer’s main memory
o SRAM: SRAM (static RAM) is random access memory (RAM) that retains data bits in its
memory as long as power is being supplied.
Unlike dynamic RAM (DRAM), which stores bits in cells (flip flops) consisting of a capacitor
and a transistor, SRAM does not have to be periodically refreshed.
Advantage:
SRAM is faster than DRAM, access time is 25 nanoseconds (could be as low as 10
nanoseconds) while that of DRAM is about 60 – 100 nanoseconds.
Use: typically used for CPU cache.
• ROM
Read-only memory (ROM) is a type of storage medium that permanently stores data on personal
computers (PCs) and other electronic devices. Features: o It contains the programming needed
to start a PC, which is essential for boot-up (BIOS); it performs major input/output tasks and
holds programs or software instructions.
o ROM is read-only, it cannot be changed;
o It is permanent and non-volatile, meaning it also holds its memory even when power is
removed.
Disadvantage: Longevity – only 20 GB write operations can be done over a period of three years.
Limited operations can increase the life span.
Offline Storage
CD/ DVD
• They are called optical storage as laser light is used to read/ write data on the surface of the disk.
• They use thin layer of alloy or light sensitive organic dye to store data.
• The data is stored in pits (aluminum side) and bumps (on the side where laser reads) on the spiral
track.
• CD/ DVD may be R (read only, write once) or WR (can write and read many times)
• DVD technology is different from that of CD, in that it uses Dual layering which increases the
storage capacity. The two layers are joined together with a transparent spacer and a reflector in
between.
• Standard single layer DVD would still have larger capacity than CD because the pit size and track
width are smaller.
DVD RAM
• They use different technology.
• Instead of a single spiral track, it has a number of concentric tracks
• It allows multiple (up to 100,000) read and write operations at a time
• Have great longevity, over 30 years
Blu-ray disks
• It uses blue laser to carry out read/ write operations.
• Pits and bumps are smaller, hence greater storage capacity. Can store 5 times more than normal
DVD
• It uses single 1.1 mm thick polycarbonate disk; because of which it doesn’t suffer from
birefringence i.e. no light is refracted hence no reading errors.
• It comes with secure encryption hence prevents piracy and copyright infringement
Description:
• Data transmission is called digital transmission.
• There are three important factors which needs to be considered when transmitting data:
o The direction of data
transmission
o Method of transmission o
Method of synchronization
• Direction of transmission
Simplex – It is a communications mode in which only one signal is transmitted, and it always
goes in the same direction. The transmitter and the receiver operate on the same frequency.
Examples of simplex include radio broadcasting, television broadcasting, computer to printer
communication, and keyboard to computer connections.
Half duplex – It means that data can be transmitted in both directions on a signal carrier, but not
at the same time. An example of a half-duplex system is a two-party system such as a
walkietalkie, wherein one must use "over" or another previously designated keyword to indicate
the end of transmission, and ensure that only one party transmits at a time, because both parties
transmit and receive on the same frequency.
Full duplex – It refers to the transmission of data in two directions simultaneously. For example,
a telephone is a full-duplex device because both parties can talk at once.
• Method of transmission
Serial transmission - When transferring data between two physically separate devices,
especially if the separation is more than a few kilometers, for reasons of cost, it is more
economical to use a single pair of lines. Data is transmitted as a single bit at a time using a fixed
time interval for each bit. This mode of transmission is known as bit-serial transmission. - In
serial transmission, the various bits of data are transmitted serially one after the other.
- It requires only one communication line rather than n lines to transmit data from sender to
receiver.
- Thus, all the bits of data are transmitted on single line in serial fashion.
- In serial transmission, only single bit is sent with each clock pulse.
Advantage: Use of single communication line reduces the transmission line cost by the factor of
n as compared to parallel transmission.
Disadvantage: Use of conversion devices at source and destination end may lead to increase in
overall transmission cost.
This method is slower as compared to parallel transmission as bits are transmitted serially one
after the other.
Synchronous:
- Synchronous transmission does not use start and stop bits.
- In this method bit stream is combined into longer frames that may contain multiple bytes.
- There is no gap between the various bytes in the data stream.
- In the absence of start & stop bits, bit synchronization is established between sender &
receiver by 'timing' the transmission of each bit.
- Since the various bytes are placed on the link without any gap, it is the responsibility of
receiver to separate the bit stream into bytes so as to reconstruct the original information.
- In order to receive the data error free, the receiver and sender operates at the same clock
frequency.
Application: Synchronous transmission is used for high speed communication between
computers.
Advantage:
1. This method is faster as compared to asynchronous as there are no extra bits (start bit & stop
bit) and also there is no gap between the individual data bytes.
Disadvantages:
1. It is costly as compared to asynchronous method. It requires local buffer storage at the two
ends of line to assemble blocks and it also requires accurately synchronized clocks at both ends.
This lead to increase in the cost.
2. The sender and receiver have to operate at the same clock frequency. This requires proper
synchronization which makes the system complicated.
• Checksum
A checksum is an error-detection method in which the transmitter computes a numerical value
according to the number of set or unset bits in a message and sends it along with each message
frame.
At the receiver end, the same checksum function (formula) is applied to the message frame to
retrieve the numerical value. If the received checksum value matches the sent value, the
transmission is considered to be successful and error-free. A checksum may also be known as
a hash sum.
• Echo check
It is a check to determine the integrity of transmission of data, whereby the received data are
sent back to the source for comparison with the originally transmitted data.
Summary:
Aims and Objectives:
By the end of this lesson the students will learn about internet • USB
technologies. • ISP and Web browsers
• IP Address
Methodology: • HTML
Introduction • HTTP
Computer Internet technology refers to devices, software, hardware and transmission protocols
used to connect computers together in order to receive or send data from one computer to another
within a small network or as part of a small network within a larger network, such as the Internet.
Description:
• USB
- Short for Universal Serial Bus, USB is a plug-and-play interface that allows a computer to
communicate with peripheral and other devices.
- USB-connected devices cover a broad range; anything from keyboards and mice, to music
players and flash drives.
- USB may also be used to send power to certain devices, such as smartphones and tablets, as
well as charge their batteries.
- A USB cable has four wires: 2 for power and earth, and 2 for data transmission
- When a USB device is connected, it is recognized by the change in voltage. A device driver is
then loaded, to start the communication between the devices. If the driver is not found, then
it is downloaded.
Advantages: Disadvantages:
• HTML
- HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a file
intended for display on a World Wide Web browser page.
- The markup tells the Web browser how to display a Web page's words and images for the
user.
- Each individual markup code is referred to as an element or a tag. Some elements come in
pairs that indicate when some display effect is to begin and when it is to end.
- Cascading Style Sheet (CSS) is used for the presentation i.e. adding styles to the webpage.
• HTTP
- Short for Hyper Text Transfer Protocol, HTTP is a set of rules that allow users of the World
Wide Web to exchange information found on web pages. When accessing any web page
entering http:// in front of the address tells the browser to communicate over HTTP.
- As soon as a Web user opens their Web browser, the user is indirectly making use of HTTP.
- HTTPS - Short for Hypertext Transfer Protocol Secure, is a protocol which uses HTTP on a
secure connection. HTTPS is used to protect transmitted data from eavesdropping. It is the
default protocol for conducting financial transactions on the web, and can protect a website's
users from censorship by a government or an ISP.
• Web Browser
- A web browser, or simply "browser," is an application used to access and view websites.
- Common web browsers: Internet Explorer, Google Chrome, Mozilla Firefox, and Safari.
- Features of browser o Bookmarks – You can store the name and web address so that you can
visit the page later o History – it keeps the history of all the web pages visited every day.
o Navigation buttons: Back – go the previous page, Forward – move to the next page
Refresh – reloads the page, Home – starting page, Stop – stops loading the page o Cache
– stores the images and text of webpages, to load quickly if a web site is revisited.
- We type URL in the address bar to visit a webpage/ website. A URL has three parts:
e.g. http:/www.yahoo.com/news
protocol -> http, webserver-> yahoo, webpage -> news
- The web browser translates the web server name into an IP address. The HTML code is
returned and shown as a webpage.