Вы находитесь на странице: 1из 60

Introduction to Computer Hardware

What are the components of a computer ?

input devices keyboard mouse processor unit

control unit arithmetic logic unit main memory primary storage CPU

output devices printer screen/monitor auxiliary storage units

disk drives

floppy (small capacity) hard (larger capacity)

General name for input, output and auxiliary storage devices is peripheral devices

Data Representation

Program instructions and dat are made up of a combination of three types of characters alphabetic numeric : special etc.

: A Z and a z 0 9 : all others such as !@#$%^&

To understand how data and program instructions are stored in memory it is useful to think of one character being stored in one memory location or byte What is a byte ? A byte contains eight bits where each bit can represent one of two values. It can either be on or off. Mathematically speaking the off state can be represented by a 0 and the on state by a 1

ASCII American Standard Code for Information Interchange ASCII only uses the right-most seven bits of a byte to represent the standard characters [128 in total]. The eighth bit is used in the extended version which allows for foreign [non-English] characters and other special symbols Parity To store characters in memory accurately most computers have an extra bit for each byte of memory called a parity bit which is used for error checking. A parity bit can detect if one of the bits in a byte has been inadvertantly changed. This change can occur as a result of voltage fluctuations, static electricity or a memory chip failure. Computers are either even or odd parity machines In an odd parity machine the number of on bits [1s] including the parity bit must be an odd number. Similarly for an even parity machine the parity bit must be an even number.

Parity is checked by the computer each time a memory location is used. Number Systems

We are all familiar with the decimal (base 10) number system. The binary number system (base 2) is used to represent the electronic status of the bits in main memory. Another number system commonly used with computers is hexadecimal (base 16). The mathematical principles that apply to binary and hexadecimal number systems are the same as those that apply to the decimal system. The base of a number indicates how many symbols comprise the number system.

Decimal system base ten 10 symbols [0 9] positional number system Example : The number 143 power of 10 positional value symbol
( 1 10 2 ) + ( 4 10 1 ) + ( 3 10 0 ) = ( 1 100 ) + ( 4 10 ) + ( 3 1) = 100 + 40 + 3 = 143

2 100 1

1 10 4

0 1 3

Binary system base two 2 symbols [0 1] positional number system Example : The number 143 powers of 2 positional value symbol
= 128 + 8 + 4 + 2 +1 = 143

7 12 8 1

6 5 4 64 32 16 0 0 0

3 8 1

2 4 1

1 2 1

0 1 1

( 1 27 ) + ( 1 23 ) + ( 1 22 ) + ( 1 21 ) + ( 1 20 ) = ( 1 128 ) + ( 1 8) + ( 1 4) + ( 1 2) + ( 1 1)

Hexadecimal number system base sixteen 16 symbols [0 9, A F] positional number system Example : The number 143 power of 16 positional value symbol
( 8 16 1 ) + ( F 16 0 ) = ( 8 16 ) + ( F 1) = 128 +15 = 143

1 16 8

0 1 F

The primary reasons why the hexadecimal number system is used with computers are binary numbers can be represented in a more compact form the conversion between binary and hexadecimal is very efficient An eight digit binary number (byte) can be represented by a two digit hexadecimal number Divide every binary number into groups of four binary digits (bits) starting from the right and working to the left, the calculate the value of each group

Controlling and Addressing Data

The program instructions that users usually write are in a form similar to English but before these instructions can be executed they need to be converted into machine language. A machine language instruction is one that the electronic circuits in the computer can understand and convert into a command in the computers instruction set. This instruction set contains commands such as ADD and MOVE that the computers circuitry can perform directly.

Machine language instructions composed of three parts an operation code : typically a unique value that is stored in the first byte of the instruction values that indicate the number of characters to be processed by the instruction : this is to ensure that the CPU will manipulate the proper number of bytes addresses in the main memory of the data to be used in the execution of the instruction : this enables the CPU to locate where data to be processed is located in memory Example : A 44 7000 9000

The Machine Cycle When an instruction is executed four steps are followed fetch decode execute store
Arithmetic Control Unit Decode Logic Unit Execute

I -cycle

E-cycle

Fetch

Store

MAIN MEMORY

instruction cycle (I-cycle) fetching and decoding program instruction execution cycle (E-cycle) executing the instruction and storage of the processing results

Computer Hardware

Motherboard (main circuit board) CPU Memory Peripherals CPU (Central Processing Unit) control arithmetic/logic control fetching (memory) decoding (machine language) executing (processing computer commands) storing (memory) arithmetic +, , , logical comparison of one item to another <, >, , , =,

