1.3.1 Processor components
(1)CPU
- CPU stands for central processing unit.
- This is the real brain of the computer.
- All arithmetic is performed here, every program instruction is interpreted and executed here, and every item to be placed in memory or retrieved from memory passes through the CPU.
- However, the processor would not be much use without memory in which to hold the data and the programs which process the data.
- The CPU and the main memory of the computer are located in the same physical unit, which is often referred to as the processor unit.
(2)INSIDE THE CPU
- A computer consists of the processor, memory, input and output units.
- The processor itself consists of TWO main components:
1.The Arithmetic-Logic Unit (ALU) in which all arithmetic and logic operations are carried out.
2.The Control Unit, which coordinates the activities taking place in the CPU, memory and peripherals, by sending control signals to the various devices.
- In addition, the CPU contains circuitry controlling the interpretation and execution of instructions.
- Special storage locations called registers are included in this circuitry to hold information temporarily while it is being decoded or manipulated.
(3)MEMORY
Computer memory, or storage, can be classified into TWO main divisions:
1. Main Store.
2. Backing Store.
- Main store, often called ‘storage’, consists of a large number of electronic circuits. If the computer is opened up a number of plastic boxes will be found, most of them housing memory circuits – up to two million in each. It has been predicted that by the end of the century it will be possible to store over a billion circuits on a chip. This is the only type of memory that the CPU can use directly, and therefore all information has to go through main store at some point.
- All other types of storage are known as ‘backing store’, or sometimes auxiliary storage, and this includes many devices ranging from paper cards with holes punched in them to laser-scanned compact disks, also known as CD ROM (Compact Disk Read Only Memory). By far the most common types of backing store in use today are magnetic disk and magnetic tape.
(4)STORING CHARACTERS IN A COMPUTER’S MEMORY
- In all modern computers each memory circuit can be either ON, indicated by a 1, or OFF, indicated by a 0.
- A series of eight circuits in the states ON, ON, OFF, OFF, ON, OFF, ON, OFF can be depicted as: 1 1 0 0 1 0 1 0
- Data can be stored in memory character by character, with each character being represented by a ‘code’ consisting of 1s and 0s.
- Each 1 or 0 is called as a ‘bit’, short for ‘Binary digit’.
(5)BYTES
- Most computers use 8-bits codes to represent each character.
- 8 bits together are known as one byte.
- This is sufficient to allow a unique code for all the usual characters with one bit, the leftmost bit, to spare.
- The spare bit may be used either as a ‘parity bit’ or to give an extra 128 characters.
- In this latter case, if the spare bit is 0, the code represents a normal character; if it is 1, the code represents a character from the extended character set.
- When you press a key on the keyboard, the corresponding 8-bit code is generated and sent to the computer.
- When a code is sent to the printer, the corresponding character is printed.
- One byte holds one character.
(6)ASCII
- Over the years, different computer designers have used different sets of codes for representing characters, which has led to great difficulty in transferring information from one computer to another.
- Most personal computers (PCs) nowadays use the ASCII code (American Standard Code for Information Interchange), but many mainframe computers use a code called EBCDIC (Extended Binary Coded Decimal Interchange Code).
(7)MEMORY ADDRESSING
- The memory of a computer can be thought of a series of boxes, each containing 8 bits (1 byte), and each with its own unique address, counting from zero upwards.
- The memory capacity of a computer is measured in thousand-byte units called kilobytes – although strictly speaking one kilobyte is equal to 1024, or 210 bytes.
- For example, a PC with 640K of memory contains approximately 640,000 bytes but, if we wish to be exact, the actual size is 640 * 1024 = 655 360 bytes.
- Memory is also measured in megabytes (approximately 1 million bytes), or in the case of very large computers, gigabytes (1,000,000 Kbytes).
- These measures can be abbreviated to Kb, Mb and GB.
(8)THE DATA BUS AND THE ADDRESS BUS
- The larger the number of bits that can be transferred by the bus, the faster the computer can transfer data.
- The number of lines in the address bus determines how many locations can be assessed.
- With a 16-bit address bus, the highest location that can be addressed is 65 535 (1111111111111111 in binary).
- In the 1970s when IBM brought out their PC, the designers thought it extremely unlikely that a PC would ever have more than 1Mb of memory, and that therefore a 20-bit address bus would be quite adequate.
- Unfortunately time was to prove them wrong, and a major effort had to go into designing new machine architecture to cope with over 1Mb of memory.
(9)WORD SIZE
- The faster, more powerful PCs have 32-bit processors, and most mainframes have 32-bit words.
- Supercomputers may use a 64-bit or 128-bit word size.
(10)RANDOM ACCESS MEMORY
- Memory may be one of two types, known as RAM and ROM respectively.
- RAM stands for Random Access Memory, which means that any memory location can be directly accessed by referring to its address.
- Data and programs are transferred into and out of RAM, and the data in RAM is processed according to the instructions in the program.
- There are two types of RAM memory chips: static RAM and dynamic RAM.
- Static RAM retains its information as long as the power is switched on.
- Dynamic RAM chips are smaller and simpler in design, but generally slower in operation, and the information slowly leaks away and has to be refreshed by special regenerator circuits in the CPU.
- The main memory of most computers uses dynamic RAM chips, with the more expensive and faster static RAM being used for cache memory.
- Both these types of memory lose all information as soon as the power is switched off.
(11)MEMORY MAPPING
- Some RAM is given a special function.
- For example, part of RAM is reserved for the operating system, and some is reserved to hold addresses and parameters used, say, when calling subroutines.
- This is called a stack. This allocation of memory to different functions is referred to as memory mapping, and a typical memory map for a microcomputer is shown below:
(12)READ ONLY MEMORY
- ROM (Read Only Memory) retains information even when the power is switched off, but the information has to be permanently recorded into the circuits when the chip is manufactured, and cannot be changed.
- ROM is used to store some of the operating system commands, and the instruction set of the computer.
- In special purpose computers used in video recorders, washing machines and cars, the program instructions are stored in ROM.
- It is also possible to buy Erasable Programmable Read Only Memory Chips (EPROM), which can be cleared by subjecting them to ultraviolet light, and then reprogrammed.
(13)CACHE MEMORY
- A cache is a small fast memory usually between 1Kb and 256Kb, too expensive to be used for the whole of RAM that acts as an intermediate store between the CPU and the main memory, and is used to improve the overall speed of the computer.
- Cache memory can return data to the CPU faster than main memory:
a) It is closer to the CPU;
b) It may use a dedicated control bus;
c) It may use higher-speed components;
- In systems which use cache memory, the most active portions of a program are kept in cache, from where instructions and data can be retrieved faster than ordinary RAM.
- Computers using cache memory are exploiting two principles:
a) An instruction or item of data that has been accessed once is likely to be accessed again the near future. (This is known as ‘temporal locality’).
b) If an item (instruction or data) is addressed at a given memory location, it is likely that other items with addresses near to this one will be accessed in the near future (‘spatial locality’).
- There are good reasons to expect temporal locality.
- For example, the existence of loops in a program means that the same instruction swill have to be fetched from memory over and over again, and furthermore the data that is operated on may well be the same in many of the instructions.
- Cache memory can also be used as a temporary storage for part of a disk.
- Disk drives are much slower at storing and retrieving information than memory, so the information that is most likely to be required next from disk is stored in cache from where it can be quickly retrieved.
1.3.2. PRIMARY AND SECONDARY STORAGE
(1)INTRODUCTION
· Secondary storage devices hold files that are not currently being used. For a file to be used it must first be copied to main memory first. After any modifications files must be saved to secondary storage.
· It is advisable to save your data files at the regular intervals as you work on them as data can be lost unexpectedly because of various reasons like interruption in power supply, memory management problems, freezing keyboard, etc.
· As secondary storage media can be damaged and files on them become corrupted, it is suggested to make back-up copies of valuable files on a regular basis. Lots of people skip the last but very important step in the backup procedure - check that the backup copy of files is not damaged.
(2)DIFFERENCES BETWEEN PRIMARY AND SECONDARY STORAGE
- Primary storage is volatile: when the power is off, all contents of RAM are lost. That is why data from RAM is saved as files on secondary storage which is non-volatile and almost permanent (It wears out eventually or becomes out of dated technology)
- Size. Secondary storage is virtually infinite: when you run out of space on one disk, you use another. On the contrary there is a limited amount of RAM that can be accessed by the CPU. Some programs will not run on a particular computer system because there is not enough RAM available.
- Access time. It takes few nanoseconds for the CPU to access RAM but it takes several milliseconds to access secondary storage.
- Cost. Secondary storage is cheaper than RAM in terms of cost per unit of data.
(3)THE REASON FOR RAM BEING FASTER
- RAM chips are located on the motherboard so the distance the electrical signals have to travel from the CPU to RAM or in the opposite direction is much shorter compared to the distance between the CPU and secondary storage devices. The shorter the distance, the faster the processing.
- Also working with the secondary storage involves mechanical operations like spinning
(4)STORAGE HIERARCHY
· The various levels of memory from registers to cache, to primary, to secondary storage have decreasing cost and speed and increasing capacity.
(5)TYPES OF ACCESS
- Secondary storage devices provide direct access to data or sequential access.
- Direct access also called random access, means that the system maintains a list of data locations and the required piece of data can be found quickly. The most common direct access storage is the disk.
- The most popular types of disks today are floppy disks, hard disks and optical disks.
- Sequential access means the computer system must search the storage device from the beginning until it finds the required piece of data. The example would be a magnetic tape where data is stored sequentially and can be processed only sequentially.
(6)WHY DO COMPUTERS NEED MEMORY?
- Memory is the computer's working storage: it serves as its work table or desk.
- Storing instructions
a) The fastest CPUs depend on getting instructions fast
· Storing information
a) The only direct way to make changes
(putting in new information, calculating answers, moving words...)
· Working space
a) This is like the desktop of an office worker. It is necessary for spreading out books and papers while working on them.
(7)PRIMARY STORAGE=MEMORY
· Fastest way to get information to the CPU
a) On a simple microcomputer: about 233,000,000 characters, or about 60,000 pages of typing, to the CPU each second (for a 233 MHz Pentium-based computer)
· Volatile
b) = "evaporates quickly:" Primary storage can disappear quickly: loss of electricity, making mistakes, or just changing
(8)TWO KINDS OF MEMORY ARE MOST COMMON:
RAM: Random Access Memory
- "Ordinary" memory used in all modern computers
- Easy to read and write
- Random Access: all parts equally close
- Takes no longer to read one part than another part
ROM: Read Only Memory
- Information stored at the factory; it can't be changed
- Used for:
a) Startup instructions on almost all computers
b) Built-in programs on laptops, palmtops, and dedicated word processors
c) Game cartridges for Nintendo, Sega, etc.
d) Disadvantage: when you want to change it, you have to throw away the old chips or cartridges
· Can also be accessed "at random"
(9)SECONDARY, OR “AUXILIARY” STORAGE
It's not so swift, but longer-lasting:
- Floppy disk to memory on a PC: about 50,000 characters per second
- Hard disk to memory PC: about 33,300,000 characters per second
- Lasts as long as you need it except for mistakes! - so it's important to make regular "backup" copies.
(10)WHY DO COMPUTERS NEED SECONDARY STORAGE?
- So they can "rest" (turn power off) without permanent loss
- So they can "think of something else"
- It's like the bookshelves or filing cabinets in an office: they're needed to store information in an orderly way while you work on something else, or while you go away for the weekend.
- So they can "rest" (turn power off) without permanent loss
- So they can "think of something else"
- It's like the bookshelves or filing cabinets in an office: they're needed to store information in an orderly way while you work on something else, or while you go away for the weekend.
(11)COMMON TYPES OF STORAGES
- Diskettes: can be removed from the computer
- Hard disk or Hard drive (same thing)
- CD-ROM
a) Older standard stores up to 650 Mb
b) DVD stores up to 17 Gb
c) Most can only be read - needs special device (CD-R) to write - more expensive.
(12)SECONDARY STORAGE DEVICES
- Secondary storage devices are used as a more permanent form of data storage, in contrast with primary storage (main memory) which loses its contents when power is switched off.
- Storage media include:
a) Magnetic disk (hard disks and floppy disks);
b) Magnetic tape;
c) CD-ROM;
d) WORM disks;
e) Magneto-optical disks.
(13)HARD DISKS
- There are two types of hard disk: exchangeable and fixed.
- As the names suggest, exchangeable disks can be removed from the drive and another disk inserted, whereas fixed disks, like those in a microcomputer, cannot be removed except for repair or replacement.
- Exchangeable disks are gradually being superseded by fixed disks which are faster and more reliable.
- A hard disk unit consists of several platters each of which is attached to a central spindle and has two recording surfaces.
- There is a read-write head for each surface, with all the read-write heads being mounted on a single unit and moving in and out together.
- Each surface has a number of concentric tracks, with each track being divided into a number of sectors.
- A sector (typically 256 bytes) is the smallest unit that can be read or written in a single operation.
- All the tracks that are accessible from a single position of the read-write heads form a cylinder; data is recorded cylinder to minimize movement of the read-write heads, thereby minimizing access time.
- A hard disk typically has a storage capacity of between 512 Kb and several gigabytes.
(14)FLOPPY DISKS
- Floppy disks consist of a thin piece of Mylar plastic coated with ferric oxide, enclosed in a protective jacket.
- The disk is read through an opening in the jacket, protected in the standard 3 1/2" disk by a metal sleeve until the disk is inserted in the drive and accessed.
- The disk has a small hole in the corner, which when open causes the disk to be write-protected so that the data on the disk cannot be accidentally overwritten.
- Floppy disks, like hard disks are divided into tracks and sectors.
- A high-density disk can store 1.44 Mb of data.
- Before being used, a disk has to be formatted, a process which checks the disk for unusable areas, marks out tracks and sectors and creates the disk directory.
(15)CD ROM
- CD ROM (Compact Disk Read Only Memory) is one of the three main forms of optical disk, the other two being WORM disks and magneto-optical disks.
- A CD is created using a mastering facility (just as audio CDs are created in a recording studio) and copies of master are duplicated or 'pressed' at a factory.
- They are used for many different applications including:
a) software distribution (e.g. word for windows, windows 95);
b) games;
c) reference material such as encyclopedias, telephone directories, past copies of newspapers, art catalogues, dictionaries;
d) Advertising, such as the free CDs commonly distributed with computer magazines.
- The capacity of a CD ROM is around 650Mb, about 500 times as much as a high-density floppy disk.
- Their high capacity allows storage of photographic images, sound and video, making them ideal for multimedia applications.
- When the master disk is created, a laser beam burns tiny holes in the surface of the disk, which has a single spiral track divided into sectors.
- To read data from the disk, a laser beam is reflected off the surface of the disk, detecting the presence or absence of pits which represent binary digits.
(16)WORD DISKS
- Write Once, Read Many optical laser disks (WORM disks) look similar to CD ROM disks, but they are often gold rather than silver in colour.
- An end user company can use these disks to write their own material, typically for archiving or storing say, graphic or photographic images which will not be changed.
- These disks are also widely used for pirated software; whereas silver CDs are pressed in factories, gold CDs are usually written one at a time on PCs in garages and back bedrooms.
- However, because there is a lot of competition among pirates, these CDs sometimes carry viruses which can cause havoc on a hard drive.
(17)MAGNETO-OPTICAL DISKS
- Magneto-optical disks integrate magnetic and laser technology to enable read and write magnetic storage.
- A 5 1/2" disk can store up to 1000Mb.
- These disks may in the future replace current magnetic disks, but at present the technology is still developing and the disks are too expensive, slow and unreliable to be in widespread use.
1.3.3. PERIPHERAL DEVICES
(1)OPTICAL CHARACTER RECOGNITION (OCR)
- A method of inputting text using a scanner along with special software to turn the scanned image into standard ASCII code.
- In other words, the text is no longer treated as a picture, since each individual letter is recognized on its own and can therefore be edited using word-processing software.
- Well suited application such as credit card billing systems where data such as customer a/c no. & amount due is encoded by the computer on a turnaround document.
- Turnaround document is a document which is produced by the computer & sent to the customer, who returns the bottom tear off slip with their payment.
(2)MAGNETIC INK CHARACTER READER
- Used mainly by banks for processing cheques. Special characters encoded along the bottom of a cheque are used to identify the bank no. and the customer’s a/c no.
- When the cheque is processed, the amount is also encoded by a bank operator, using a special ink containing ferric oxide which can be magnetized during processing.
Advantages of MICR:
- Speed is over 1000 cheques per minute can be processed;
- Smudged cheques can still be read;
- The characters are hard to forge.
(3)OPTICAL MARK READER & OPTICAL MARK RECOGNITION (OMR)
- Optical mark readers are able to sense marks made on a special form in certain places.
- It is a scanning device which can detect marks in preset positions on a special form.
- OMR is used in multiple choice answer sheet marking, capturing data from questionnaires and enrolment forms and the checking of football pools coupons.
Advantages of OMR:
- The use of OMR means that details do not have to be typed in;
- Reduces the cost of inputting large volumes of data because people do not need to type the details;
- The method is useful when results of tests are needed very quickly.
(4)MAGNETIC STRIPS AND SMART CARDS
- Magnetic stripe readers are available at the side of the computerized till (called as electronic point-of-sale [EPOS]) terminals.
- Smart cards with magnetic stripes are widely used as charge cards, telephone cards, railway tickets etc.
- A bank card used for withdrawing cash from an automated teller machine (ATM).
(5)ELECTRONIC POINT OF SALE
- EPOS terminals are the cash registers which also act as terminals to a main computer system.
- As well as providing customers with itemized bills, these systems also give useful management information.