Computer Systems Foundation General
-
Upload
mrcarty -
Category
Technology
-
view
2.980 -
download
4
description
Transcript of Computer Systems Foundation General
ComputerSystems
What is this unit about?
• Languages and translators• Operating Systems• Low-level machine• Hardware
– Backing storage– Input devices– Output devices
010101010
101111111
11
I/O
For counter = 1 to 30
Print “Enter”
010101011000011101010110101011010101010111010100101001010101010101010110111111110100101101010110101010101110101001010010101010110111111110100101101010110101010101110101001010010101011011011111111010010110101011010101010111010100101001010101101101111111101001011010101101010101011101010010100101010110110111111110100101101010110101010101110101001010010101011011011111111010010110101011010101010111010100101001010101101101111111101001011010101101010101011101010010100101010110110111111110100101101010110101010101110101001010010101011011011111111010010110101011010101010111010100101001010101101010101011011101011010101101010101011101010010100101010101010101010101101110101101010110101010101110101001010010101010101010101101110101101010110101010101110101101111111101001011010101101010101011101010010100101010110100101001010101010101010110111010110101011010101010111010100101001010110111111110100101101010110101010101110101001010010101010101010101010101011011
Machine Code
What does this say?
Je ne parle pas Français ainsi je ne peux pas comprendre ceci ! !
I don't speak French so I can't understand this!!
=
Languages and Translators
• Computers only understand 1s and 0s• This is called machine code.• It is very hard for people to read and
understand
Instead of trying to write machine code, we use high level languages
to program.
High-level languages
What does a high-level language look like?
PRINT “PLEASE ENTER YOUR AGE”
INPUT AGE
PRINT “YOU ARE “: AGE
Short Instructions like sentences
Made up of English words
High-level languages• High-level languages are portable.• They can be translated into many
different versions of machine code• Machine code is not portable as it only
works for a certain processorPRINT “PLEASE ENTER YOUR AGE”
INPUT AGE
PRINT “YOU ARE “: AGE
Translator01010110
0101011001010110
Translators• Translators take the high-level
language and translate it into machine code.
• They work like human translators
J'aime l’informatique
PRINT “HELLO”
I like Computing
0011 1110 0011
translate
Summary
Computers only understand 1s and 0s, which we call machine code.
Humans write programs in high level languages because they are like English, and can be translated into machine code.
High level languages can be portable which means they can be translated into different kinds of machine code.
Operating SystemsAn operating system controls all the
tasks the computer does for you
Reads in data from keyboard and mouse
Sends text and graphics to the screen
Sends data to your printer
• Loads data into the memory from the Hard Disk
• Saves your files to disk
Examples of Operating Systems
• Microsoft Windows• Apple Mac OS X• Linux
But NOT things like:• Microsoft Word • Games• Internet Explorer
– These are programs that run on the Operating System
Types of File
There are two different types of file:
Program files, which are files full of instructions that the system runs. Microsoft Word is a program file.
Data files, which are used by programs. A Microsoft Word document (like a letter you wrote and saved) is a data file.
HH
C C II
uman uman
omputeromputer
nterfacenterface
Human Computer Interface
• The Operating System provides the HCI for the user
• User uses mouse to click icons• Operating System translates into
instructions– What was clicked?– What should be done now (load file,
save file, load program)?
Types of Operating System
Interactive System– Computer reacts to user requests
immediately and processes the data– Example: Internet ticket booking (Travel,
Concert)
What would happen if the system wasn’t interactive?
1. User clicks on link to buy ticket
2. System checks immediately if there is a ticket available
3. Ticket is booked for the user
Types of Operating System
Real Time System– Real time systems react even faster than
interactive systems– Designed to always process the right
amount of information in time– This means the Real Time system is
instant every time
Used in spaceship control systems, nuclear reactors…..
Where else would Real Time Systems be used instead of
Interactive Systems?
Summary
Operating systems control the tasks the computer does for the user. This includes loading data into memory, reading data from they keyboard and mouse, saving files and sending text and graphics to the screen or printer.
There are two types of file - program files (such as Microsoft Word) and data files, that are used by program files (such as a letter your wrote in Microsoft Word)
We interact with the OS through the Human Computer Interface (HCI). The OS translates the keyboard and mouse presses into instructions and performs actions such as loading and saving files.
Interactive operating systems are used when users need immediate feedback. Real-time operating systems are used when systems always need instant results (such as a control system on a plane).
Check your understanding
What kind of system would you use for the following (choose from background, interactive and real-time):
• Flight booking web site• Controlling a robot?• On a home computer?• Running a nuclear reactor
InteractiveReal-
TimeInteractiveReal-time
More Checking!• What jobs does the Operating System do?• Give an example of an Operating System?• What are the 2 types of file?
• What does the HCI do?
• When would Interactive Processing be used?
• When would Real-Time Processing be used?
Filing Systems
• It is very wise to organise your files!
• Lots of files in the one place = hard to organise
• Group them in directories
Filing System
The Operating System sorts our data using directories (often called folders) and files.
Low Level Machine
• We now know about Operating Systems, High Level Languages, and how we access data.
• What’s next?
Now we are going right inside the computer to look at how the CPU and
memory works
The two most important parts of the inside of the computer are the CPU and memory.
The CPU (Central Processing Unit) is the “brain” of the computer where the computer works things out.
The memory is where the computer “remembers” things for the CPU.
The Computer’s Memory
Computers use main memory and backing storage to store data.
Main memory is the fast memory inside a computer that stores data the CPU is currently using
Backing store is the bigger but slower memory that stores files and programs for the computer
Backing store comes in two types – magnetic and optical.
Magnetic – Hard Disk and Floppy diskOptical – CDROM and DVD
Main memory
• Inside the computer there is main memory • Main memory is made up of memory chips• There are two kinds of main memory:
RAM – Random Access Memory
ROM – Read Only Memory
Random Access Memory
• RAM is where the computer stores data that is it currently using. This includes:– Data from the keyboard as you type– Data from open files and programs you
are using
• When you turn off your computer, all the data in RAM will be lost.
• This is why you must always save files to backing store before turning off a computer!
Read Only Memory• ROM is READ ONLY – you can’t change it• It is written in the factory when the computer is
made• The computer can read the data in the ROM straight
away when the computer is switched on– This is why parts of the OS are sometimes stored
on ROM• It isn’t wiped when the computer is switched off
• A good way to remember the difference between RAM and ROM is to think that RAM is like a notebook and ROM is like a textbook.
• With RAM you write in what you need to remember
• With ROM it is already there and you don’t change it!
How to measure memory
• We said before that everything in a computer is either a 1 or a 0
• This is because computers use binary numbers• The size of memory is usually given in megabytes
or gigabytes, but what does that mean?
Bit Binary digit: a 1 or 0Byte 8 bits, e.g. 01101100Kilobyte 1024 bytesMegabytes 1024 KilobytesGigabyte 1024 MegabytesTerabyte 1024 Gigabytes
Memory sizeBit Binary digit: a 1 or 0Byte 8 bits, e.g. 01101100Kilobyte 1024 bytesMegabytes 1024 KilobytesGigabyte 1024 MegabytesTerabyte 1024 Gigabytes
So an iPod with 60GB of storage space has:
60 x 1024 x 1024 x 1024 x 8
= 515,396,075,520 bits!
(over 515 billion bits…)
The Processor
The processor is the brains of the computerA processor takes data in, processes it and then
outputs the data to screen or printer.
Input Process Output
keyboard
mouse
calculationPrint out
Display on screen
Remember:
InputProcessOutput
Some real world examples of IPO…..Some real world examples of IPO…..
Check your understanding…
• Give a real life example of IPO• Give a computer example of IPO• Explain why you can not store data
in ROM• What happens to RAM when the
computer is switched off? Why should this be ok?
B
I
N
A
R
Y
Binary
• We count in “decimal”• We have 10 fingers, so it makes
sense that we group by 10s I.e. 1, 10, 100, 1000, 10 000 etc
• Computers count in binary• They use different columns and
group by twos I.e. 1, 2, 4, 8, 16, 32, 64, 128
Numbers
We count to 10:1,2,3,4,5,6,7,8,9,10
A computer would do this in binary:1,10,11,100,101,110,111,1000,1001,1010!
Binary numbers have a power of 2, and decimal numbers (that we count with) have a power of 10. Let’s go back in time……
1000 100 10 1
128 64 32 16 8 4 2 1
6 5
1 1
1 1 5
1 1 1 1 1
0
0
0 0 0 0 0
0 0
For example:
Binary Revision Questions
• What is binary for:48, 20, 128, 7 ?
• What is the decimal for:00001000, 00001000, 00011000,
00000101 ?
Binary Revision Answers48 = 0011000020 = 00010100128 = 100000007 = 00000111
00001000 = 8
00001000 = 9
00011000 = 24
00000101 = 5
Binary recap
• 65• 100• 255• 129
128 64 32 16 8 4 2 1
01000001011001001111111110000001
Storing Text and Graphics
• If computers can only work with binary numbers, how do they store words and pictures etc?
Storing Text
• Since computers only use binary, they have a binary code for each character
• This code is called ASCII– American Standard Code for Information
Interchange
Binary Decimal Character1000001 65 A1000010 66 B1000011 67 C1000100 68 D1000101 69 E1000110 70 F
Let’s try some ASCII conversion….
ASCII Table
http://www.ascii.cl/htmlcodes.htm
ASCII TABLE65 A66 B67 C68 D69 E70 F71 G72 H73 I74 J75 K76 L77 M
78 N79 O80 P81 Q82 R83 S84 T85 U86 V87 W88 X89 Y90 Z
The size of a text file
Hello
The eagle has landed!
How many bytes would these files take up?
• Text is stored in the computer using ASCII codes
• Each character’s ASCII code is 8-bits, i.e. 1 byte in size
• So, we can work out the storage requirements of text files
5
21
Storing graphics
A graphic can be a drawing, graph, painting or photograph.
Graphics are made up of a grid of pixels.
A pixel is a single point on the screen.
Storing Graphics
• In black and white graphics, the grid of pixels can be represented by binary numbers
• 1 stands for a black square, 0 stands for a clear square.
• Each pixel takes up 1-bit to store.
1 0 0 1 1 0 0 1
0 1 0 1 1 0 1 0
0 0 1 1 1 1 0 0
0 0 0 1 1 0 0 0
1 0 0 1 1 0 0 0
1 1 1 1 1 0 0 0
0 0 0 0 1 1 1 0
0 0 0 0 0 0 1 0
1 0 0 1 1 0 0 1
0 1 0 1 1 0 1 0
0 0 1 1 1 1 0 0
0 0 0 1 1 0 0 0
1 0 0 1 1 0 0 0
1 1 1 1 1 0 0 0
0 0 0 0 1 1 1 0
0 0 0 0 0 0 1 0
How many bits do you think it will take to store this graphic?
The grid is 8 x 8 pixels, so it will take 64 bits to store.
64 bits is 8 bytes.
Colour Graphics
• To store colour graphics, we need to assign each colour a different number e.g. red = 1, blue = 2 etc.
• These colour codes are stored in binary
• The larger the binary number, the more colours we can have. How many do we need?
• 32-bit graphics are normal (4.3 billion different colours)
Systems task 9
• 10 minutes on Systems Task 9, page 25
• If finished, go onto Knowledge Check 5
Summary
• Computers store text and graphics in binary.• They use a code called ASCII (American Standard Code
for Information Interchange) • Each character has a code in ASCII• Black and white graphics are stored by using 1 bit for
each pixel (1 for black, 0 for white). • We can work out the size of these graphics by
multiplying the width of the graphic by the height.• Colour graphics use more bits for each pixel depending
on how many colours are needed.
Hardware
• We’ve covered how the CPU works, and what the Operating System software does
• Now let us look at hardware for the computer
Microprocessor
The chip is made of layers of silicon crystal wavers on which very small electronic
components are installed.
Backing StorageBacking storage memory is used to store files when the
computer is switched off, and are usually removable.
There are two types of backing storage, Optical and Magnetic. We’ll look at magnetic first.
Tape DriveTape Drive
Tape drives take large plastic tapes which store data in binary using magnetic ‘spots’ to encode the data
They have a large capacity, and fast data transfer rates
Tapes wear over time so need to be stored in suitable environment and are suited to medium and short term storage
DAT tapes can hold up to 200 Gigabytes so are used for backup
Tape drives take large plastic tapes which store data in binary using magnetic ‘spots’ to encode the data
They have a large capacity, and fast data transfer rates
Tapes wear over time so need to be stored in suitable environment and are suited to medium and short term storage
DAT tapes can hold up to 200 Gigabytes so are used for backup
Floppy DisksFloppy Disks
• Floppy Disks are made from circular plastic plates coated in iron oxide (which is a magnetic chemical).
• Data is stored on the surface as patterns of magnetic spots.
• Floppies are small and compact
• They store up to 1.44Mb of data (about 1/3 of an MP3 file)
•They can be damaged easily by dust, dampness, electro/magnetic pulses
• Floppy Disks are made from circular plastic plates coated in iron oxide (which is a magnetic chemical).
• Data is stored on the surface as patterns of magnetic spots.
• Floppies are small and compact
• They store up to 1.44Mb of data (about 1/3 of an MP3 file)
•They can be damaged easily by dust, dampness, electro/magnetic pulses
Hard DriveHard Drive
Hard DriveHard Drive
Hard drives store data by writing magnetic patterns onto metal disks.
The surfaces are divided up into sectors and tracks which allows each part to be accessed directly.
Hard drives store data by writing magnetic patterns onto metal disks.
The surfaces are divided up into sectors and tracks which allows each part to be accessed directly.
•The disk is in a sealed box to prevent dust damage.•The read/write head is just above the surface of the disk•The disk spins between 7,000 and 10,000 rpm•They hold gigabytes of data (most recently up to 750GB in size)
•The disk is in a sealed box to prevent dust damage.•The read/write head is just above the surface of the disk•The disk spins between 7,000 and 10,000 rpm•They hold gigabytes of data (most recently up to 750GB in size)
Optical Backing Storage
Optical backing storage uses laser optics to read and write data.
Data is stored in binary by using lasers to burn microscopic marks on the disk surface.
Data is read by reflecting light off the surface to read the microscopic marks.
CD-ROMCD-ROM
• High Capacity - 650 Megabytes• Stores data in microscopic grooves• Read Only
• High Capacity - 650 Megabytes• Stores data in microscopic grooves• Read Only
DVD-ROMDVD-ROM
• Works in the same way as CD-ROM• Stores more data because it uses a narrower laser
beam to read and write to disk• Ordinary DVDs hold 4.7 Gigabytes• Double-sided, multilayered DVDs store up to 17GB• Enough space for large files such as movies
• Works in the same way as CD-ROM• Stores more data because it uses a narrower laser
beam to read and write to disk• Ordinary DVDs hold 4.7 Gigabytes• Double-sided, multilayered DVDs store up to 17GB• Enough space for large files such as movies
CD-RCD-R
• Stands for Compact Disk Recordable• Uses a layer of dye which laser changes to
store data• CD-Rs are WORM - Write Once Read Many
– Once files are written on, they can’t be deleted or changed
– CD-Rs are read-only after they are written
• Stands for Compact Disk Recordable• Uses a layer of dye which laser changes to
store data• CD-Rs are WORM - Write Once Read Many
– Once files are written on, they can’t be deleted or changed
– CD-Rs are read-only after they are written
CD-RWCD-RW
• Stands for Compact Disk Re-writable• Unlike CD-R, these can be rewritten• This is because they use the laser to change the
reflective properties of microscopic marks
• CD-ROMS, CD-Rs and CD-RWs are used for: – backing up large files– Storing large multimedia presentations– Storing large programs, like games
• CD-ROMS, CD-Rs and CD-RWs are slower than hard disks
• But they are removable!
• Stands for Compact Disk Re-writable• Unlike CD-R, these can be rewritten• This is because they use the laser to change the
reflective properties of microscopic marks
• CD-ROMS, CD-Rs and CD-RWs are used for: – backing up large files– Storing large multimedia presentations– Storing large programs, like games
• CD-ROMS, CD-Rs and CD-RWs are slower than hard disks
• But they are removable!
DVD-R and DVD-RW
DVD-R and DVD-RW
• Works in the same way as CD-R and CD-RW
• Stores more data because of narrower laser• Can store up to 4.7GB
• Works in the same way as CD-R and CD-RW
• Stores more data because of narrower laser• Can store up to 4.7GB
USB Flash drive
USB Flash drive
• USB Flash drives are rewritable memory chips• Store data just like a disk• Used as backup and plugs into USB ports on a
computer• Very small and portable• Sizes from 64MB to 2 Gigabytes
• USB Flash drives are rewritable memory chips• Store data just like a disk• Used as backup and plugs into USB ports on a
computer• Very small and portable• Sizes from 64MB to 2 Gigabytes
Input Devices
Input devices are pieces of hardware that let you control a computer by sending data to the computer from your device.
MouseMouse
A mouse lets you control the pointer on screen, and click to select icons.
Mice usually have 2 buttons and sometimes a scroll wheel.
A mouse lets you control the pointer on screen, and click to select icons.
Mice usually have 2 buttons and sometimes a scroll wheel.
TrackballTrackball
A trackball is similar to a mouse except the ball is on top. The trackball does not move around the desk like a mouse.
They are useful when a user does not have desk space to move a mouse, and for people who find it hard to use their arms to move objects around.
A trackball is similar to a mouse except the ball is on top. The trackball does not move around the desk like a mouse.
They are useful when a user does not have desk space to move a mouse, and for people who find it hard to use their arms to move objects around.
TrackpadTrackpad
A trackpad is a small pad that senses the movement of your finger.
It lets you control the mouse by moving your finger across the pad.
You can click by tapping the trackpad.
A trackpad is a small pad that senses the movement of your finger.
It lets you control the mouse by moving your finger across the pad.
You can click by tapping the trackpad.
Graphics Tablet
A flat plastic panel with electronic sensors below the surface detect the movements of a pointing device.
Very accurate – used by graphic artists / designers / Computer Aided Design (CAD)
Touch Sensitive Screen
Simple to operate
Useful for public information systems
Tiring to use after a while
Not precise
Keyboard
Input text and numbers
Function keys
QUERTY layout
Very common, nearly every computer has one
Scanner
Input drawing, photographs from paper.
Light beam passes over page and a sensor detects the reflection
Optical Character Recognition (OCR) software can recognise writing
Digital Cameras
Digital Cameras
Captures light coming through the lens and stores a digital image
Allows instant review of picture taken
Delete photos you don’t like
Takes a memory card – can be various capacities.
Choosing a camera
Look at the accuracy (resolution) – measured in Megapixels. 5 Mpx is enough
Does it have a zoom lens? Digital zoom is worthless because it produces poor pictures
What capacity is the memory card?
Digital Video cameras
Same principle as still digital cameras
Need a large storage capacity – video takes up a lot of space (15 frames per second)
Some have a small LCD screen to view your video
Features: zoom, focus, lighting, infrared recording, onboard editing
Webcams
Same principle as digital video camera
Connected directly to computer via USB
Can put a webcam in a website
Useful for video calls via MSN Messenger
Laser Printer
Uses a laser beam to copy image of a page onto light-sensitive drum
Ink (toner) attracted to the drum then transferred to paper
Laser printers are fast
The output is high quality
They are expensive to buy but relatively cheap to maintain.
Inkjet Printer
Sprays ink onto the paper
Printout quality is high
Cheap to buy, can be expensive to maintain (expensive ink)
Slower than Laser Printer
Plotter
Uses inkjet technology to produce large, accurate and complex drawings
Used by architects / designers
Quicker than drawing by hand
Monitor
Screen used to display computer output
Different monitors have different resolutions
The higher the resolution, the more detailed the picture will be
High resolution needed for CAD and art work
LCD / TFT Displays
LCD = Liquid Crystal Display
These screens have the following advantages:
Flat, light, needing little power, can be run from a laptop battery
The one disadvantage is that sometimes they are not bright enough and can cause eye strain
LCD / TFT Displays
TFT = Thin Film Transistor
Same advantages as LCD.
Uses a tiny transistor to form each pixel
Can update the image very quickly, allowing it to handle complex graphics and animation which LCD displays cannot
Computer Speakers
Produce sound from the computer
Allow you to do multimedia presentations, video-conferencing, games, music etc
Computer speaker systems vary in quality and number of speakers depending on output wattage (RMS) or surround sound capability etc
Desktop VS Laptop
Desktop VS Laptop
• Desktop computers stay in the same place. Laptop computers are portable
• Because of this, the components used need to be light and consume less power (run off battery)
• This means that a laptop with the same specification (CPU speed, RAM) will cost more than a same spec desktop.
Laptop
• Laptop computers are small and compact
• They weigh a lot less than a desktop – usually 1.5 – 3 kg
• Runs off battery, charges from mains• Has a flat screen (LCD or TFT)• Has a normal keyboard and trackpad
Palmtop Computer
• Is about the size of your hand• Small keyboard or a stylus
with handwriting recognition• Stores data on a memory card• Useful for ultra-portable
computing on the move• Store contacts, calendar,
editing documents, email etc
Mainframe computer
• Large and powerful• Lots of processing power
(multiple CPUs) and RAM• Many users connected
using terminals• Used by banks and other
large businesses to process and store data
Multimedia Systems
• Multimedia systems integrate sound, animation, video and graphics
• Most modern computers have these capabilities
• Interactive learning, information systems, multimedia web pages, games
Multimedia systems
• A fast CPU and lots of RAM and storage
• Quality TFT display• Scanner• Digital camera (video)• Surround sound
speakers• Data projector
A good system for viewing and creating multimedia might include: