1.2 Memory and Storage (copy)

Boot up process

  1. Power on

  2. ROM initialised the BIOS

  3. BIOS performs POST

    1. Either boot up halts or

  4. ROM loads OS to RAM

  5. Boot up complete

  • ROM-Read Only Memory

    • Non volatile memory chip on motherboard used to permanently store boot up instructions on a device

    • The data on this chip is programmed by the manufacturer so it is stored permanently and can’t be changed by the user.

    • Even if the computer loses power the data remains. (Non Volatile)

    • Has a relatively low capacity

    • Limited affect on the overall performance of the computer

  • RAM-Read Only Memory-Main Memory

    • Volatile memory where all data, instructions and software currently in use on the device is stored in separate memory locations

    • It consists of millions of individual memory locations that all have a unique address

    • Each app or data entering RAM is allocated one or more locations depending on how much data needs to be stored

    • Half of the RAM is taken up with the OS running

    • The items are added to any free space hence RANDOM access memory

    • When an instruction is fetched by the CPU the corresponding spot is cleared to receive another instruction.

    • When an app is launched it reserves some spots of RAM to run smoothly

    • It can be read from and written to

    • Can be increased by adding more chips to the motherboard

    • It will contain The operating system currently in use, The software currently in use and the data currently in use

    • Access to RAM is very fast

    • Data held in RAM is volatile and will be lost if power is lost

  • BIOS-Basic Input Output System

    • Firmware written to ROM that holds instructions on all the hardware components

  • POST-Power On Self Test

    • Process initiated by BIOS that sends a signal to all the components to check if they are working properly before starting the computer

  • OS-Operating System

    • Software installed on a device that manages all hardware once it has successfully booted up

Virtual Memory

  • An area of the device’s hard disk is allocated as an overflow RAM called Virtual Memory

  • The apps sent there are still open but the user is not currently using them so they are idle

  • If they are not used for even a second they can be sent to VM because a lot of FDE cycles happen

  • They can be moved to VM to free up some space in RAM

  • This keeps the computer running but it is slower than just using RAM. A better option would be to upgrade RAM on the computer

  • Swapping apps in and out of RAM and VM is called thrashing.

  • Too much Thrashing leads to Crashing

Memory vs Storage

  • Memory refers to the data used by the computer actively while it is being switched on

  • Storage refers to the data held on the computer permanently-software and files

  • ROM and RAM are both used everyt ime a computer is switched on- so it is classified as memory

  • The files and data permanently stored on a computers’s hard drive may or may not be used every time the computer is switched on

Storage types

Need for primary storage

  • To keep the instructions for currently running programs

Primary

  • RAM and ROM

    • RAM is volatile

    • ROM can not be changed

Secondary

  • Hard disk drive (HDD) and Solid state drive (SSD)

External Secondary

  • Compact disk (CD) Digital Versatile disk (DVD) BluRay

  • USB flash memory

  • Removable HDD

  • Magnetic tape

Virtual (Cloud)

  • Onedrive

  • GoogleDocs

  • iCloud

  • DropBox

Optical - CD-R DVD Bluray

  • Low capacity per disc compared to other types of storage

  • Slower to access data

  • Thin lightweight and portable

  • Used for

    • Low capacity of offline storage

    • Distribution of small files

Solid state - SSD Memory sticks Flash memory cards

  • Medium storage

  • Very quick access to data

  • No moving parts

  • Very reliable

  • No noise

  • Low power consumption

  • Limited number of read write cycles

  • Expensive

  • Used for

    • Transfer of files between devices

    • internal storage on small mobile devices

Magnetic - Hard disk drive Tape

  • High storage capacity

  • Quick to access data

  • Has moving parts will eventually fail

  • Used for

    • Internal storage on devices

    • High capacity offline storage

    • Back up

    • Archiving

Units

All data stored on a device is encoded in to a binary format, this can be interpreted and converted into electrical signals

The more data the more 0s an 1s needed and the larger the file size

8 bit values

The value on the left is known as the most significant bit

The value on the right is known as the least significant bit

Bits—Possible combinations

1—2

2—4

3—8

4—16

8—256

n—2n

When the result of an addition is too large for the number of bits the computer works with there will be an overflow error

Hexadecimal

base 16

10 =A

11=B

12=C

13=D

14=E

15=F

