3.1 Computers and their components

Specification

  • Show understanding of the need for input, output, primary memory and secondary (including removable) storage

  • Show understanding of embedded systems

    • Including benefits and drawbacks of embedded systems

  • Describe the principal operations of hardware devices

    • Including: Laser printer, 3D printer, microphone, speakers, magnetic hard disk, solid state (flash) memory, optical disc reader/writer, touchscreen, virtual headset

  • Show understanding of the use of buffers

  • Explain the differences between Random Access Memory (RAM) and Read Only Memory (ROM)

    • including their use in a range of devices and systems

  • Explain the differences between Static RAM (SRAM) and Dynamic RAM (DRAM)

    • include their use in a range of devices and systems and the reasons for using one instead of the other depending on the device and its use

  • Explain the difference between Programmable ROM (PROM), Erasable Programmable ROM (EPROM) and Electrically Erasable Programmable ROM (EEPROM)

  • Show an understanding of monitoring and control systems

    • including

      • difference between monitoring and control

      • use of sensors (including temperature, pressure, infra-red, sound) and actuators

      • importance of feedback

Input, Output and Storage

Software, hardware and firmware

Before USB

This is not part of the CIE specification, but an interesting video to see development of communications and protocols.

Manual input devices, applications and how they work

We have seen a model of a computer system before. We know that for a computer to do useful things, we need to get data into it. We use input devices to do this.

CompSys

Input devices are often divided into two categories, manual input devices and automatic input devices. We will discuss manual input devices here.

Keyboards

Practically all computers have QWERTY keyboards. These devices can be used to enter in data manually. They are very efficient in the right hands but not so efficient if a user has limited training. In fact, they can be very slow and mistakes are easy to make, although software tools can automatically fix many of them. A lot of work has been done to ensure that keyboards are designed 'ergonomically'. This means that they are designed in a way that takes into account the 'design limitations' of a human being. There is a health and safety problem known as Repetitive Strain Injury (RSI) for people who use keyboards all the time, such as secretaries. The joints in their fingers can become 'worn'.

What happens when you press a key:

How do keyboards work?

Keyboards are essentially lots of switches arranged in a grid or matrix.

The keyboard is managed by the keyboard's own processor. When you press any key, this closes a switch, which completes an electrical cicuit. When the keyboard's processor detects this, it works out what key has been pressed by comparing the circuit that has been completed with a table of character keys kept in its Read Only Memory. It can also detect special combinations of keys pressed, such as SHIFT G being a capital G. When it has worked out the key or special combination, it then sends this information to the computer.

Touch-sensitive keyboards and concept keyboards and how they work

An extension of manual data input into computer systems using keyboards is to use touch-sensitive keyboards and concept keyboards. These types of keyboard have 'keys' which are made up of touch-sensitive areas on a plastic cover. A user presses on the touch-sensitive area to input data into the computer. They have a wide range of applications. They can be used in fast food restaurants. Operators simply press on pictures on the keyboard. This speeds up data input and means that training needs are minimal. They can be used in areas where there is likely to be a lot of dirt such as in factories. Dirt can get into normal QWERTY keyboards and cause them to malfunction but the protective plastic cover on touch-sensitive keyboards stops this happening. They can be used to customise keyboards because some touch-sensitive keyboards (called 'concept keyboards') allow you to program what you want to happen when an area is pressed. You can imagine, for example, designing a concept keyboard for a two year old child, who may have limited co-ordination and cannot yet read. You could provide a keyboard with four big brightly coloured areas. When the child wants to make any selection at all, they just need to touch the right coloured area.

Touch screens and how they work

This is another manual data input method. A touch screen enables a user to touch their VDU screen to make selections. A plastic cover that has fine wires running through it can be placed over a VDU's screen. A user makes a selection by touching the screen with their finger. The exact position can be calculated from the signals sent back by the wires. Touch screens allow very fast selections from choices. They could be used in places where people need to find out information but may have zero computer skills, for example, an information system in a library or a museum. They would be of limited use if you had to type in a letter, for example.

Graphics tablets and how they work

Another manual data input method is the graphics tablet. These are touch-sensitive pads that allow you to 'draw' on them with a stylus. The pressure from the stylus on the pad is sent to the computer, which reproduces what was done on the pad in a drawing program or CAD program. These types of data input devices are far more natural for designers to use than trying to use a keyboard and mouse to draw with.

Optical mice and how they work

An optical mouse is a pointing and selecting device used with graphical user interfaces (GUI). There are different kinds of mice around, each with their own advantages and disadvantages although they all broadly do they same thing: point and select things on the screen. Optical mice are the most common type of mouse now as they aren't prone to collecting fluff and dirt and so don't need cleaning. They are also very accurate, don't need a special surface to work on and are very reliable because there are fewer moving parts than an old style roller ball mouse.

A small light emitting diode (LED) shines light onto the desk, which is reflected back to a photocell next to the LED. This has a lens, which magnifies the light signal for better accuracy. The reflected light signal is analysed by a processor inside the mouse, which can work out that your mouse is moving and where it has moved to.

Apart from the LED, there are also either two or three contact buttons that can be pressed to make a selection as well as a wheel, which allows you to scroll through a web page or document faster. The rotation of the wheel is detected either by another optical system or by using potentiometers, like those used on the volume control of a radio. This information is again passed to the mouse's processor, who then passes the information to the computer, to make the necessary adjustments.

Image capture

We will frequently want to capture images and get them into a computer. Images can be captured in a number of ways. We will look at web cams, scanners, video capture cards and digital cameras.

Web cams and microphones

Web cams and microphones are both input devices. Web cams capture the image in front of them whereas microphones capture sound. They are typically used for VOIP applications (Voice Over Internet Protocol) such as Skype, where two people can communicate over the Internet using a camera and a microphone. Microphones are increasingly integrated into the web cam. These kinds of devices are excellent for families and friends to keep in touch and for businesses to communicate instantly across the globe, saving the time, energy and expense of travelling.

How do microphones work?

