Topic 4 - Computers Flashcards
What is a Hardware Machine?
The physical components that make up a system.
What is a Virtual Machine (VM) ?
A program with the same functionality of a physical computer.
What are the three types of computational models?
Sequential, parallel, multi-agent
What is a sequential computational model?
Algorithms that execute from start to finish, line by line.
What is a parallel computational model?
Algorithms that can be executed simultaneously on multiple processing devices.
What is a multi-agent computational model?
Algorithms that consist of individual agents that work individually and in a decentralised way.
How can we briefly describe a Computer System?
Input –> Process Storage –> Output
What is RAM?
Random Access Memory - anything stored in here can be accessed in roughly the same amount of time.
What is latency?
The time delay between stimulation and response.
What is ROM?
Read-Only Memory: can only be read, not changed or updated, and stores essential programs.
What is a CPU?
Central Processing Unit: the circuitry in a computer and controls the manipulation of data.
What 3 parts does the CPU consist of?
- Arithmetic Logic Unit (ALU)
- Registers
- Control Unit (CU)
What does the ALU do?
Circuits that perform logical, mathematical operations on data (e.g. + , Boolean)
What do registers do?
Small stores of data within the CPU that temporarily hold data, addresses and instructions.
What does the Control Unit (CU) do?
A circuitry coordinating the activities of a computer.
What does an Address Bus do?
Specifies the physical memory location where the processor needs to read and write to in the memory.
What does a Data Bus do?
Transmits the actual data to and from the memory.
What is the name of the process that the CPU uses when dealing with memory?
Fetch-Execute Cycle
What does the Program Counter (PC) do ?
Stores the memory location of the next instruction to be executed. It increments after the end of the fetch stage.
What does the Current Instruction Register (CIR) do?
Stores instructions currently being processed.
What happens in the FETCH stage (4) ?
- CPU receives address by the PC
- Address is added to the address bus.
- Main memory receives this and transfers this to a data bus back to CPU.
- Instruction stored in the CIR.
What happens in the DECODE stage (2) ?
- CU makes sense of the instruction according to the instruction set.
- Instruction decomposed into its individual components.
What happens in the EXECUTE stage?
CU activates and initiates the processing required by the instruction. (i.e. if arithmetic calculation = ALU)
In what form are all computer programs executed in by the processor?
Machine code (1s and 0s)
When machine code is translated, what happens?
Each high-level instruction is split into smaller low-level instructions.
What is assembly language?
An improved alternative of binary and uses mnemonics.
What is hardware?
The physical items that make up a computer system.
What is the processor (CPU) ?
Carries out the instructions from programs by processing data.
What is Main Memory?
Temporarily stores data and program instructions for open applications.
Is RAM a form of non-volatile or volatile memory?
Volatile - the data is lost if the power is turned off.
What is Secondary Storage?
A persistent store of data and is not directly connected to the CPU.
What is an Input Device?
Inputs data for processing .
What is an Output Device?
Presents data that has been processed.
What are examples of input devices (2) ?
Camera, buttons
What are examples of output devices (2) ?
Speakers and a touch screen (input AND output)
What are the three types of Secondary Storage devices?
Magnetic, Optical, Solid-State
What are the three features of a Magnetic secondary storage device?
+ Large capacity and cheap to buy
/ Usually reliable but not that durable
- Generally not very portable
What are the three features of an Optical secondary storage device?
- Per unit, they have a small capacity
/ Fairly reliable and durable but can be easily damaged.
+ Good portability - easy to transport and carry.
What are the three features of a Solid-State secondary storage device?
/ Very fast for storage but expensive
+ Very reliable as they are non-mechanical.
- Generally have a smaller capacity than magnetic
What is a microcontroller?
A small computer contained on a single chip.
What are examples of microcontrollers?
TV Remote, Car keys, Digital fridges, etc.
What is an Actuator?
A motor that can move/control a system.
What is a sensor?
Detects changes to its environment and converts it into an output, e.g. light intensity, altitude (barometer)
What are the three basic Boolean operators?
AND OR NOT
What is a Truth Table?
A method of representing every possible result based on inputs in a Boolean expression.
How does AND work?
Returns true if BOTH conditions are true, else the result is false.
How does OR work?
Returns true if EITHER the conditions are true. It will only return false if both conditions are false.
How does NOT work?
Reverses (negates) the input.
What is software?
The programs running on a computer system.
What is Application Software?
Programs that perform a specific task for the benefit of the user.
What are some examples of Application software?
Word processors, apps, games, web browsers, etc.
What is System Software?
Performs tasks needed to operate the hardware (e.g. operating systems, game machines). They provide service for other software.
What is an Operating System (OS) ?
The essential software that links the hardware and OTHER software together and manages the computer.
What are some examples of Operating Systems?
Android, Linux, Windows, iOS
What two things does an Operating System do?
- Hides the true complexity of the hardware.
2. Manages the hardware resources, I/O devices, etc.
What 7 tasks does an Operating System perform?
- File Management
- Input / Output
- Resource Allocation
- Process Management
- Network Management
- Memory Management
- User Management
What is a Software Model?
A computer program designed to simulate aspects of the real world.
What are examples of Software Models?
Weather, Economics, Nuclear Physics, etc.
What are some advantages of using Software Models?
- Saves time and money
- Tests can be repeatedly run.
- Factors like safety are not an issue
What is a programming language?
A formal constructed language designed to communicate instructions to a machine.
What are two examples of low-level programming languages?
- Machine Code
2. Assembly Language
What are 4 examples of high-level languages?
- C++
- Java
- Python
- Pseudocode
What are two examples of Natural Languages?
- English
2. German (or any other spoken language)
What is Machine Code made up of?
0s and 1s.
What are three features of Machine Code?
- Written for specific processors so NOT VERY PORTABLE
+ Executes very fast - Impractical: code is very long and errors are hard to find
What are three features of Assembly Language?
+ More programmer-friendly
+ Allows high control
- Still fairly difficult to deal with.
What are three features of High-Level languages?
+ Far easier to use
- Strict syntax
+ Portable
+ Simplistic and efficient
What is a translator?
A program that converts code from one language into another.
What are the two types of high-level translators?
COMPILER and INTERPRETER
What does a compiler do?
Converts high-level language into machine code.
How does a compiler translate the code?
- Scans through the whole code.
- Translates it ALL into object code (i.e. machine code)
What does a interpreter do?
Converts high-level language into machine code.
How does an interpreter translate the code?
- Works line by line.
What are two comparisons between a compiler and an interpreter?
- Interpreters are slower than compilers.
- Interpreters are more flexible than compilers.