registers store current program instruction address of next instruction value of data to be processed Main Memory stores operating system (DOS, UNIX) application programs (Windows, X-Windows) data (Word Processor file, Spreadsheet file) size kilobyte (KB) 1024 bytes Megabyte (MB) 1024 1024 = 1048576 bytes Often the terms kilobyte and Megabyte are used as if they mean 1000 and 1000000 bytes respectively

Processor Speed

depends on system clock bus width word size System Clock controls the timing of all computer operations generates electronic pulses at a fixed rate, measured in Megahertz (MHz) [millions of pulses per second]

Buses paths along which bits are transmitted input devices to memory (external) memory to CPU (internal) CPU to memory (internal) memory to output devices (external)

Types Internal Addressing External External Buses XT AT, ISA EISA VESA Local Bus PCI Bus Mastering Allows any expansion card to directly read/write from/to memory This frees the CPU to do other things

XT bus 8 data bits 20 address bits 4.77 MHz AT/ISA (Industry Standard Architecture) 8/16 data bits 24 address bits 8-8.33 MHz asynchronous 5.55 MB/s burst bus master support low cost

EISA (Enhanced Industry Standard Architecture) 32 data bits 32 address bits 8-8.33 MHz asynchronous 32 MB/s burst (sustained) full bus master support high cost

VLB (VESA Local bus) 32 data bits 32 address bits 25-40 MHz asynchronous 130 MB/s burst (sustained 32 MB/s) bus master support moderate cost

PCI bus (Peripheral Control Interface) 32 data bits (64 bit option) 32 address bits (64 bit option) up to 33 MHz synchronous 132 MB/s sustained (264 MB/s with 64 bit option) full bus master support moderate cost Example : Have 64 bits of information Bus type XT AT/ISA EISA VLB PCI Size 8 16 32 32 64 Times 8 4 2 2 1

Word Size the number of bits that a CPU can process at a time Microprocesso Word r Size 8088 80286 80386SX 80386DX 80486SX 80486DX 80486DX2 80486DX4 PENTIUM 16 16 32 32 32 32 32 32 32 I/O I/O bus bus width spee d 8 4.77 16 8.33 16 8.33 32 40 32 40 32 40 32 40 32 33, 40 64 33 clock speed 4.77/8 8-16 16-33 16-40 25-33 25-50 50-80 75-100 60-100

Coprocessors designed to perform a specific task Example : Maths coprocessor Video coprocessor

Parallel Processing Most computers contain one CPU that processes instructions one at a time (serial processing) Parallel processing involves the use of multiple CPUs each with their own memory so each CPU can work on its own section of an assigned challenge (supercomputers) RISC technology Reduced Instruction Set Computing Only instructions that are frequently used are available

Types of Memory semiconductor memory is measured in nanoseconds main memory is usually made of 60 ns chips 80 cache memory is usually made of 15-25 ns chips 64-256 KB (486s) 512-1024 KB (Pentiums) SIMMS Single In-line Memory Modules 30-pin older 256 KB, 1 MB, 4 MB modules each module either 8 or 9 bits (parity) 72-pin newer 1 MB, 4 MB, 16 MB single sided 2 MB, 8 MB, 32 MB double sided each module either 32 or 36 bits (parity)

RAM Random access memory ROM Read only memory PROM Programmable read only memory EPROM Erasable programmable read only memory EEPROM Electronically erasable programmable read only memory

Input Devices

Keyboard Terminals dumb intelligent special purpose Other categories mouse trackball touch screens graphic input pen input voice input scanners page laser OCR (optical character recognition) User Interfaces prompts (DOS, UNIX) menus GUI (graphic user interface) [Windows, XWindows]

Output Devices

hard copy printed soft copy displayed on screen Output Types text graphics multimedia text graphics video audio

Printers

Features speed paper types print quality fonts interface

speed cps lpm ppm characters per second lines per minute pages per minute 50-400 cps 300-600 600-3000 some >

low character printers medium line printers lpm high line printers lpm very high > 3000 lpm 20000 lpm

paper types continuous feed single sheet paper sizes letter size A4 print quality LQ fully formed and solid like a typewriter NLQ not quite fully formed Draft fonts typefaces Times New Roman Algerian Arial Courier New Impact styles Bold Bold Italics Underline Italics interfaces
8 12 " 1 1 "

210 297m m

