100% found this document useful (1 vote)
184 views

Chapter 3 - Architecture - Languages - Operating - Systems

IGCSE - Computer Science class-notes. Chapter 3 -Architecture_Languages_Operating_Systems full coverage

Uploaded by

MOG FBUI
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
100% found this document useful (1 vote)
184 views

Chapter 3 - Architecture - Languages - Operating - Systems

IGCSE - Computer Science class-notes. Chapter 3 -Architecture_Languages_Operating_Systems full coverage

Uploaded by

MOG FBUI
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/ 20

Computer Science

Cambridge, IGCSE
Chapter 3 – Computer Architecture, Languages and Operating Systems
Computer Architecture, Languages and
Operating Systems
Learning Objectives
• Understand the von Neumann architecture for a computer system
• Describe the fetch – execute cycle
• Describe the purpose of an operating system
• Understand the need for interrupts
• Understand what high-level and low-level languages are and why
both are needed
• Understand the need for compilers, interpreters and assemblers

Computer Science, IGCSE


You Tube Videos

• https://youtu.be/ckDb_W72__c (von Neumann Architecture)


• https://youtu.be/fcroyPCRllo
• https://youtu.be/eO4F1E81M8g (Fetch - Decode - Execute)
• https://youtu.be/0BKBTFw47xI (F - D- E Part 2)
• https://youtu.be/1OukpDfsuXE (High level, Low level language)
• https://youtu.be/JNMy969SjyU (Compilers vs Interpreter)

Computer Science, IGCSE


Von Neumann Architecture
• The von Neumann architecture, on a simple level, states that a computer
system can be thought to consist of 3 main sections:

• The CPU (Central Processing Unit) – also known as the processor, the main
processing unit of the system

• Storage
• Primary/Main memory (RAM, ROM, cache memory and registers) – fast to access and directly
accessible by the processor
• Secondary storage – accessed through input/output controllers. Slow to access. Examples:
hard-drives, CD-ROMs

• Input / Output devices – used to communicate with other devices. Examples:


keyboard (input), printer (output)

Computer Science, IGCSE


Primary vs Secondary Storage
Primary Storage (RAM, ROM) Secondary Storage (SSD, HDD)
Directly accessible by the processor, internal to the Not directly accessible to the processor – data first has
computer to be transferred to RAM
Temporarily stores data Permanently stores data till erased
Can be read from and written to primary storage Slower to read data from and write data to – needs to
almost instantly be transferred to RAM first
Normally a few GB in capacity/size Can be up to a Terabyte or more in capacity/size
Fixed within the computer Some devices are removable

SSD – Solid State Device


HDD – Hard Disk Drive
RAM –Random Access Memory
ROM – Read Only Memory
Computer Science, IGCSE
CPU Components
• Control Unit (CU)
• An internal part of the CPU
• Controls the flow of data through the CPU
• Controls the interactions between the different part of the CPU
• Tells the different components and any linked hardware how to respond to the
instructions given
• Immediate Access Store (IAS) (also commonly known as the CPU memory)
• Memory found inside the CPU
• Holds data and instructions needed to process the data
• Data and instructions need to be transferred to the IAS from main memory before
processing as bringing them directly from main memory for processing would be too
slow

Computer Science, IGCSE


CPU Components
• Arithmetic Logic Unit (ALU)
• An internal part of the CPU
• Carries out calculations on the data
• Arithmetic part uses +, -, *, /
• Logic part carries out comparisons such as >, <, =
• Values need to be placed in the Accumulator for calculations to be carried out
• Registers – MAR, MDR, ACC, PC, CIR
• Internal memory locations within the CPU
• Temporarily hold data and instructions during processing (both held as binary)
• Used to move data and instructions into and around the different
components of the CPU

Computer Science, IGCSE


CPU Components
• Input / Output
• Allow interactions with the computer
• Instructions are processed from and to them in the CPU

• Buses
• Buses connect the different components of the CPU
• A series of conductors or pathways (a sort of ‘highway’ for information)
• 3 separate buses are used:
• Data bus carries data (MDR)
• Address bus carries the memory address (MAR)
• Control bus carries the instructions

Computer Science, IGCSE


The von Neumann Architecture

Computer Science, IGCSE


The stored-program concept
• The Von Neumann architecture is based on the concept of a stored-
program computer
• A stored-program computer is a computer that stores data and
programmed instructions in read – write, random access memory
(RAM)
• Before a computer can read data, process it and produce information,
it must read a set of instructions called a ‘program’. The program will
state what processing is required
• Multiprogramming means more than 1 program can be stored in a
computer at any given time
Computer Science, IGCSE
A single processor that follows a linear sequence
of execution – called the fetch-execute cycle -

Step 1: Fetch the data and instructions and store in


the IAS
Fetch the Puts the address of the next item that needs to be
instruction fetched onto the Address Bus. Data from this
address is put on the Data Bus to move it from main
memory into the IAS
Step 3: Execute the instruction Registers used to store and move the data to a
The CPU carries out the instruction on special register that decodes the instruction
the data
If any arithmetic or logic calculations are Step 2: Decode the instruction
needed, this is done in the ALU Execute Decode Every CPU understands a specific set of
the the commands – Instruction Set
Then the next instruction is fetched instruction instruction The moving of data and the decoding of
Instructions is controlled by the CU

Computer Science, IGCSE