When you speak or play music into a microphone, the microphone takes the sound waves and converts them into a voltage. As the sound waves vary, so the voltage varies. The microphone is connected to a computer's sound card. The sound card samples the microphone's voltage at intervals. How many times it does this in a second is known as the 'sample rate'. The time between samples is the 'sample interval'. The bigger the gap between taking a sample, (in other words the larger the sample interval), the lower the quality of the recording, although the benefit is a smaller file size. Each time the voltage is sampled, it is converted into a binary number by the sound card's Analogue to Digital Converter (ADC) and stored. If you store all of the digital samples, you end up with a sound file. This might be a song or a recording of your voice, for example.

To play back a sound file through some speakers, the sound file is passed back to the sound card, into which the speakers are connected. The Digital to Analogue Converter (DAC) on the sound card takes the digital signals that make up the sound file and converts them back into analogue signals. They are then passed out to the speakers and the sound is played.

Voice recognition

Voice recognition software is getting better every year! Using a microphone and some appropriate software, it is possible to input data into a computer or directly into a tablet PC or phone. The software is not perfect. You often have to teach it to recognise your voice accurately. If you have a cold or a throat problem, or a very strong accent, it may reduce the accuracy of input. Nevertheless, it is still a fast way of inputting data.

Scanners

Images from magazines or photographs, for example, can be captured using scanners.

  1. Typically, the image is placed on a flat screen or 'bed'.

  2. A cover is placed over the image.

  3. The image is divided up into sections or 'pixels' by the software. The user can tell the software what resolution to use (how many pixels per square centimetre to split the picture up into). The higher the resolution, the better the detail of the image but the bigger the file. Often, low resolution, smaller files will be perfectly adequate for most uses.

  4. A light is passed from one end of the flat bed to the other, so that it passes over the image and over each pixel.

  5. When the light hits each pixel, it gets reflected back. The intensity of the reflection depends on the colour at that pixel. Each pixel's information is stored.

  6. The information about all of the pixels is used by the software to reconstruct a bit map image of the whole picture.

  7. Because bit maps are large files, they are often compressed. This can be done by telling the software to save the image as a different file type that uses compression, such as GIF files or JPG files.

  8. Software tools either within the scanning software or within a drawing package allow the user to manipulate an image in various ways. These typically include allowing the user to 'crop' an image (select just a portion of an image), allowing the user to improve the detail of the image, allowing the adjustment of colours and allowing the user to add special effects such as making a photo image look antique.

Video capture cards

A video is made up of a series of pictures, or frames, that are played quickly enough to appear moving. A video capture card is a piece of hardware that is plugged into an expansion slot inside the computer. A user then attaches a video camera or TV, for example, to the video card. When the video or TV is played through the card, the analogue signals that make up the moving picture from these devices are converted into digital images, frame-by-frame and stored. Once you have captured each frame, you can then use the software to do all kinds of clever things. For example, you can edit out frames, reorganise them, save individual frames and transfer them to word processing documents, create your own presentations using presentation software and some of the images or add your own soundtrack.

Digital cameras

These cameras do not store images on film. They store images digitally in memory. The images are then transferred to the computer. There are many points that could be made about digital cameras

  1. The price of digital cameras has been steadily falling over recent years.

  2. The amount of memory is a very important consideration with these cameras, as is the ability of a camera to add memory. This is because storing images is memory-intensive.

  3. Cameras often allow the user to select between high resolution and low resolution modes. If you use a high resolution mode, you will be able to take fewer pictures than low resolution mode.

  4. You can immediately view photos and re-take or overwrite them if they are not what you want.

  5. You can often add extra information easily, such as the date or information about the photo.

  6. Many cameras allow you to add special effects as you take the picture.

  7. Images can easily be combined into digital photo albums and distributed or emailed to friends.

  8. Once the picture has been taken and transferred to the computer, it can be opened in a drawing package and manipulated. Pictures can be cropped, colours changed and parts of the photo 'touched up', for example.

Camcorders

Video camera recorders, or camcorders, are cameras that store moving images. There is a wide range of types of camera. Some camcorders store the moving images as analogue signals. You may have heard of VHS, Super VHS or 8mm analogue camcorders. Analogue camcorder films lack really mint quality and lose quality if they are copied. Films made using digital camcorders, on the other hand, have much better quality and don't lose any quality if they are reproduced. This is because the films are stored digitally. Digital Video (DV) and Digital 8 are two of the common digital formats around. Typical features of digital camcorders include the ability to zoom in, record sound, view films through a viewfinder, some have night viewing capabilities, time-lapse photography, picture stability software and special effects.

Biometric devices

People are being increasingly identified using biometrics. This means using a unique part of your body to identify you. Typical examples include fingerprint scanning in canteens, libraries, phones and ATMS, retinal scanning for access to buildings and biometric data held in a chip in newer passports. Biometrics are very convenient as you can't lose or forget a finger or your eye like you can a library card! It also reduces the need for cash to be handled, which cuts down on costs and removes security issues. There are concerns about what happens to the data, how it is stored and who has access to it, however, and the ever-present problem of hackers stealing your data and using it for unauthorised or illegal activities.

Automatic input devices, applications and how they work

Introduction

We have seen a model of a computer system before. We know that for a computer to do useful things, we need to get data into it. We use input devices to do this. Input devices are often divided into two categories, manual input devices and automatic input devices. We will discuss automatic input devices here.

Automatic data input methods

Automatic data input methods are methods where data is collected and processed and prepared beforehand in some way so that it can be directly entered into a computer system when needed. We will see some examples of this to illustrate what we mean.

Optical Mark Readers (OMR)

OMR

Data sheets are prepared and people put marks in set places to indicate a choice. They are used, for example, in multiple-choice tests because the answers can be scanned in and a pupil's mark calculated by the computer - less work for the teacher. They can be used to capture answers to questions on a questionnaire, or to select numbers on a lottery ticket. Some applications are not suitable for OMR. For example, you wouldn't collect names using OMR because you would have to provide 26 places for a mark to be made for each letter in the name! They are really only suitable when a small number of choices are available.