serial one bit of data sent at a time cable up to 1000 ft parallel eight bits (byte) of data sent at a time cable less than 50 ft Categories of Printers Impact printing mechanism strikes the paper Non-impact printing mechanism sprays ink onto paper or fuses black powder onto paper impact dot-matrix 9-pin one vertical row of 9 pins, prints twice to form characters 24-pin two vertical rows of 12 pins, one pass print only bi-directional can print left to right and right to left tractor feed or friction feed

non-impact ink-jet uses a nozzle to shoot electronically charged droplets of ink onto a page droplets pass between electrically charged deflection plates which guide the droplets to the correct position on the paper can be colour output thermal uses heat on special chemically treated paper to form characters and graphics page similar to a photocopier laser printers

Screens

monitor CRT (cathode ray tube) VDT (video display terminal) types monochrome colour LCD (liquid crystal display) plasma size
14",15",17",21"

usually 80 columns 25 lines

resolution number of individual dots that are displayed on the screen each of these dots is called a pixel Video Mode CGA EGA VGA super VGA 1024 Resolution 640 200 640 350 640 480 800 600 1024 768 Maximum Colours 4 16 256 16 256

With the advent of new video technology higher colour modes have become available colours Modern monitors can display an unlimited number of colours Only limit that is set is determined by the capability of the video display card HiColour Modes 15-bit colour 16-bit colour TrueColour Mode 24-bit colour 32768 colours at a time 65536 colours at a time 16777215 colours at a time

Video Cards There are three types of video cards Frame Buffer relies on CPU for all processing Graphics Accelerator has specific graphics capabilities e.g. drawing lines, filling bit blocks Graphics Coprocessor As well as having specific graphics capabilities these cards are flexible in that they can be programmed video memory DRAM same as motherboard memory single port read and write sequentially VRAM special video DRAM dual port allows for simultaneous read and write from/to memory

How images are displayed on the screen

Most screens employ CRT technology

1. The image to be displayed is sent from the CPU/video card to the CRT 2. An electron gun generates an electron beam 3. This beam is focused on to the phosphor coated screens 4. This impinging beam causes the phosphor to emit light

These phosphors need to be continually reexcited otherwise they begin to lose their light and the screen begins to flicker 72 Hz standard refresh rate to stop flicker How colour is produced

To show colour on a screen each pixel must have three phosphor dots These dots are red, green and blue The electron beam must turn on the desired colour phosphors within the pixel to generate the image Different colours are produced by varying the intensity of the electron beam that strikes the phosphor composite one electron signal is used to turn on the color phosphors within a pixel RGB three signals are used, one for each colour, to turn on the required phosphor produces a much clearer display with better color and character resolution

Plotters pen plotters create images by moving one or more pens over the surface of the paper or by moving the paper under the tips of the pen(s) Audio output voice synthesizer music synthesizer sampled wave tables

Auxiliary Storage

also known as secondary storage stores data and programs when they are not being processed until they are needed then they are placed in memory secondary storage retains data and programs even when power is turned off

Magnetic disk storage reliability large storage direct access types floppy diskettes hard disks removable disk cartridges floppy diskettes convenient reliable inexpensive common sizes

5 3

1 4 1 2

" "

formatting before a disk can be used it needs to be formatted formatting process defines tracks cylinders sectors

track narrow recording band forming a full circle around the diskette cylinder defined as all tracks of the same number Example : track 0 on side 1 and track 0 on side 2 would be called cylinder 0 sectors section of the disk, a minimum of one full sector is read every time data is read from a disk

storage capacity depends on numbers of sides the recording density of the bits on a track the number of tracks number of sides single-sided double-sided recording density bits per inch tracks per inch low density disks 360k 720k

51" 4 1 32" 51" 4 1 32"

48 tracks per inch

high density disks 1.2M 1.44M

135 tracks per inch

How is data stored ? When inserted into a disk drive the centre of the disk fits over a mechanism that positions the diskette in the drive. The diskette rotates at 300 revolutions per minute for a

5 1 " disk 4

Data is stored on tracks of the disk using binary code. This is accomplished through a recording mechanism known as a read/write head which rests on the surface on the disk and generates electrical impulses These impulses change the polarity alignment of magnetic spots along a track on the disk The plus and minus polarities represent the 1 and 0 bits being recorded To access different tracks on the diskette the drive moves the read/write head from one track to another When reading the head senses the recording magnetic spots and transfers data to memory When writing the head takes data from memory and writes it as magnetic spots on the tracks

What is access time ? time required to access and retrieve data from a disk depends on seek time rotational delay settling time seek time time taken to position the read/write head over the proper track rotational delay time taken for the sector containing the data to rotate under the read/write head settling time time for read/write head to be placed in contact with the disk data transfer rate time taken to transfer data from disk to memory access time varies from 175 ms to 300 ms

