Sunteți pe pagina 1din 13

Computer Systems

1. Data Representation
i. The Binary System

Reasons for using binary


 Easy to represent ‘ON’ and ‘OFF’ as 0 Volts and a higher voltage
(often above 1V – nominally 5V).
 Fewer rules needed with binary (0, 1) arithmetic than with decimal
(0..9) arithmetic.
 Any loss of voltage due to resistance etc does not change value.
 Easy to represent 0, 1 with other devices e.g. pits and lands on a CD-
ROM or directions of magnetic field on a hard disc.

Binary Arithmetic
 Bits – a binary digit.
 Byte – 8 bits
 Kilobyte – 1024 bytes (210 bytes)
 Megabyte – 1024 x 1024 bytes
 Gigabyte – 1024 x 1024 x 1024 bytes
 Terabyte – 1024 x 1024 x 1024 x 1024 bytes

Place Values
the values are doubled as you add more digits starting from the least
significant bit
128 64 32 16 8 4 2 1
Most significant bit
Least significant bit

Converting between binary and decimal


Add the place values e.g. 1011 1001 = 1 +8 + 16 + 32 + 128 = 185 in
decimal
Converting between decimal and binary
Divide repeatedly by 2.

ii. Storing Numbers


Positive integers are stored as described above
Negative integers are stored either using signed bit or 2’s complement.
Signed Bit The most significant bit is 0 if the number is +ve, 1 if –ve.
However there are two zeroes (+0 and –0) and the ordinary
rules of arithmetic don’t work.
2’s complement To find the 2’s complement of a number change all 0’s to
1’s and 1’s to 0’s. Then add 1.
Only one zero and all the ordinary rules of arithmetic work.
The most significant bit will be a 1 if the number is –ve.

Ron Loan Currie Community High School 1


Computer Systems
Floating Point Numbers are stored using mantissa and exponent. E.g. 1011.11 is
equal to .101111 X 2 100 (since 100 in binary is 4 in
decimal and the point has been moved 4 places)
This is stored as 101111 in the mantissa, 100 as the
exponent.
Because of the number of bits being used to store the
number is limited. The mantissa cannot be exactly accurate.
Increasing the number of bits used to store the mantissa can
increase precision (accuracy); increasing the number of bits
used to store the exponent increases the range of numbers
that can be stored.

iii. Storing Text


character – a symbol or letter on the keyboard. A list of all the characters a
computer can process is called the character set.
ASCII – American Standard Code for Information Interchange is an agreed 7-
bit code, which gives 128 characters. Text data is stored using an 8-bit code;
the 8th bit either being used for parity checking or to extend the number of
characters.
UNICODE – a 16 bit agreed code covering characters from more languages.
The lowest numbers are the same codes as ASCII.

iv. Storing Graphics


Graphics are made up of dots and on screen displayed using pixels (picture
elements). For black and white, each pixel can be set ON with the value 1 or
OFF with the value 0. For colour, more bits are needed for each pixel. E.g. a
colour bit depth of 8 bits allows 28 (256) different colours.

Bitmapped images store the screen display as a set of values of each pixel
colour for the whole document. This can use a large amount of memory.
File size = height x breadth x colour depth.
Compression is used to reduce the file size of bitmapped images. Photographs
are typical bit mapped images.

Vector graphics just store the attributes of each object e.g. for a circle, object
number, type of object, X and Y coordinates of centre, radius, line thickness,
line colour, fill colour, line pattern, fill pattern. Vector graphics use less
memory and are resolution independent, as the resolution of the screen does
not affect the stored details.

2. Computer Structure
i. The Two state machine
The processing and storage devices have only two states ‘ON’ and ‘OFF’,
represented using the binary system - ‘1’ and ‘0’.

Ron Loan Currie Community High School 2


Computer Systems
ii. The Structure of the Central Processing Unit (CPU)

In a microcomputer, this consists of a microprocessor, containing


a control unit, arithmetic and logic unit (ALU) and registers.
The control unit controls the fetching, decoding and executing of instructions.
The ALU carries out the calculations and the logic operations.
The registers are a group of storage locations within the microprocessor that
are used temporarily to hold:
 data being processed,
 instructions being executed and
 addresses to be accessed.

Memory Address Address Bus


More Register
Registers
Main
Memory Data Data Bus Memory
Register

