1/53
Computer Sciense GCSE
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Low-level languages
Machine code and assembly language
Machine code
written in binary
Assembly language
written using mnemonics, then converted to binary by an assembler
Advantages of Low-level languages for programs
machine code is run directly by the CPU, uses instructions that correspond directly to the CPU’s hardware, very fast to execute
Disadvantages of Low-level language programs
are hardware dependent, different hardware= different sets of instructions, are difficult to write code for as their syntax is very different to english
High-level languages
Python, C#
Advantages of High-level languages
are not hardware dependent - code can run on different hardware after translation, easier to code, syntax is similar to English
Disadvantages of High-level languages
need to be translated in order to run on a CPU, use instructions that are specific to the language, are slower to execute because they need to be translated
Program translators
software that converts high-level code into machine code
3 common types of translators
compilers, interpreters, assemblers
A compiler
works through high-level code, translating every line into machine code, producing an executable file specific to the hardware. the original code isn’t shared with end user. once compiled, the executable file executes quickly and doesn’t need to be compiled again for the hardware on which it will run
Interpreter
translates one line of high level code then runs it - repeats.
no executable file produced, any hardware can run the code
the original high level code must be shared with end user.
each time a program is executed it must be re-interpreted.
slower to execute
Assembler
needed to convert assembly language into machine code. they have a 1:1 correspondence with each other. one instruction in assembly translates to 1 instruction in machine code
hardware
physical components of a computer
software
the programs that provide instructions for the computer
what 4 things do computers do with data?
inputs, processes, stores, outputs
What hardware processes the data
CPU - the central processing unit
Von Neumann Architecture
data and instructions stored in the same memory location
CPU architecture
the internal logical structure and organisation of the computer hardware
What does the CPU do
carries out a set of instructions that is contained in a computer program
5 CPU components
ALU
Control Unit
Clock
Registers
Buses
Arithmetic Logic Unit
carries out all arithmetic calculations, logical decisions, and comparisons
Control unit
decodes instructions and sends signals to control how data moves around the CPU and memory to execute these instructions
Clock
a vibrating crystal that generates digital pulses at a constant speed of vibration that synchronises the CPU activity
Registers
memory locations within the CPU that hold data that can be accessed very quickly
Buses
communication channels through which data moves, connect the CPU to main memory and any input/output devices
The performance of the CPU is affected by the:
Clock speed
cache memory
number or processor cores
Clock Speed
the clock controls how quickly the CPU works, the faster the clock the more instructions can be completed per second. clock chips currently operate at speeds of up to 4 billion instructions per second
Cache memory
small in size but can be accessed quickly by CPU, more cache gives CPU faster access to data
Number of Processor cores
each core performs separate fetch-execute cycles, if a cpu has multiple cores it can perform more instructions simultaneously
Fetch-execute cycle
The CPU continually fetches, decodes, and executes instructions
fetch
an instruction in the form of data is retrieved from main memory
decode
the CPU decodes the instruction
Execute
the CPU performs an action according to the instruction
Memory
computer needs this to access data quickly, made up of main memory, cache memory and registers
2 types of main memory
ROM AND RAM
Random Access Memory
volatile - needs constant power to maintain, holds the OS and any apps/data currently in use by the computer
can be accessed by the CPU quickly
the more RAM, the more programs/data it can run at the same time
ram is read/write
Read Only Memory
non-volatile, doesn’t need power to maintain it, provides storage for data and instructions needed to start the computer, ROM is normally written at the manufacturing stage.
Secondary storage
needed to permanently store files and programs, needs to be non volatile, low cost, high capacity, and reliable
What is magnetic storage -Magnetic Hard Disk Drives
They use a stack of rotating magnetic platters, a moving head moves across the surface to read and write data
Advantages of Magnetic storage
larg capacity
portable small drives
reliable for medium term 5-7 years
low cost
Disadvantages of Magnetic storage
slower access speeds
large hard drives aren’t portable
not durable - strong electric/magnetic fields can easily damage
What is solid state storage - solid state drives
uses electronic circuits to store data and flash memory, no moving parts-low power needed
Advantages of solid state storage
SSDs are lightweight and compact
very fast access speed
portable and durable
very reliable long term
Disadvantages of Solid state storage
lower capacity then magnetic, more expensive
Optical storage - CDs/DVDs
These devices use light properties to store data, they reflect laser light onto the surface of the rotating disk and read the reflections as 1s and 0s
Advantages of Optical storage
very portable, very durable, most reliable, very low cost
Disadvantages of Optical storage
Can’t withstand scratches, limited capacity, slowest access times, cost per GB=expensive
Cloud storage
services and apps stored/run on remote servers accessed via the internet, use magnetic or SS tech
Advantages of Cloud storage
data can be accessed from anywhere in the world with internet connection
amount of storage space is flexible, users can buy additional storage
all data is regularly backed up and kept secure
data can easily be shared with anyone anywhere in the world
Disadvantages of cloud storage
internet connection needed, users have little control over security, data can be targeted more easily by hackers, cloud providers can quicky change terms and prices
What is an embedded system
a computer system that has been designed for a dedicated function as a part of a bigger system, often made as a single chip. they are robust and reliable.
Characteristics of an embedded system
perform a limited set of tasks to reduce size and improve performance
uploaded at the manufacturing stage
very limited options to modify
low power consumption
small in size
rugged
low cost
Exampls of an embedded system
washing machine, microwave oven