0% found this document useful (0 votes)
55 views49 pages

FC Topic 3 - Computers

Uploaded by

Nour's Adventure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views49 pages

FC Topic 3 - Computers

Uploaded by

Nour's Adventure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Topic 3 - Computers

SLR1 - CPU, Storage, Embedded Systems


SLR2 - Operating Systems, Utility Software
SLR11 - High/Low level languages, Interpreter/Compiler
RAM - Random Access Memory
1) MAIN MEMORY
2) Volatile - All data is wiped, when power is switched off

Purpose to temporarily store currently opened programs and data

Two items RAM holds are,

a) Instruction
b) Data
Exam Questions
1) What are the 2 items held in RAM

2) What does RAM hold?

3) Is RAM volatile or non volatile?


ROM - Read Only Memory
1) MAIN MEMORY
2) Non-Volatile - All data IS KEPT, even when power is switched off

No data can be changed or added to ROM.

Purpose

ROM - Store the startup / boot up instructions for your device


Exam Questions
1) What information does ROM hold?

2) Is ROM volatile or non volatile?


CPU - Central processing Unit
Control Unit

1) Decodes Instruction
2) Controls how data moves around the different components of the CPU

Clock

1) Generate a constant pulse which is used to synchronise all the


components in the CPU

1 pulse = 1 hertz, 1000 pulse - 1 KiloHertz

1 million pulses = 1 Megahertz, 3.2 billion pulses = 3.2 GigaHertz


Exam Questions
1) State 2 functions of the control unit

2) Explain the purpose of a clock inside the CPU


CPU - Central processing Unit
ALU - Arithmetic Logic Unit

1) Performs arithmetic operations. E.g + / x


2) Performs logical operations, E.g >, < , == , !=

Registers

Small super fast memory onboard the , which stores interim/temporary data
Exam Questions
1) What 2 functions does the ALU perform?

2) Where are registers located?

3) What information do register hold?


CPU - Central processing Unit
Buses
A collection of wires through which data and instructions are transmitted from one
component to another.

Data bus (Bi directional) - Data/Instruction

Control bus (Bi directional) - Control Signals

Address bus (Uni directional) - Address from RAM(main memory)


Exam Questions
1) Which of the following buses are unidirectional?

2) Which buses are bidirectional?

3) What information is sent along the control bus?


SECONDARY STORAGE - Magnetic
HDD - Hard Disk Drives
Circular spinning platter
Arm/Actuator - Reads/Write data

Magnetic drives use the underlying binary state of magnetic fields.

In other words, a typical magnet has both a north and south polarity.

These two states are ideal for storing and inferring binary 0s and 1s
Exam Questions

Explain how a magnetic HDD stores data (4)


SECONDARY STORAGE - Optical (Light)
CD, DVD, CDR, BLUE RAY

Optical drives work by shining a laser at the media and processing the reflective light that
is returned.

With permanent optical storage media, pits and lands are physically burned onto the disc.

The change in reflective light is interpreted as 0s and 1s.


Exam Questions

Explain how a magnetic Optical drive stores data (4)


SECONDARY STORAGE - SOLID STATE

USB PEN DRIVE,

Solid-state drives work by a flow of electricity, forcing electrons into floating


gates between two oxide layers.

This process causes a change in the charge of the floating gate, which can be
measured as a 0 or 1.
Exam Questions

Explain how a magnetic solid state drive stores data (4)


Compare Storage Devices

Used in Advantage Disadvantage

Magnetic Internal/External Hard ● High Capacity ● Has moving part which


Drives ● Fast Data Access can fail
● Noisy

Optical CD, DVD, Blu-ray disc ● Portable ● Slow to access


● Disks are cheap ● Prone to scratches
● Low capacity

Solid State Solid State drives ● Very Fast Data ● Slower to write than HDD
USB stick Access ● Relatively expensive
SSD cards ● No moving part ● Has a limited number of
Mobile phones ● Quiet read write cycles
● Low power
Exam Questions
1) What storage device would you use for a automatic grass cutter.