Arithmetic
and Logic Control Bus
Control Unit
Unit (ALU) Read & Write

Buses are the sets of wires connecting the CPU to the main
memory and peripherals
Address Bus carries address information from the CPU to main memory or
peripherals. It is unidirectional. The width of the address bus determines the
n
maximum amount of memory that the computer can have. This is 2 where n
is the width of the address bus.
Data Bus carries data between the CPU and the memory or peripherals.
During a write operation data is carried from the CPU and in a read operation,
to the CPU. It is bi-directional. The width of the data bus determines how
much data can be transferred in a single operation.
Control Bus is made up of a number of separate wires, connecting the control
unit to memory and peripherals.
Read and Write wires
Clock wire carries clock pulses, which keep the CPU and other units in
step. The clock rate is measured in hertz (MHz or GHz).
Interrupt wires carry signals to the CPU, which can cause the CPU to
break in the carrying out of its program. The CPU may be able to
ignore the interrupt (maskable) or not (non-maskable interrupt - NMI).
Reset line is used to return the CPU to its initial state. E.g. used to
recover from ‘crashes’.

Ron Loan Currie Community High School 3


Computer Systems
iii. The Fetch Execute Cycle
Program instructions are got (fetched) one at a time from main memory,
decoded and then carried out (executed).
The CPU fetches the instructions and data in the program from memory. This is
a read operation. The program may require data to be put into memory – a
write operation.

Memory Read Operation Memory Write Operation


1. The required memory address is put in 1. The required memory address is put
the Memory Address Register. in the Memory Address Register.
2. The control unit activates the Read 2. The value to be written is put into the
Line. Memory Data Register
3. The contents of the memory at the 3. The control unit activates the Write
address are put on the data bus and Line.
into the Memory Data Register
4 The contents of the Memory Data
Register are transferred by the data
bus to the required memory address.

iv. Memory – Registers, Cache and Main Memory


Main memory consists of memory locations each with a unique address.
Each location can hold a word. A word is the number of bits of data that can
be processed in a single operation by the CPU. The word length is the same as
the width of the data bus. There are two types of main memory – RAM and
ROM.

Random Access Memory

RAM is volatile memory - data held in RAM is lost when the power is
switched off. RAM holds the computer’s programs and data while they are
being processed.
DRAM (Dynamic RAM) is normal RAM and needs to have its contents
refreshed otherwise the contents are lost.
SRAM (Static RAM) doesn’t need refreshed as long as power is applied. It is
used for holding date etc when the computer is switched off; power being
supplied by a rechargeable battery. SRAM is also fast and used for cache
memory.
Cache memory is memory close to (or in) the processor, which is used to
hold often-used instructions to speed up processing.
VRAM (Video RAM) is used to hold the data, which makes up the screen
display. It is related to the number of colours and screen resolution. It may be
part of the main memory or, more usually, on a separate graphics card.

Read Only Memory


ROM is permanent memory – data is retained when the power is switched off.
ROM is used to hold programs and data permanently, the data being fixed
during manufacture. In computers with a disc-based operating system, ROM

Ron Loan Currie Community High School 4


Computer Systems
is used to hold the bootstrap loader program, which loads the operating system
from disc.
In some games machines, ROM cartridges are used to hold software and ROM
is used in many digital automated systems.

Virtual Memory
With limited memory, there may be insufficient room for the required
program(s) and data. Virtual memory uses the hard disc as a temporary
storage area and swaps programs and data between memory and hard disc as
required. This is much slower than just using RAM.

Speed of Memory Access


Processor registers are accessed fastest, cache memory in the processor next,
then the cache outside the processor, the main memory and slowest is virtual
memory on disc.

v. Factors that Affect System Performance

System Performance can be measured using MIPS (millions of


instruction per second), FLOPS (floating point operations per second) or
Benchmarks (timing the computer carrying out tasks such as recalculating in a
spreadsheet or redrawing complex graphics)

Bus Width
Increasing the data bus width will increase the amount of data fetched in each
cycle and hence increase system performance.
Increasing the width of the address bus increases the maximum amount of
memory that the computer could have. More memory allows more programs
and data to be loaded at the same time, which can improve productivity. Also
with a larger memory, slower virtual memory does not need to be used as
often.