Why use Hex?

  • It is much easier for humans to remember hex values then a binary value

  • Quicker to write or type

  • Less likely to make a mistake with fewer characters

  • Easy to convert to and from binary

Character Sets

A character set is a mapping of characters to their unique identifying binary code value

They allow computers to store and process text data consistently across devices and software

They define how each character is represented by a unique numeric code enabling the representation of various languages and scripts

The number of characters in a Character Set can represent is linked to how many bits are allocated per character

ASCII

  • It was made for English

  • 7 bits is enough to represent all characters and symbols on an English keyboard

  • The extended 8 bit ASCII code allows for 128 extra special characters

  • Arithmetic is not possible on ASCII character representing number they first have to be converted to pure binary numbers

Unicode

  • Represents other alphabets for different languages

  • It uses 16 bits to represent every character in every language

  • It is used by modern devices

Bit Map

Bitmap images are made up of picture elements or PIXELS

Pixels

  • A pixel is the smallest identifiable area of an image

  • Each pixel is a single colour and is given a binary value which represents that colour

  • A pixels colour can be changed by changing that value

BMP - A standard format used by Windows to store device independent images

JPG - The most common format for bitmap images, especially for photographs

GIF - supports compression and is used for simple images and animations

PNG - A bitmap format with lossless compression, suitable for a wide range of image

Resolution

  • Resolution is the concentration of pixels within a specific area

  • The area is defined by the image width x the height in pixels

  • On screen there might be no visible difference.

Metadata

  • Colour depth

  • Resolution

  • Date created

  • Author

Sound

  • Real world sound is Analogue.  Input devices such as Microphones capture the analogue sound and Convert it to a Digital sequence.  ​

  • Sampling is a method of converting an analogue audio signal into a digital signal. While sampling a sound wave, the computer takes Measurements of this sound wave at a regular Intervals called sampling interval. ​

  • Each measurement is then saved as a number in binary format. As computers consist of millions of Logic Circuit and Switches, we use Binary to represent the individual points along the sound Wave.

  • sample

     ​

    Unit of measurement​

    sampling rate

     ​

    The measurements received​

    sample size

     ​

    number of bits in each measurement​

    Hertz

    How often measurements are taken​

  • Analogue sound signals are continuous​

  • Digital signals are discrete​

    Sound is digitized by repeatedly measuring points along the wave – the more measurements you take, the more accurately you can recreate the original sound wave

  • With a higher audio bit depth—and therefore a higher resolution—more amplitude values are available for us to record results in higher accuracy and improved sound quality and larger file size

  1. Sound engineer records at a sample rate of  44,100hz and a resolution of 24bps 

  2. CDs have a capacity of 700MB and need to fit 10 songs on, therefore use a lower bit depth of 16 bits.  They want to maintain quality so keep a sample rate of 44.1kHz

  3. Streaming services need to prioritise file size to make their services accessible to many. They greatly reduce the sample rate and resolution to 8kHz and 4 bits at its lowest option.

  • File size (bits) = sample rate x resolution x seconds

Compression

Files containing sound and images can become very large, which means sending them takes up a lot of bandwidth and time.​

There are specialist programs that can reduce the size of a file, this is calling File Compression.

Some compression techniques are referred to as lossy, because they cause data to be permanently lost during the compression process. These are best used on image, sound or video files.​

Other techniques are referred to as lossless, because they allow the original data to be exactly reconstructed from the compressed data. This method is more suited to text files or computer programs.

Lossy

Permanently removes some data

Recreates the file using the remaining data and uses algorithms to guess the removed content​

Uncompressed data is not the same as the original

Works well for removing data from images 

Can make text files/code unusable as vital data permanently lost

Lossless

Works well for compressing text and code 

Does not have the same compression rate as lossy

Benefits of compression

Smaller files = faster transmission time​

  • Quicker to complete transmission​

  • Reduces traffic over the Internet​

  • Less chance of collisions or transmission errors​

Reduces download times of video, sound (including speech used for VOIP systems) and image files​

Speeds up transmission of webpages that use images​

Reduces space on disk / servers​

Enables better streaming of music and video​

Drawbacks

Smaller files = poor quality – might not be fit for purpose​

  • Needs specialist software​

  • Data reduction might be very small​

  • Might make file unusable due to quality or gaps​

Sometimes the amount of data being transmitted or saved is so small that there is no need to apply a compression algorithm, for example if you are sending one document or one photo. It might take longer to compress then send than to just send in first place!