2) A new school is starting to teach Media Studies. The school is going to set up a
small video editing studio. Explain the factors that determine the suitability of two
different storage devices for storing and editing high definition video files in this
scenario. Provide specific examples of storage devices and discuss the
advantages and disadvantages of using them for video editing purposes.
Von Neumann Architecture: VNA
Von Neumann invented, The stored program concept

What are the main parts of the VNA?

1) Main memory (RAM): Data and instructions stored together


2) Input and Output devices (e,g, Mouse, monitor)
3) Central processing unit (CPU)
Main Memory

Input CPU Output


Exam Questions
1) State the two items held in RAM according to the von Neumann
architecture.

2) What are the four main components that make up a PC using the Von
Neumann Architecture.
Fetch Decode Execute - FDE cycle
When you open a program, all the data and instructions for the
program are loaded into Main Memory (RAM)

1) In order, 1 by 1, the instructions are fetched from RAM


along buses (wires)
2) The instructions are decoded (Control Unit)
3) The instructions executed (ALU)
Exam Questions

The CPU carries out a processes


Complete the diagram

Describe the role of the control unit, the control bus, the data bus and the
address bus when fetching an instruction from memory.
Embedded Systems

Embedded systems are: Computer systems with a dedicated function


within a larger mechanical or electrical system.

They contain a CPU, Main Memory (input, output devices), Flash


Storage

There typical properties include:

a) Low power consumption


b) Small size
c) Rugged operating systems
d) low cost per unit.
Exam Questions
1) Define the term 'embedded system'.
2) An embedded computer system is part of a larger machine.

State two characteristics of embedded systems that make them different from general purpose
computers.

3) Describe how an embedded system that uses a sensor could control car windscreen wipers.

Input (button, switch, sensors)

Uses a pressure/moisture sensor to detect if rain is falling (1 mark)

Check preset levels (1 marks)

If these preset level are reached, then a switch may be activated to turn on the wipers (1 mark)
Microcontroller inside Embedded Systems

What elements does a microcontroller contain?

1) CPU
2) RAM (Main Memory)
3) Flash storage

What could connect to a microcontroller?

1) Battery
2) Input (Sensors, button, switch etc.)
3) Output (screen, actuator, LEDs etc,)
Exam Questions
1) Complete the diagram of an embedded system by adding labelled boxes and
arrows to show one sensor and one actuator that controls a motor.
Internet of Things - (IoT)

The internet of things is a network of physical objects.

The IoT uses

a) Embedded devices (Toasters, Cameras etc.)


b) Wireless Technology

To collect data without human interaction.

Several privacy, security concerns!


Operating Systems (OS)

There are 4 main functions of an operating system

1) File management

2) Process management (CPU)

3) Peripheral management

4) User management
File Management - OS

The operating system is responsible for managing and keeping


track of files stored on a computer storage device

You can
1) Create directories (folders)
2) Create subdirectories (folder within folders)

You can
1) Open files
2) Save files
3) Rename files/folders
4) Delete files/folders
5) Copy files/folders
File Management - Permissions

The operating system allows you to set permissions for files

Who can do what with files

● Read: Only view content of files


● Write: Read and make changes to files
● Execute: They can run files
● Delete: Gives full access rights including delete
Exam Questions
1) What are the four levels of access that can be given to a file.
Process management - OS

The operating system is responsible for the CPU

All programs you open must get time on the CPU

The operating system


a) Gives each process a time slice on the CPU
b) Processes are held in a queue
c) The process at the front of the queue get time on the CPU
d) At the end of the processes time slice, it get put at back of queue.
e) If process is finished it leaves the queue.
f) Process have different priorities (e.g. high, low)
Exam Questions
1) How does the CPU manage processes
Virtual Memory - OS

When you have to many programs open and the RAM become
Full. The operating system take some space form the
Hard Disk Drive (HDD)

It uses the space on the HDD as virtual memory (pretend RAM)

When RAM becomes full


a) OS moves some inactive process out of RAM into the HDD
b) Process are swapped back into RAM when they need the CPU
c) Paging algorithm are used to swap in/out
Exam Questions
1) Which storage devices is used for virtual memory?

2) Why is using virtual memory not as efficient as just using RAM?


Device Driver - OS

Each peripheral (input/output device) has a device driver.