Clock Speed
The clock generates a series of pulses at a constant rate, which keeps
everything that the CPU does in time. The faster the clock speed, the faster
the operations will be carried out. Remember that the overall speed is
determined by the slowest component.

Memory
Adding more memory can speed up the computer (see i above). Also some
memory has faster access time than other types. Use of cache memory made
of fast static RAM can also improve performance.

Speed of data transfer to peripheral devices


Speeds of Interfaces increasing e.g. USB 1 → USB 2, Firewire 400 → Firewire 800.
Cables are being replaced by Wireless communication between CPU and
peripheral e.g. WIFI and Bluetooth

Ron Loan Currie Community High School 5


Computer Systems
3. Peripherals
i. Buffers and Spoolers
A buffer is an area of memory used for the temporary storage of data being
transferred between computer and peripheral. It compensates for any
difference in their speeds, e.g. a printer buffer. A printer spooler is a
program that uses fast backing storage such as hard disk for the temporary
storage of print data. This is printed as a background task while the user
continues his/her work – the foreground task.

ii. Hardware
Hardware should be selected in terms of appropriate characteristics including
resolution, capacity, speed, cost and compatibility

iii. Solid State Storage Devices


Examples include digital camera flash card storage or USB memory sticks.
Advantages are small size, speed of data transfer and the fact that there are no
moving parts which could wear out and break down.

iv. Interfaces
An interface is the hardware (and associated software) needed to allow
communication between the CPU and peripheral devices and to compensate for
any differences in their characteristics.

Functions of an Interface will include some of the following


Buffering – holding data temporarily while in transit between the CPU and
peripheral.
Data Conversion – changing data into a form the CPU can understand and
vice-versa - protocol conversion e.g. serial to parallel, voltage conversion
Handling Status Information – to show whether the device is ready to
receive or send data e.g. is the printer ready or out of paper.

v. Serial and Parallel Transmission of data between devices


Serial Data Transmission – sends the bits of the data one after each other
along the same data line. Relatively slow but more efficient over long
distances.
Parallel Data Transmission – sends the bits of data along separate lines at
the same time. This is fast but only suitable for short distances.

Ron Loan Currie Community High School 6


Computer Systems

3. Networking
i Nodes and Channels
Networked computers can exchange data and messages.
Each computer on the network is called a station, terminal or node. They can
be connected by different means e.g. by cable, which could be wire (most
common is UTP – Unshielded Twisted Pair) or optical fibre or radio
(wireless) links. The means of connection is the communications channel.

ii Mainframe
This is very large computer, which may be connected to hundreds of
terminals, many of which may be dumb terminals with no processing power.
Most of the processing will be done by the mainframe processor, which shares
its time between the terminals – a multi-access system.

iii Types of Network


LAN – Local Area Network commonly using UTP wire cable (perhaps with
optical fibre) or wireless.
WAN – Wide Area Network – may use public communication channels e.g.
telephone lines – wire, optical fibre, microwave.
Intranet – private network which may be local or covering a wider area, using
same protocols (TCP/IP) as the Internet. Secure intranets are much less
expensive to build and manage than private networks based on other protocols.
Client Server Network has dedicated servers, which provide facilities such as
file serving, print serving, web serving or mail serving for the client machines
– the other stations on the network.
Peer to Peer Network is similar to the client server network but each station
usually deals with its own storage.
iv File, Print and Web Servers
In the client/server model, a File Server is a computer responsible for the
central storage and management of data files so that other computers on the
same network can access the files.
A Web Server is a program often running on a dedicated computer, which
uses the web protocol, HTTP, to serve out files that form Web pages to Web
users (whose computers contain HTTP clients – web browser programs).
Every computer on the Internet that hosts a Web site must have a Web server
program.
A Print Server is a program, a network device, or computer that manages
print requests and makes printer queue status information available to users.
v Network topologies can be Bus, Star, Tree, Mesh, and Ring etc.
Consequences of channel and node failure need to be known.

Ron Loan Currie Community High School 7


