Unit 8.3 - RAM, ROM and compression notes
Unit 8.3 - RAM, ROM and compression notes
Most users of digital devices are aware that they need some kind of storage device to allow them to use their
data at a later time.
Storage devices that are used to store data for long peroid of time are called secondary storage devices.
Primary memory is built inside the computer. As a result, data can be read from and written to primary
memory extremely quickly. This gives the processor fast access to the data and instructions that the primary
memory holds.
There are two types of primary memory:
read-only memory (ROM)
random access memory (RAM)
RAM:
RAM stands for Random Access Memory. It is also referred to as the computers Main Memory. This is because
it is the memory that the CPU has direct access to. The job role of RAM is to store all the computers open
programs and files. When a program/file is loaded up, it is opened from Secondary Storage (we will cover this
in a later topic) and stored in the RAM. This is so the CPU can access the program/file and its data quicker.
ROM:
ROM stands for Read Only Memory. It is called Read Only because it is not rewritable, therefore it can only be
read (it cannot be changed). The job role of ROM is to store the program required for booting up (loading up)
the computer system. This program is called the BIOS (Basic Input/Output System). The BIOS stores all the
instructions for the computer system to boot up and work.
For example, the BIOS would contain the instructions necessary for any input or output devices to work. The
most important part of this program that locates the computer’s operating system in the secondary storage and
loads it into RAM. This allows the user to interact and use the device. An example of an Operating System is
Windows.
RAM and ROM: The Differences
There are some key differences between RAM and ROM are
Compression:
Data Compression: Compression is reducing the size of a file so that it takes up less space on secondary
storage.
For example, we may compress a WAV sound file (which has a high audio quality but a large file size) down to
an MP3 sound file (which has a lower sound quality but a much lower file size). This would then allow us to
store more sound files on a device such as an iPod, due to the file sizes being smaller.
o We may also need to compress a file to allow us to have additional room on a storage device, or to make
a file small enough to send in an email so it required Less bandwidth and Shorter transmission time.
There are two types of compression, these are:
Lossy Compression
What is lossy compression?
Lossy compression is when data is lost in order to reduce the size on secondary storage
Lossy compression is irreversible
Lossy can greatly reduce the size of a file but at the expense of losing quality
Lossy is only suitable for data where reducing quality is acceptable, for example images, video and
sound
In photographs, lossy compression will try to group similar colours together, reducing the amount of
colours in the image without compromising the overall quality of the image.
Lossless Compression
What is lossless compression?
Lossless compression is when data is encoded in order to reduce the size on secondary storage
Lossless compression is reversible, the file can be returned to its original state
Lossless can reduce the size of a file but not as dramatically as lossy
Lossless can be used on all data but is more suitable for data where a loss in quality is unacceptable,
for example documents
In a document, lossless compression algorithms such as run length encoding (RLE) can be used to
analyse the contents looking for patterns and repetition.
What is run length encoding?
Run length encoding (RLE) is a form of lossless data compression that condenses identical elements
into a single value with a count
For a text file, "AAAABBBCCDAA" is compressed to "4A3B2C1D2A"
The string has four 'A's, followed by three 'B's, two 'C's, one 'D', and two 'A's
RLE is used in bitmap images to compress sequences of the same colour
For example, a line in an image with 5 red pixels followed by 3 blue pixels could be represented as
"5R3B"