When OMR sheets are completed, they can be scanned in automatically and the results produced straight away. The data doesn't have to be typed in manually, which could introduce typing errors, takes time and can cost a lot of money if there is a lot of data to enter. If you are not experienced filling in OMR sheets, they can cause problems. It is easy to make a mistake. If this happens, you need to know how to correct it on the OMR sheet. There is usually an elaborate set of procedures to follow if this situation arises. Estimates of the number of OMR sheets rejected when used in questionnaires range from 10% up to 30%! In addition, if the OMR sheets themselves get torn or creased, then they may get rejected.

Optical Character Recognition (OCR)

A page of writing or data is first scanned on a scanner (or you can take a photo of text or data on your mobile phone and then use a free OCR app to convert it). A very bright light is shone on the text and the white and dark space caused by the letters on the page reflect different amounts of light back. This is measured and used to produce a bit map picture of the writing. It is not yet a word processing document. Some OCR software is then run on the picture. This scans the picture looking for patterns that represent characters on a keyboard. As it finds these patterns, it transfers them to a text file. When the whole picture has been scanned, a text file will have been produced that can then be opened in a word processor or other applications.

OCR can be used to transfer spreadsheet information directly into a spreadsheet or to get textual information from books into a word processor. You could easily use this method to scan the complete works of Shakespeare, for example, and then you could analyse each work, to check that it has really been done by Shakespeare! You could use this method to transfer human knowledge from books to computer to allow it to then be searched easily, transferred and distributed, for example. OCR is used to read postcodes on letters by the post office to enable speedy and cost-effective sorting of mail. It can be used to convert written documents into a form that could then be output via speakers to people with problems with vision. Although software is becoming ever more powerful, OCR is still only reliable for typed work. It still struggles to recognise handwriting.

Here's another video on optical character recognition from Computerphile.

Bar codes

Bar codes are made up of black and white striped lines. The lines represent data in coded form. The data held in a bar code can be retrieved by using a laser scanner. The data obtained can then be used to look up further information held on computer.

Bar codes can be attached to libraries to speed up taking out and returning books. Membership systems that require members’ details to be retrieved could employ barcodes. Supermarkets could use them for stock control systems, to speed up the checkout process and to produce itemised receipts. Bar code systems have built in validation techniques that greatly reduce errors. The data scanned can be integrated into management information systems so that, for example, managers can tell which books are never taken out of a library and should be removed, which members never attend an event or which products in a supermarket sell best on Sundays. In supermarkets, bar codes are an integral part of the stock control system. One problem with any system that is completely reliant on computerised systems, however, is what to do when the system breaks down. A bar code for a product in a supermarket will typically contain:

  • the country of origin of the product

  • the manufacturer's identity number

  • the code for the actual product

  • the check digit, used to check that a number has been scanned in correctly.

Magnetic stripe cards and smart cards

Data can be entered into computer systems by using cards that have a magnetic stripe on them. The magnetic stripe holds coded information. This can be retrieved by 'swiping' the card through a magnetic card reader. The information can then be used directly, or used to retrieve more information from a central computer.

This type of data input is typically used for credit cards, debit cards, loyalty cards, membership cards and security access cards. They are quick to use, can be used many times, are cheap to produce and the important information held on them cannot be read unless you have the right equipment. Magnetic stripe cards can be read but not written to. The data is placed on the card when it is made. For this reason, smart cards have become more widely used. These are cards that have an electronic chip on them. This can be used to record each time a transaction occurs, for example. In other words, smart cards can be written to as well as read from! Interestingly, cards with magnetic stripes typically have some details written on the card as well so that a person can read them. It might have the name of the owner of the card on it, in case the card gets lost. It might have the card number on it, in case the owner of the card wants to use it to buy something over the Internet or phone.

Magnetic Ink Character Recognition (MICR)

When banks produce cheque books, they print on the bottom of the cheque the sort code of the bank, the account number and the cheque number. These numbers are printed in magnetic ink because the cheques can then be read automatically once a cheque has been written. It doesn't matter if the cheque gets creased or a little dirty because the data on them can still be read by the special magnetic ink readers.

When a cheque has been written, it will be paid in to the bank. It cannot yet be read automatically, because the date and amount have been written on by hand. When a cheque is paid into a bank, an operator prints on the cheque how much it is for and the date it was paid in. When all of the cheques for that day have been collected together, they are loaded up into a special machine that batch processes them - it reads each cheque and adjusts all the accounts as necessary. MICR cannot be considered completely automatic because some of the data must be prepared before it can be entered into a computer. It is an example of a cross between an automatic data input system and a manual one.

Data logging

A classic example of an automatic data entry method is data logging. Consider an experiment where a pupil wants to know how the temperature of a computer room varies over 24 hours. They would need to select a transducer to read the temperature. In this case, they select a thermistor. This is an electronic device with a special property. The output voltage from the thermistor constantly varies, depending upon the temperature. It is known as an ‘analogue transducer’ because there are an infinite number of outputs from it. The pupil knows that the computer is a digital device. They know that you cannot simply connect an analogue device to a digital device. You have to convert the analogue signal first using an ‘interface’. In this case, the interface required is an Analogue to Digital Converter (ADC). This takes the analogue signal used by the thermistor and converts it into the digital signals needed by the computer. The thermistor is attached to the ADC and the ADC is attached to the computer.

ADC

An Analogue to Digital Converter in use.

We have said that an interface is often required in control and data logging applications. You certainly need one if you want to attach any analogue transducers to a computer. An interface may perform other functions:

  • An interface may convert voltage signals from analogue into digital (ADC) or digital into analogue (DAC).

  • An interface may be used like a switch, so that e.g. a small dc voltage from the computer can be used to switch on and off a large motor that uses 240Vac.

  • An interface may provide compatible physical connections for a computer and the devices that need to be connected to it. Devices may use plugs and sockets that are physically different to a computer’s and so they cannot be directly attached to it. They have to go via an interface.

Sample times

The pupil wants to know how the temperature varies in a 24-hour period. A suitable output for this would be a graph. If the pupil set up the computer to take a reading every 10 minutes, then the computer would take 6 readings an hour, or 144 readings in 24 hours. This sample would be more than sufficient to produce a good graph. Of course, the pupil could have set up the computer to take hundreds of readings every second! This would have been unnecessary in this case because it wouldn't have told the pupil any extra information. Taking readings at appropriate times is known as ‘sampling’ or ‘taking a sample’. The trick is to be able to justify for any given problem what an appropriate time interval between sample readings is!