Operating Systems (OS) – MS Windows, Mac
OS, Linux
• Every computer needs an operating system to run other programs
• An OS is the framework that allows us to communicate with computer hardware
in an interactive way. Without this we would not be able to tell the computer to
do anything
• OS perform basic tasks
• Recognising input from keyboard
• Sending output to the display screen
• Keeping track of files
• Controlling peripheral devices e.g. printer
• A modern OS uses a graphical user interface (GUI) to allow the user to interact
with the computer
• Uses icons, buttons and menus that can be clicked to carry out tasks

• The opposite of a GUI is a Command Line Interface (CLI) e.g., Linux OS uses a CLI
Computer Science, IGCSE
Main functions of an OS
• Provides the GUI for the User to interact with the computer
• Manages the hardware and peripherals that are connected to the computer (peripheral –
a hardware device used to input, store or output data that is not part of the computer
itself e.g., printer, external hard drive)
• Manages the transfer of programs into and out of memory
• Divides the processing time between the different applications that are running – this
allows you to listen to music while creating a document in MS Word, for example
• Manages access rights (what the user is allowed to access) and security for the computer
e.g., anti-virus software, firewalls
• Manages file handling – store, delete and move files. Keeps track of all actions carried
out on files
• Manages utility software on the computer e.g., disk defragmentation and disk formatting
software

Computer Science, IGCSE


Interrupts
• An interrupt is a signal that something has happened, an event has occurred
• Can be generated by multiple sources e.g., a User pressing keys on a keyboard, a
Printer connected to the computer. The signal will come from a device attached
to the computer or from a program running on the computer
• It will cause the OS to stop and decide what task to continue with – either
continue running the same program or will begin running a new program
• Multitasking – running programs in turn so that it appears they are all running at
the same time
• An OS will contain a program called the Interrupt Handler – prioritises the
interrupt signals as it receives them and places them in a queue to be handled
• Two kinds of interrupts – hardware (from a peripheral device) or software (from
an application) interrupts

Computer Science, IGCSE


High-level and Low-level languages
• High-level languages
• Designed to be used by humans – closer to what we recognize in terms of
language - “English-like”
• Easier to read and write programs in than low-level languages or machine
code
• Fewer mistakes are made when programming as not as much knowledge is
needed as for programming in Assembly language or Machine Code
• Examples – Fortran, Cobol, BASIC, C, C++, C#, Pascal, JAVA, Python
• They are also independent of any hardware they are run on as opposed to
Assembly language which is hardware specific. Means that a program written
in a high-level language can be run on any kind of computer
• One line of code can do several different tasks
• e.g., name = input (“What is your name?”) #doing 4 things in 1 line of code!

Computer Science, IGCSE


Compiler vs Interpreter
Compiler Interpreter
A program that takes code written in a high-level Also translates high-level language to machine code
language and converts it into machine code - A BUT only 1 line at a time
computer can only process machine code
The code produced by a programmer is called Source Each line of code can be checked as a programmer is
Code writing it as each line of code is translated in turn
Running the source code through a compiler is called It takes up less memory than a compiler as it
compiling the code translates each line of code in turn (no need to store a
.exe file)
Each high-level language has its own compiler Slower than compilers as each line must be
interpreted every time the program is run
A compiler translates the complete program in one go Interpreter is required every time the program is
once the complete program has been coded – so all executed
errors are highlighted if they exist, and the program
won’t compile until the errors are fixed
The machine code from the compiler is output as an
executable file (.exe) and can be stored for future use
whenever the program is needed. Compiler not
needed again unless the program needs to be
changed Computer Science, IGCSE
Low-level languages
• The raw code that a computer processes is called machine code
• In its most basic form this is binary code (0’s, 1’s)
• Also called Object Code
• Very difficult to understand but can be represented in a slightly simpler fashion as
assembly language
• Assigns mnemonic codes to sets of machine code to make them more understandable e.g.,
• ADD
• SUB
• INP
• OUT
• Assembly language is converted to machine code by an Assembler
• In low-level language – each line of code only performs 1 task
• Device drivers for hardware are written in low-level language

Computer Science, IGCSE


Summary
• The von Neumann architecture was designed to be easier to re-
program computers. Based on the concept of a stored-program
computer – data and instructions kept in read/write RAM – the
computer reads a set of instructions called a ‘program’ – the program
will state what processing is required
• Has a single processor that follows a linear sequence: fetch – decode -
execute cycle. The CPU fetches an instruction from the main memory
to its internal memory, decodes and executes the instruction – uses
registers and buses

Computer Science, IGCSE


Summary
• Every computer or device needs an operating system to run other
programs. They perform basic tasks – recognizing input from the
keyboard, sending output to the display screen, keeping track of files
and controlling peripheral devices e.g., printers
• An interrupt is a signal that informs software (OS or Interrupt
Manager/Handler) that an event has occurred – get hardware and
software interrupts

Computer Science, IGCSE


Summary
• High-level languages – easier for humans to use – close to the language we
use all the time e.g., English. Needs to be run through a Compiler or
Interpreter to produce machine code that is processed by a computer
• Low-level languages – computers’ language. Can be processed by computer
as is – no need for a Compiler or Interpreter
• A compiler is a program that takes the whole of a program written in a
high-level language and translates it into machine code
• An interpreter is a program that translates a program into machine code
line by line
• Assembly language (easier form of low-level language) assigns mnemonic
codes to sets of machine code – needs an assembler to convert into
machine code. Easier to understand than machine code

Computer Science, IGCSE

You might also like