Computer Systems
vi Network hardware
A network interface card (NIC) is an electronic card fitted to a computer. It
provides a dedicated full-time connection to a network and has a unique
hardware address.
A hub is common connection point for segments of a LAN. A hub contains
multiple ports. When a packet arrives at one port, it is copied to the other ports
so that all segments of the LAN can see all packets.
A switch actually reads the destination address (the hardware address of the
NIC) on each packet and then forwards the packet to the correct port on the
switch.
A router is connected between networks, commonly two LANs or WANs. A
router keeps tables of the states of the networks it is connected to and uses
these to decide which way to send each information packet.
vii Trends in Networks
Bandwidth In computer networks, means the same as data transfer rate - the
amount of data that can be carried from one point to another in a given time
usually expressed in bits (of data) per second (bps) or bytes per second (Bps).
Network bandwidth is steadily increasing.
Wireless networks are becoming more popular.
viii Misuse of Networks
Misuse covered by the following Acts in British Law.
 Misuse of Computers Act
 Makes hacking (attempting to access to computer data without
authorisation) a criminal offence.
 Writing or wilful distribution of viruses made illegal.
 Data Protection Act
 Protects personal data
 Principles include
o Data controllers who use personal data must register,
o Data must be processed lawfully.
o Data must be accurate
o Subjects have right to find out what data is held about them
only and have it corrected if wrong.
o If subject can show that they have suffered because data
was wrong they can take legal action for compensation.
 Exemptions include National Security
 Copyright, Designs and Patents Act
 Gives the creators rights to control ways their material can be
copied or distributed. .
 Computer programs and pages on websites (text, pictures etc.) are
protected.

Ron Loan Currie Community High School 8


Computer Systems
1. Systems Software
i Operating System
CLI
 Single User OS MMS
FMS
This is a program that controls the entire operation of the
computer and any devices that are attached to it. I/O

The OS is often thought of as a series of modules or


layers. One design is shown. Kernel
Command Language Interpreter is the layer that the user
interacts with to give instructions to the computer. It can be
command-driven, menu-driven or a GUI which may use a
WIMP system.
Memory Management System controls where programs and
data are placed in main memory. Many OS’s allow more than
one program to be in memory at the same time. MMS tries to make
sure that any program does not overwrite any other program
(including the OS itself!).
File Management System deals with the user of the computers backing
storage devices. It uses part of the disc as a file catalog, which holds details of
where data is stored on disc. Files are organised into a hierarchical filing
system storing files in separate directories and subdirectories.
Input Output System communicates directly with peripherals and handles the
transfer of data between peripherals and the CPU.
Kernel manages processes (when a program runs it starts a process and this
may start further processes) and handles interrupts.
The layers work together to carry out operations, data being passed between them.

Resource allocation
The OS allocates resources to other programs such as applications. For example:
 Scheduler to share processor - batch, foreground/background, timesharing
 Memory management – e.g. Virtual memory paging, swapping memory
contents to hard disc
 ensures drivers are given access to hardware devices
 Mechanisms for accounting; limit enforcement - e.g. no. of pages printed, file
space per user etc.

Operating system can be ROM based or disc based


If disc based, then there must be a small part of the OS in ROM – the bootstrap
loader – to load the main OS from disc to RAM.

 Network Operating Systems


A Network OS provides all the features of a single user OS with the addition of the
following.
Multi-user access and security. If more than one person can access the
system, then they need to ‘log on’ by giving an ID and password.

Ron Loan Currie Community High School 9


Computer Systems
File Server. Different users have different levels of access to the files e.g. file
read and write privileges for a certain file.
Print Server. The OS may provide a print server program to queue print jobs
for all users, using a central printer spooler.

ii. Utility Software


Utility programs are programs that aid the maintenance of the computer. They are not
normally essential for the running of the computer and are usually kept on disk until
needed. They include:
Virus Checkers
Scans discs/memory for viruses – see below.
Disk Editors
Allows the user to view the bytes of data held on disc and make changes to
them. This is useful if disc errors occur to allow for data to be repaired or
parts of files to be extracted.
Disk Defragmenter
When disks have been used many times (i.e. files saved and deleted from
them), as the disc fills up, free space appears between sectors with data, files
have to be split up into these gaps as there is no room to save them in one
continuous place. This makes loading programs slow as lots of fragments of
file have to be found and linked. The defragmenter program move files
around on disk until they are all stored in consecutive sectors and the free
space is maximised.

iii. Standard Graphics File Formats


Supported across a wide range of operating systems and application software.