Data logging and satellite communication

Suppose we have a data logging system set up on the top of a mountain, to record the temperature. The data logger might take a reading every hour and store the value. How can the recorded values be sent back without having to send a person up to collect the readings? It can be achieved using satellite technology. A transmitter attached to the data logger sends a microwave signal to one of a small number of geostationary satellites that cover the planet. The message is amplified and retransmitted back to Earth. The signal is possibly bounced back up to another satellite and down again, so that the data is passed around the planet. The data is then collected and analysed by computer and possibly converted into graphs so trends can be examined.

We can log data in any place where people couldn’t realistically go for long periods, perhaps because they are dangerous, such as in a nuclear reactor, in space or at the bottom of an ocean. Readings can potentially be taken 24/7 and are likely to be far more accurate than readings people take. We might also need data logging equipment where things happen so quickly that people couldn’t take enough readings to analyse, for example, in scientific experiments. Of course, the equipment might breakdown so backup equipment may be necessary.

Output Devices, Applications and how they work

Introduction to output devices

There are lots of commonly used output devices available for a user to select from.

Dot matrix printers and how they work.

These are relatively slow and noisy and the quality of the hard copy is relatively poor compared to ink-jets and laser printers. They were very common a few years back in the early days of computing. Their uses are far more limited now but they do have one particular advantage. The hard copy is made by pins striking paper, which is why they are also known as 'impact printers'. That means that identical copies can be made of a printout by using carbon paper between sheets of paper (as opposed to printing out two copies of something - there is a subtle difference). This system is used by credit card companies to produce actual copies of receipts when a customer makes a purchase. After a customer's credit card is swiped and authorised, two identical copies of a receipt are printed using small dot matrix printers. Both copies are then passed to the customer, who signs the top copy. This puts a carbon signature on the bottom copy. The customer keeps one copy and the shop keeps the other. You cannot make actual carbon copies with ink-jets or laser printers although of course you can print out two copies of a document! Dot matrix printers, as well as others such as daisywheel are types of impact printer, due to the nature of a physical object making contact with the paper.

Ink-jet printers and how they work.

This type of printer 'sprays' ink onto paper. Different ink-jet printers work in different ways. Canon printers, for example, heat up the ink so that it explodes in bubbles onto the paper. The characters are still made up of dots, but the dots are so small (of the order of 50 microns diameter - a human hair is about the same diameter) that you can't see them and tell them apart. The dots are accurately positioned together to create characters and images but of course, you can use the printer software for an ink-jet printer to order your printer to use more dots per inch (or DPI). This gives you a higher resoultion e.g. 1200 by 800 DPI, very important for high-quality photos, for example but this uses more ink than lower resolution settings. If you are only printing out text, then 100 DPI is usually fine.

  • An ink-jet printer can't produce carbon copies.

  • An ink-jet printer can produce very high quality black and white as well as colour copies for a very low cost.

  • An ink-jet printer is a good choice for low volume applications such as small businesses or homes.

Laser printers and how they work.

These types of printers are in widespread use. A laser beam scans across a drum inside the printer to 'paint a pattern of static electricity corresponding to whatever it is you are printing out. The static electricity attracts powdered ink called toner onto the page and then a special unit bonds the toner onto the paper so it is permantently fixed. (This is also how a photocopier works.)

  • A laser printer produces very high quality black and white hardcopy.

  • A laser printer costs more to buy and run than ink-jets although costs have been steadily falling in recent years.

  • The price of colour laser printers has been falling to make them within reach of individuals and small businesses. Colour laser printers work in a similar way to mono laser printers, but the paper travels through 4 different toner drums (CMYK)

  • Refills are expensive compared to ink-jets.

The following video discusses LED printers (which are rare), but as LED and laser printers work in very similar ways, this is still a valuable video to watch.

Plotters.

Plotters are widely used in some industries.

  • Plotters are used to plot very large drawings such as those needed by engineers and designers whereas standard printers commonly print up to A4 (and sometimes A3).

  • Plotters produce very high quality, very accurate, colour drawings.

  • Plotters are relatively expensive compared to printers.

Visual Display Units (VDUs).

Monitors are ideal for displaying data and information to users. They come in a range of sizes. Larger ones such as 21-inch screens, for example, would be ideal for engineers using Computer Aided Design software applications. 15-inch screens are perfectly acceptable for users using a range of generic applications. CRT (Cathode Ray Tube) monitors (similar to televisions) do take up a lot of space on a desk. Flat panel liquid crystal display screens, often referred to as TFT screens, save a lot of space by comparison. They are not quite as sharp as CRT screens, however, and are more expensive. TFT screens produce less radiation than CRT monitors. Excessive exposure to radiation is seen as a potential risk to computer users. They also use about half the power a CRT screen uses. If you multiply up the savings in power use in an organisation with thousands of computers, the cost-savings do become significant.

Touch screens are an important part of modern interfaces, this useful website gives comparisons between the different types of touch screen technology.

Speakers and how they work.

Some applications such as burglar alarms, factory warning systems and monitoring equipment make use of audio output. Some applications also require sound, such as video-conferencing, using your computer to make phone calls, listening to DVDs or CDs and playing games. There are different ways that audio output from a computer can be achieved.

  • The cheapest option is simply a pair of speakers powered by the computer. They will plug into the back of the computer, in the speaker output. The quality and level of sound will be perfectly adequate for many applications but they cannot produce a very loud output and cannot produce a very high quality sound.

  • You could also buy a pair of speakers that come with their own power supply. Although more expensive, they produce a higher quality sound and greater volume.

  • It is perfectly possible to connect an amplifier to the back of a computer and then pass the amplified signal to some speakers. This is a much more expensive proposition but does produce hi-fi quality sound.

  • In some noisy environments such as factories, klaxons (sometimes known as 'sirens') are common. These can be computer controlled and can produce a very loud sound that can be heard over noisy machinery.

speaker