This translates commands from the operating system into


hardware-specific commands that only that device understands.

The device can also pass data back to the operating system using the
device driver.
Exam Questions
1) What is the purpose of a device driver?
Utility Software - OS

The operating system is responsible for user management

Access control: Who can access the device, log in


(Username Passwords, Biometrics )
Set permissions (Read, Write, Execute, Delete)
Set access rights (Who can see specific files/folders)
Set storage limits

User Interface: How users interact with the device.


Graphical User Interface (GUI). mouse, icons, menus
Command Line Interface (CLI), Type in commands
Exam Questions
1) Explain one way an operating system allows an administrator to
manage users.
Utility Software - OS

Utility software purpose can be to

● Maintain a computer
● Organise a computer
● Provide security
● Manage data

Common Utility software (Explain how these work)


1. File repair
2. Backup,
3. Data compression
4. Disc defragmentation,
5. Anti-malware
Exam Questions
1) A slow magnetic hard disk may be affected by file fragmentation.
Describe fragmentation and the process of defragmentation.
Robust Software

The ability for an algorithm/program to continue to


operate despite abnormalities in input, calculations, etc.

Audit Trail - Record of what has been done and who or what did it.
● Helps to reduce errors.
● Improves accountability. (who changed what & when)
● Aids in restoring a system to a previous state if needed.

Code Review - Checks of source code by other experienced programmers


1. Help identify bad programming practice.
2. Help to identify vulnerabilities in the code.
3. Check the efficiency of the code.
4. Check the code adheres to requirements.
Exam Questions
1) A team of developers is using an audit trail when working on a
program.
State two advantages of keeping an audit trail.

2) State one way that a code review helps programmers to produce


robust software.
Machine code - 0101010101011010

Every processor (CPU) has its own set of machine code


instructions

Program written in any programming language, other than


machine code, must be translated before it can be executed.

10101010010100001101001010101010101010
10101000000000000000000001010010010101
01010100101010101001010100101010101010
01010101010000000000000000000000110101
High and Low level languages

High-level language Low-level language

Example language: Python Assembly

Used for embedded systems and device drivers


Makes writing of computer programs easier by using
Purpose: where instructing the hardware directly is
commands that are like English language.
necessary.
Characteristic 1
One instruction translates to many machine code One instruction translates to one machine code
Instructions to machine
instructions. instruction.
code:
Characteristic 2
Code will run on different processors. The code will work on one type of processor.
Types of processors:
Characteristic 3
The programmer has lots of data structures to use. The programmer works with the memory directly.
Data structures:
Characteristic 4
Code is quicker and easier to understand and write. Code is much harder to understand and write.
Ease of coding:
Characteristic 5
Less memory-efficient. More memory-efficient.
Memory efficiency:
Characteristic 6
Code is slower to execute. Code is faster to execute.
Speed of execution:
Exam Questions - 6 marks
A team of programmers is creating the code for an alarm system. The system uses
a high-level programming language for the touchscreen graphical user interface
and a low-level language for the control unit that monitors the sensors and
triggers the alarm.

Discuss the characteristics of high-level languages and low-level languages that


make them appropriate for the team of programmers to code these uses.
Your answer should consider:
● the purpose of the system
● the advantages of high-level languages
● the advantages of low-level languages.
Compiler vs Interpreter

Compiler Interpreter

Translates source code from a high-level Translates source code from a high-level
Description: language into object code and then into language into machine code to be processed by
machine code to be processed by the CPU. the CPU.
The whole program is translated to machine The program is translated line by line as the
Feature:
code before it is run. program is running.
Easier to write code, as it is close to English Easy to write code, as it is close to English
Ease of writing code: language, but the program will not run with language. The program will run and stop when it
syntax errors in the code. finds a syntax error.
Does not need be recompiled, and it is easy to
Impact of changing code: Needs to be recompiled.
try out commands.
Designed for a specific type of
Yes No
processor:
Need for translation software at
No Yes
run-time:

Speed of code execution: Quick Slow

Optimised code: Yes No

Source code is kept secret: Yes No


Exam Questions - 4 marks
Describe two ways a compiler differs from an interpreter.
1.

You might also like