Hard disks consist of one or more rigid platters coated with an oxide material that allows data to be magnetically recorded on the surface of the platters hard disks are permanently mounted inside the computer and are not removable the metal platters, read/write heads and mechanism for moving the heads across the surface of the disk are enclosed in an airtight sealed case

capacity ranges from Mbs to Gbs data storage similarly to floppy diskettes hard disks tend to spin at between 3600-4500 revolutions per minute

access times as fast as 6 ms

Data organization on a hard disk sector cylinder sector

each track is divided into individual storage areas called sectors cylinders

all tracks of the same number on each recording surface (platter) are considered part of the same cylinder

Disk cartridges offer the storage and fast access features of hard disks and the portability of diskettes Protecting data stored on a diskette

Backup storage use lots of floppies or magnetic tape backup units

Magnetic tape storage thin ribbon of plastic coated on one side with a material that can be magnetized to record the bit patterns that represent data reel-to-reel cartridge Mainframes PCs

How is data stored ? sequential storage binary code bits are stored in the form of magnetic spots

Tape density number of bits than can be stored on a tape newer cartridges can record at 60000 bpi data is recorded in blocks each block consists of two or more records (physical records) individual records (logical records) streaming mode records data like hard disk drives (byte by byte) DAT (digital audio tape) much higher densities, around 61000 bpi

Optical disks high powered laser burns microscopic holes on the surface of a hard plastic disk lower powered laser reads the disk information by reflecting light off the disk surface

CD-ROM compact disk read only memory same technology as for audio CDs WORM write once read many one time recording

Magneto-Optical technology magnetic field changes the polarity of a spot on the disk that has been heated by a laser flopticals Jukebox Datasilo

SCSI small circuit system interface allows up to seven devices to be connected hard drives tape drives CD-ROMs scanners work in other computer systems Apple Sun DEC higher throughput with multiple devices IDE/EIDE (enhanced) integrated drive electronics IDE two devices, both hard drives (528Mb) EIDE four devices, hard drives (8.4Gb), CD-ROMs, tape drives IDE better in DOS SCSI better in OS/2, UNIX, NT single tasking vs multitasking

Computer Software

What is software ? Most people think of applications software Examples : Word processing (MS Word for Windows) Spreadsheet (MS Excel for Windows) Database (dBase) Imaging (Paintshop Pro) Radiation Therapy (RADPLAN)

To run the above software another type of software is required, one that interfaces between the user, the applications and the hardware

This type of software is known as an operating system

What is an operating system ? consists of one or more programs that manage the operations of a computer How is it loaded ? process of loading an operating system is known as booting the system

When the computer is turned on a series of routines stored in ROM known as the boot routine issues the commands to load the operating system from disk (either floppy or hard) into memory These instructions then transfer the control of the computer to the operating system

The system prompt then appears Types of operating systems

Functions of operating systems

CPU management foreground vs background memory management segmentation (portions of a program are subdivided) paging (a fixed number of bytes is transferred everytime data or a program instruction is required) virtual (swap space on disk)

Popular operating systems

MSDOS Macintosh OS/2 UNIX MSDOS single user single tasking GUI called MS Windows 640 kB memory limit limited input, output management no system security

Macintosh single user multitasking in background GUI based system (model for most new GUIs) OS/2 GUI environment Multiprogram capability

UNIX early 1970s multiuser multitasking GUI called X-Windows foreground and background processing no 640 kB limit on memory input and output managed through device drivers monitor system performance system security

Computer Programming

What is a computer program ? detailed set of instructions that directs a computer to perform tasks necessary to process data into information Program development review the program specifications (plan) design (break up the program into modules) coding testing finalising documentation

Programming Languages

What is a programming language ? a set of words and symbols which allow the programmer to communicate with the computer Categories machine language assembly language high level language machine language fundamental to computers processor written for a specific processor also called a low level language assembly language similar to machine language uses mnemonics (MOV, ADD, etc.) assembler converts mnemonics into machine language high level languages resemble English language contain nouns, verbs, mathematical, relational and logical operators compiler converts program into machine language

Languages commonly used BASIC (Beginners All-purpose Symbolic Instruction Code) COBOL (Common Business Oriented Language) C FORTRAN (FORmula TRANslator) Ada Pascal

OOP (Object-Oriented Programming)

a new approach allows programmers to create objects objects are a combination of data and program instruction

Вам также может понравиться