Speakers work by sending an electrical current to a coil (3). The current varies according to the sound you want to play. A coil that has a current flowing through it becomes an electromagnet, which is attracted and repelled by a permanent magnet (1). The parts above are all contained within a speaker cone (3) that has a thin membrane called a diaphragm (4). The constant act of the coil being magnetised and demagnetised causes the cone to 'pump' sound out of the speaker by causing the diaphragm to vibrate.

Headphones.

There are situations where a user wants to listen to sound in a public place but doesn't want to disturb others. For example, a user in a library might want to listen to CDs on a computer, or a telesales operator might need to concentrate on what a customer is saying. They work in the same way as speakers.

3D printers

There are lots of short but very interesting videos you can watch to see the possibilities of this technology, which involves designing an object using some software and then sending it to a 3D printer to print out the actual object. It does this by printing out very thin layers of the object one at a time, and binding each layer with the previous one.

Rather than replicate the content, please visit the Explaining the Future website that has a very interesting and informative page listing all of the current types of 3D printer.

Some examples of the use of technology include;

Shooting the world's first 3D-printed gun.

Driving a 3D-printed car.

Printing out replacement legs.

Printing out replacement ears and replacement skin.

3D printing in the high street

Storage Devices

Introduction

Storage devices are known as 'non-volatile' devices. This is because when the power is removed from the device, the data files remain. These devices are long-term storage. They are perfect for backing-up files and applications, transporting them and sharing them. If you didn't have storage devices, you would have to reload applications and re-enter files each time you switched your computer back on! There are lots of different types of storage device to choose from.

Details on how each work are found in the 'internal operation' section below.

Hard disks (HDD)

Hard disk drives (HDD), are direct access devices - you can go straight to a file on an area of disk without having to go through all the other files first. Hard disks are used to store applications and data files. They can hold huge amounts of data compared to a floppy disk. A typical hard disk today might hold 2-6 TB of data but bigger disks seem to come onto the market every few months!

All personal computers have hard disks, although it is possible for workstations on a network to exist without a hard disk - they make use of the server's hard disk to store applications and data. These types of computers can be referred to as 'thin clients'.

Hard disks can also be used as back-up devices. A computer can be fitted with a second hard disk known as a mirror hard disk or a 'raid' data storage system. As the name suggests, this second hard disk is used to keep an identical copy of the main hard disk. Then, if the main hard disk fails (and every hard disk, indeed every storage device, will fail sooner or later), you can use the mirror disk to recover your applications and data with the minimum of effort.

Image result for hdd platter

Operating System Usage: Accessing a file

Applications access the HDD via the operating system (OS). First the application will run code that needs to access (reading or writing) the storage device. The program will pass on its file request to the OS and then go into a 'blocked state' (more on this in A2), meaning the application will be paused until the operation is complete. Most HDDs are constantly spinning (although some go into low power state), so if necessary, the OS will spin up the disk platters. If it's a file being read, the OS will search the File Allocation Table (FAT) for the relevant track and sector, where the first part of the file can be found. The head will then move to the correct track,and when the correct sector arrives under the read head, the data from the first cluster of sectors is written into the disk buffer, the disk continues to read successive clusters, writing this data to the buffer. When the file has been read, an interrupt is generated by the disk drive and the OS will then transfer the contents from the buffer to the application's data memory.

Storage capacity issues

You may have noticed that sometimes you files take up more room on the device than their physical size. Why is this?

Take the FAT/FAT32 file system for example, (NTFS and exFAT behave similarly with regards to allocation units). If you have a lot of small files, the space they take up on the storage device can certainly be far greater than their combined size. Consider this:

    • 50,000 files

    • 32 KB cluster size (allocation units), which is the max for FAT32

Ok, now the minimum space taken is 50,000 * 32,000 = 1.6 GB (using SI prefixes, not binary, to simplify the maths). The space each file takes on the disk is always a multiple of the allocation unit size – and here we’re assuming each file is actually small enough to fit within a single unit, with some (wasted) space left over.

If each file averaged 2 KB, you’d get about 100 MB total – but you’re also wasting 15x that (30 KB per file) on average due to the allocation unit size.

In-Depth Explanation

Why does this happen? Well, the FAT32 file system (and all other file systems) needs to keep track of where each file is stored. If it were to keep a list of every single byte, the table (like an address book) would grow at the same speed as the data – and waste a lot of space. So what they do is use “allocation units”, also known as the “cluster size”. The volume is divided into these allocation units, and as far as the file system is concerned, they cannot be subdivided – those are the smallest blocks it can address. Much like you have a house number, but your postman doesn’t care how many bedrooms you have or who lives in them.

So what happens if you have a very small file? Well, the file system doesn’t care if the file is 0 KB, 2 KB, or even 15 KB, it’ll give it the least space it can – in the example above, that’s 32 KB. Your file is only using a small amount of this space, and the rest is basically wasted, but still belongs to the file – much like a bedroom you leave unoccupied.

Why are there different allocation unit sizes? Well, it becomes a trade-off between having a bigger table (address book, e.g. saying John owns a house at 123 Fake Street, 124 Fake Street, 666 Satan Lane, etc.), or more wasted space in each unit (house). If you have larger files, it makes more sense to use larger allocation units – because a file doesn’t get a new unit (house) until all others are filled up. If you have lots of small files, well, you’re going to have a big table (address book) anyway, so may as well give them small units (houses).

Large allocation units, as a general rule, will waste a lot of space if you have lots of small files. There usually isn’t a good reason to go above 4 KB for general use.

Magnetic tape

Magnetic tape can hold lots of data, of the order of Gigabytes. They are used typically to back-up data files on networks. Network servers often have a back-up device fitted in the server that can hold 7 tapes, for example. These rotate automatically each day. The back-up process is automated, so that in the middle of the night, data is backed-up on a new tape and the tape gets ejected from the device. The Network Administrator then removes the tape in the morning and puts it in a fire safe. Magnetic tape is not a direct access device. It is a serial access device. If you lost one of your files and asked the Network Manager to recover it from a back-up tape, they would have to search through every file until they found the right one. They couldn't go straight to the file in question. For this reason, magnetic tapes are very slow devices, not suitable for fast access applications but ideal for applications where you won't probably need the data - like back-up applications! They are also cheap to store data on compared to other types of media. You can store more bytes per penny!