Supported
Colour Supports
compression on Web Used for
depth transparency
Pages
Yes, lossy
Jpeg – Joint Compression
Photographic can be varied. Up to 24 Photographs,
No yes
Expert Group More bit pictures on Web
compression,
less resolution
Gif –
Graphics Web Graphics
Interchange Yes, lossless Up to 8 bit Yes Yes with blocks of
Format colour

TIFF – 24 bit
Tagged Saving high
Not in standard colour or 8
Image File No No resolution
TIFF bit
Format graphics.
greyscale

Ron Loan Currie Community High School 10


Computer Systems
iv. Malicious Programs
i. Definition of a Virus

A computer virus is a small program written to alter the way


a computer operates, without the permission or knowledge
of the user. A virus executes itself and will replicate.
For example, it may replace other executable files with a copy of the virus
infected file. Viruses can infect desktop computers and network servers alike.

ii. Types of Virus

File viruses
 infect program files. These viruses normally infect executable code,
such as .com and .exe files.
 They can infect other files when an infected program is run from
floppy, hard drive, or from the network

Boot sector viruses


 infect the system area of a disk-that is, the boot record on floppy disks
and hard disks.
 activate when the user attempts to start up from the infected disk.

Macro viruses
 The virus code written as a macro mainly infects data files (especially
Microsoft Office files.)
 Because of the ease with which these viruses can be created, there are
now thousands of them in circulation.

iii Virus Actions

Replication
 They spread as files are copied and sent between computer users.

Camouflage
 It is possible for a virus to avoid detection by changing its
characteristics from that which detection software is programmed to
look for.

Watching
 The virus damage routines may activate when certain conditions are
met e.g. opening a particular application or on a particular date.

Delivery
 This is how the virus gets from one computer to another.
o Infected disks brought in from the outside
o E-mail now provides the ideal delivery vehicle.

Ron Loan Currie Community High School 11


Computer Systems
iv. Trojan Horses
 The difference between Trojan horse programs and true viruses is that
Trojans do not replicate themselves.
 Trojans contain malicious code that when triggered cause loss, or even
theft, of data.
 For a Trojan horse to spread, you must, invite these programs onto
your computers--for example, by opening an email attachment or
downloading and running a file from the Internet.

v. Worms
 Worms spread from computer to computer, but unlike a virus they do
not infect other files.
 A worm takes advantage of data transport features on your system e.g.
using email, which allows it to travel unaided. It could send out
hundreds or thousands of copies of itself.
 The end result in most cases is that the worm consumes too much
system memory (or network bandwidth), causing Web servers,
network servers, and individual computers to stop responding.

vi. Antivirus techniques


Virus signature
 This is a unique pattern of bits within a virus code.
 The anti-virus software searches for the presence of the virus signature
and may remove it.
 Useful only for known viruses.
Checksum
 This is created by an algorithm from the bytes that make up a file
creating a unique numeric code that represents the file.
 Any subsequent change to the file by a virus will produce a change in
the checksum calculation.
Heuristic detection
 describes the technique of finding unknown viruses by looking for
characteristics in files that from experience been associated with
known viruses.
 Heuristics can detect a virus that has disguised its signature, by
recognising a particular characteristic of the virus attributes or
behaviour.
 Occasionally can stop legitimate programs running.
Memory Resident Monitoring
 Memory Resident programs operate in the background, while other
programs are running, unlike virus scanner programs which operate in
batch mode, scanning files as requested by the user
 They take up memory and processor time tending to cause a slowing
down of the system and can cause false alarms.

Ron Loan Currie Community High School 12


Computer Systems
3. Application Software
Types of Application Software (and Contemporary Software)
i. Text e.g. Text Editor (Wordpad), Word Processor (Word)
ii. Number e.g. Spreadsheet (Excel) or Accounting (Money)
iii. Data e.g. Database (Access, FileMaker)
iv. Communications e.g. WWW browsers (Internet Explorer,
Firefox), Email (Outlook)
v. Graphics e.g. painting (Photoshop), drawing (Illustrator,
Freehand), CAD (AutoCAD)
vi. Multimedia e.g. presentation (PowerPoint), multimedia authoring
(Macromedia Director)
vii. Integrated – 2 or more applications in a single program
(AppleWorks). It is easy to link data between them and they have
a common HCI.
viii. Page Layout or Desktop Publishing (PageMaker, InDesign,
Quark Express)

Ron Loan Currie Community High School 13

S-ar putea să vă placă și