CD-ROM

This media is ideal for distributing software because they hold a lot of data (650 Mbytes or more) compared to floppy disks (1.44 Mbytes) and nowadays, most computers have a CD-ROM drive. It is much more convenient having software on one CD than having lots of floppy disks because you don't have to keep changing the media when installing the software. One CD is also less bulky than lots of floppy disks. CD-ROMs are direct access media but they do not use magnetic technology! They are optical storage media. They store information on pits in the surface of the CD and then use a laser to scan over the pits. CD-ROMs are read-only devices. The basic CD unit is very cheap. However, you would need to use a CD-R/W device and a special type of CD if you want to write to as well as read from a CD, in much the same way as you would read and write to a floppy disk.

CD-R/W

This kind of optical, direct access media is ideal for backing up personal files, especially those involving multimedia. It is suitable for this type of application because of the high storage capacity of CDs. You need to have a special CD-R/W device to write to CDs. The CDs themselves could be of the WORM type (Write Once Read Many times). This means that you can only write to the CD once (sometimes called 'burning a CD') but can read from it many times. This might be suitable if you wanted to make a back-up copy of some software you have bought or wanted to make and distribute some music you had recorded. CDs can also be Read-Write, which means they can be written to many times in the same way a floppy disk can be. A CD that has been created using a CD R/W device can be read from a standard CD-ROM device, usually after the installation of a small utility program. CD-R/W devices are now cheap to buy, of the order of twenty to thirty pounds.

Digital Versatile Disc (DVD)

DVDs are rapidly replacing CDs (and video tapes)! This optical, direct access, very fast media can hold approximately 17 Gbytes of data compared to the 650 Mbytes of a standard CD. A DVD player can read CDs as well as DVDs with the addition of extra software. They are typically used for distributing multimedia, especially high quality video. A DVD can store about 8 hours of high quality video! DVD recorders are also available. Although they cost hundreds of pounds their price will inevitably drop.

USB pen drive (flash drive)

These plug into a computer's USB port and provide a convenient way of transferring large amounts of data. Although they are relatively strong, you can corrupt the contents (so it is unreadable) by pulling out the pen drive from the PC before properly 'disconnecting ' it using the tool that comes with your operating system.

SD cards and micro SD cards

These small cards can hold very large amounts of data and are ideal for cameras and mobile phones, to hold pictures, videos and music.

Compressing data

Data compression refers to the process of 'squashing' data so that you can store more of it in the same space on a storage device. This can be done by using a utility program from within your operating system or using applications such as WinZip. A lot of data sent over the Internet is also compressed because this reduces the amount of time (and cost) of data transfer. It is compressed by the sending computer and de-compressed by the receiving computer. This happens automatically, without the knowledge of the users.

Cloud storage

Many companies these days do not back up their work onto a physical medium such as a tape or DVD but use internet storage instead. When they want to back something up, the data is first compressed to make it smaller. It is then sent over the Internet to a company, who stores it on their computers. This has quite a few advantages. You can set up the back-ups to automatically happen so no one will forget to do them. You don't need to buy expensive equipment to back-up work and you can't lose back-ups. Of course, you need an Internet connection and some companies aren't happy about sending their valuable data to another company to look after for security reasons. However, this way of storing data, known as 'cloud storage' is becoming increasingly popular. Many cloud storage companies offer a certain amount of free storage to individuals. You could do a search and start using cloud storage yourself!

SIM cards (Subscriber Identity Module card)

Mobile phones have SIM cards. These have a very small amount of storage on them, to hold phone number information, contacts and so on. The storage capacity is very limited, however.

Floppy disks and Zip disks

For many years, floppy disks used to be the main storage medium after the hard drive, although these days, you would be unlikely to see modern computer systems with one as they can hold so little data compared to alternatives. Drives typically cost less than ten pounds while the disks themselves cost pennies. A disk typically stores 1.44 Mbytes, or about one and a half million bytes of data - you would struggle to store one good quality digital song on one disk! Zip disks are similar to floppy disks but have a much higher capacity. Zip disks hold typically 250 Mb and are still used to back up files.

Selecting a storage device

When selecting a storage device to use, you should consider a number of issues. These include:

  • How fast the media can be accessed (their 'read / write access times').

  • Whether data can be accessed directly or serially, because this affects the time it takes to access data. Magnetic tape, for example, is serial access and very slow whereas flash drives are direct access and very fast.

  • How much data can be stored on the media.

  • What the media might typically be used for.

  • How commonly used the media is and whether other computers are likely to be able to use that media. Most computers don't use floppy disks or Zip drives anymore, for example, so even if you had these on your computer and wanted to share files, it wouldn't be a good idea to use these.

  • The cost of the media and the cost of the actual device used to read from or write to it.

  • Whether the media is read-only or read-write. some devices can only be written to once and then read many times (WORM) like a CD-ROM but other devices can be written to many times, like a pen drive.

  • Whether the storage medium is 'virtual' and requires an Internet connection or whether it is physical.

  • How portable and convenient the device is.

The Internal Operation and technology of Storage Devices

Introduction

There are three main types of technology for storage. These are:

  • solid state

  • magnetic

  • optical.

Solid state devices (Flash devices)

Solid state devices have no moving parts. That means they can't get worn out and are not quite as easily damaged by bangs and knocks as optical and magnetic devices. They store store data in binary patterns using billions of tiny switches called transistors (using NOR or NAND technology). Another point to note about solid state devices is that they need very little power to work and can get the power that they do need from the device that they are plugged into. Examples include, SD cards, micro SD cards and pen drives. Many computers and laptops are now being sold with solid state hard drives (SSDs). Although typically much smaller (and usually much faster) than magnetic hard drives, as there are no moving parts and latency is cut down to a few miliseconds! A solid state hard drive can breathe new life into an old laptop.

Magnetic devices

These store binary data patterns as billions of magnetised fields, using the magnetic properties of materials such as iron. These areas can be read from or written to by a special head that moves over the magnetic area. With hard disk drives and floppy disk drives, the disk spins very quickly (thousands of times a minute, usually at 7200 RPM) whilst the head moves over the magnestised areas, reading from and writing data to the disk in a concentric pattern. One of the things to look out for if you ever have to buy a new hard drive is how fast the disk or disks spin (hard disks often have more than one disk inside them called a platter) - the faster they spin, the quick reading and writing data can take place so the faster your computer can work. Cache is also important, so data can be buffered for quicker read/write times. This video provides a lot more information that you will need for you exam, but does show what an amazing device the HDD is.

Modern day hard disk drives use a method of data storage called zone bit recording. As the hard disk reaches the outer parts of the platter, rather than the data density dropping, resulting in wasted storage, the number of sectors is recalculated.

The video below explains the components of a platter in more detail (tracks, cylinders, etc.)

Advantages of SSD over HDD

Optical devices

Optical devices store binary patterns using lasers. The lasers shine onto a disk and change whether an area on it can reflect light or not. The laser can then be used to read back patterns by shining a laser on the disk and looking at which areas reflect light and which don't. Some types of disk can be written to just once, although you can read from them many times. These are known as 'WORM' storage devices (Write Once Read Many). CD-ROMs, DVDs and Blu-ray disks are examples of WORM disks. They are often used by manufacturers to distribute software. Other media, such as CD R/W can be written to many times as well as read many times.

With optical media, the wavelength of the laser determines how much data can be stored on the disk. The shorter the wavelength, the more data can be packed into the same space. Disks can also make use of layering, by changing the intensity of the laser beam, data can be written to different disk layers, allowing double the storage capacity per side.

The change in height between pits and lands results in a difference in intensity in the light reflected. By measuring the intensity change with a photodiode, the data can be read from the disc. The digital information is defined as the length of pits and distance between them. The pits and reflective surface represents logic 0 and logic 1. The pits and lands themselves do not directly represent the zeros and ones of binary data. Instead, Non-return-to-zero, inverted (NRZI) encoding is used: a change from pit to land or land to pit indicates a one, while no change indicates a series of zeros.

Note, that dual laser beam systems are mostly replaced with more sensitive photodiodes that are able to detect the differential in light reflectivity from the transition.

Common Units of Storage

Bit

The basic building block of any computer is the switch. Computers, however, have millions and millions and millions of electronic switches in them, held in components such as RAM or the processor. Each switch can have one of two positions, on or off, which in computing, we represent as 1 or 0. Each switch can therefore hold one very simple piece of information (1 or 0) and we call each switch a 'bit' (from Binary digIT) and is the smallest unit of storage or memory that you can have. However, when you group these switches together in a certain way, you can represent data as binary codes, such as letters of the alphabet or numbers!

Nibbles and bytes

A single bit cannot hold a great range of numbers! It can hold either zero or one. You may have read about nibbles. A nibble is a group of 4 bits. The smallest value a nibble can hold is 0000 in binary and the largest number is 1111 in binary. (0000 in binary is the same as 0 in denary. 1111 in binary is the same as (1 x 8) + (1 x 4) + (1 x 2) + (1 x 1) or 15 in denary. It is also very common to group bits together in groups of 8. A group of eight bits is known as a 'byte'. Bytes are extremely convenient and important units of storage and memory to work with, as you will find out in due course.

Kilobytes, Megabytes, Gigabytes and Terabytes

We have seen that a byte can be used to represent a number. We will see soon that the number can be thought of as a code that represents a character on a keyboard. Before we look at that, however, we should note that if one byte is going to represent one character on the keyboard then we are going to have to collect together lots of bytes to record a memo, for example. For that reason, we frequently talk about Kilobytes, Megabytes and Gigabytes.

    • The smallest unit is a bit (0 or 1), written with a lowercase b

    • There are 4 bits in a nibble

    • 1 byte (written B) is 8 bits or 2 nibbles

  • 1 Kilobyte (1 KB) is 1024 bytes exactly,

  • 1 Megabyte (1 MB) is 1024 KB,

  • 1 Gigabyte (1 GB) is 1024 MB.

  • 1 Terabyte (1 TB) is 1024 GB.

Be careful if you see a lowercase b. E.g. 244Kb, which is 244 kilobits, not kilobytes.

So 15 Kbytes is about 15 thousand bytes. 128 Mbytes is about 128 million bytes. 20 Gbytes is about 20 thousand million bytes and 5 Tbytes is about 5 billion bytes (or 5 million million bytes, if you prefer). More often than not, you don't need to know the exact number of bytes, just an approximation!

Main memory

Main Memory Introduction

The term 'memory' is vague and often used by people to represent the information stored by a computer. In reality, memory comes in different sizes, configurations and speed. There are four main types of memory:

    • Registers (found on the CPU)

    • Cache (found on the CPU and in other peripherals. e.g hard disk)

    • RAM

    • ROM

The diagram below shows the hierarchy of different memory types. Typical access speeds and cost are now shown as these will be out of date before this page is saved.

The diagram shows that the fastest memory is also the most expensive, and also the smallest. The vast majority of fast access memory (such as cache) is comprised of S-RAM (static RAM) which is very expensive to produce, hence why it is only used where speed is essential.

RAM is also known as main memory and primary storage (as is cache memory). All primary memory, excluding ROM, is known as volatile memory as the information is lost as soon as the computer's power is lost.

Cache Vs Main Memory

RAM and ROM

The vast majority of the content below is taken from The Teacher website.

Introduction

Computer systems come with two types of primary memory, RAM and ROM. Both types are known as primary memory (or primary storage) because the CPU can access them both directly.

Secondary storage

We often compare primary memory to secondary storage. Secondary storage is the term used for long term storage devices like a hard drive, a CD-ROM or a pen drive. The hard drive in a computer, for example, typically stores your operating system, your applications and all of your files, even if the power is switched off and even if you are not using them at the moment. We often think of secondary storage as a suitcase, a place simply used to store large amounts of data. This data isn’t accessed directly by the CPU whilst it is in the suitcase. If the CPU needs to run an application or access a particular file, then a copy of the application or file is moved into RAM first, and then it accesses it from RAM.

RAM (Random Access Memory)

This is the place where the computer stores programs and files it is using at the moment. Remember, all your programs and files are stored on your hard drive (whether you are using them or not) but the ones that are open, that are being used at the moment, have a copy in RAM. That means that the CPU can access them immediately. For this reason, RAM is often also known as the immediate access store. Computers could be designed so that they accessed instructions and data in a program directly from a hard drive. The problem with this approach is that devices like hard drives and other storage devices are very slow compared to RAM. It wouldn't allow computers to perform as quickly as they do.

RAM

You can think of RAM as a table with two columns. The second column is used to store instructions in a program and any pieces of data the program needs. There will be lots of these 'storage units' so each of them needs an address and that is what the first column is used for. The CPU uses these addresses to find and save data and instructions.

ROM (Read Only Memory)

ROM is needed when a computer system is powered up.

ROM

ROM holds part of a program that starts running when a computer is switched on.This program has two jobs:

      1. It checks that the computer hardware is all present and working correctly when you power up a computer system. It runs what is known as a 'BIOS' check (Basic Input Output System check)

      2. Then it helps the computer copy the operating system from the hard drive to RAM, so that the computer can then be used.

Starting up a computer is also known as 'booting up' the computer.

RAM v ROM

There are some key differences between RAM and ROM that should be noted, apart from their typical uses.

      • RAM is volatile. That means that when you switch the power off, all the contents of RAM are lost. ROM is non-volatile - even if you switch the power off, the programs and data in ROM are not lost. They are there waiting for you to power up the computer again! If your computer starts misbehaving itself, one solution is to switch off the power and boot it up again. What you are doing is to clear out the RAM and reload it all again in a nice, organised fashion.

      • You can read from RAM and write data to RAM as well. With ROM, you can only read from it. You can't write anything to ROM. (Actually, it is possible if you know what you are doing. This process is known as 'flashing'. If something goes wrong whilst you are flashing ROM, the equipment can stop working all together!)

RAM and Computer Performance

Introduction

There are a number of factors which affect how well a computer performs. One of them is the amount of RAM it has.

Running programs

When you install a program, it is stored on the hard drive. When you open or run a program, a copy of that program is put into RAM. The CPU can then access the program to run it (by fetching, decoding and executing each program's instructions). There are two areas that increasing or decreasing the amount of RAM can have an impact on.

Virtual memory

In an ideal situation, the entire program is put into RAM. If there isn't enough RAM available, however, then some of the hard drive is used as 'pretend RAM' (called virtual memory) and some of a program you are running is put there. This is far from ideal because hard drives are much slower for the CPU to access compared to RAM, although it does allow you to run more programs.

Multi-tasking

You can have more than one program at a time in RAM. For example, you will always have an operating system running, but you might also be writing a letter using a word processing application, at the same time have some music playing in the background using a music playing application and perhaps also have a chat program running. Doing lots of different things at (apparently) the same time is known as multi-tasking. It is 'apparently' because the CPU can only actually work on one instruction from one program at any one time. However, because it can do billions of instructions in a second and can switch between applications really quickly, everything seems to work at the same time!

Increasing the amount of RAM

You can keep opening as many new programs as you like on a computer. Each time you open one, a little bit more RAM (and 'pretend RAM' on the hard drive) is used and eventually, the computer slows right down. The more RAM you have, however, the more programs you can have open and completely copied in RAM without having to use the hard drive at the same time. One of the easiest ways of improving a computer's performance therefore is to increase the amount of RAM it has. You go to a computer shop and buy another stick of RAM and install it onto the computer's motherboard, or replace an existing smaller stick. The limiting factor of how much RAM you can have, however, is usually the computer's motherboard itself. There will be a fixed number of slots on the motherboard and the slots can only take up to a fixed amount of RAM. This information is in each motherboard's documentation. RAM can also be quite expensive so you need to have the funds to buy more RAM.

SRAM and DRAM

Introduction

There are two common types of RAM, each with their own characteristics and advantages/disadvantages.

ram

Comparison

DRAM needs the data to be refreshed periodically to retain the data. SRAM doesn't need to do this. As long as there is power on the SRAM, it will hold the data. DRAM has to have extra circuitry to allow the refreshing of data to take place and to get the timing to do this correct and this has implications for the amount of power a DRAM needs to have to run compared to the much simpler SRAM unit. All of this means that data can be read to and from SRAM a lot faster than DRAM.

Another implication of the simplicity of SRAM is that it is a lot easier for people to design hardware that uses it compared to the more complicated DRAM. If you are trying to design an application, you want to use hardware that is easy to use and integrate with your other components.

It isn't all rosy for SRAM, however! Each bit that you need to store in DRAM requires 1 transistor and 1 capacitor. SRAM requires six of each for every bit that is stored. If SRAM needs six times the amount of transistors and capacitors then it clearly is going to be a more expensive design and therefore the cost of buying 8 GB of SRAM is going to be a lot more than the cost of buying 8 GB of DRAM.

The relatively cheaper cost of DRAM is the reason why it is the most commonly found type of RAM in computer systems, despite being slower and needing more power than SRAM. It is used as general purpose memory, to hold the operating system, the applications and files you are actually using at any particular moment in time.

In devices where speed is crucial, SRAM is the memory of choice. The typical use for this is in cache. Programs are made up of instructions. These are fetched from DRAM by the CPU and executed. This is done quickly but still takes time. However, some instructions in DRAM are needed again and again. If you put these instructions in 'super-fast memory' instead (in other words, into SRAM), you can speed up processing and make your computer go much faster. That's what cache is - super-fast memory that holds instructions and data you keep needing. You only get limited amounts of it in a computer system, though, because as we have seen, SRAM is much more expensive than DRAM.

One question that should always be asked when buying a new computer is "How much cache has it got"? It is always worth getting as much cache for a computer as you can afford because it speeds up processing - but at a price!

This video from Computerphile explains how DRAM works. The contents are not essential for revision, but it goes a long way to explain the text above. The diagram drawn in the first part is called a flip-flop, and these are explored in the A2.

If you want to look at how modern devices and memory has evolved, the video below give a fascinating insight.