1/42
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Hardware
Physical components of a computer system.
Software
Program code. Sequences of instructions which are executed in order to perform a task.
Application Software
Programs that complete a specific task for the user.
Examples of application software
Word processors, web browsers, spreadsheet software
System software
Operates, controls and maintains the computer and its components.
What does system software include?
operating system, utilities, device drivers, language translators, ands library programs
Operating system
Allows users to control the computer with ease. It also manages and controls access to the computer's resources. This includes memory management, processor scheduling, and handling interrupts.
Processor Scheduling
Allocating processor access to different applications.
How does an operating system work?
It provides a virtual machine hiding the true complexity of the computer from the user.
Utility programs
Used for completing housekeeping tasks in a computer system.
Utility tasks
Data backup, defragmenting hard drives, data compression, and encryption.
Library Programs
Contain useful functions that are frequently used by a program.
Translators
Software that translates between different types of language.
Low level languages
Platform specific programming languages that a computer can (more directly) understand.
Machine code
Uses 0s and 1s to represent instructions
Machine code disadvantages
- Difficult for humans to understand
- Prone to errors
- Difficult to debug
Machine code advantages
- Directly manipulates a computers processor, making it a powerful paradigm
- No constraints
- No need to translate before execution
What is Machine code useful for?
Useful for embedded systems and real-time applications.
Assembly language
A low level language with a 1-to-1 correlation to machine code.
Advantages of Assembly language over machine code
- More compact
- Less error prone
High level language
A programming language that is designed to be easy for humans to read and write.
Why are high level languages easier to debug than low level languages?
High level languages have features such as: named variables, indentation ,and commenting, making programs written using them far easier to debug
Imperative Languages
Specify how a computer should complete a task
Declarative Languages
Languages that declare or specify what properties a result should have, e.g. results will be based on functions.
Source code
The input for a translator.
Object code
The output of a translater.
Translator
A program that translates a program into machine code.
Assembler
Translates assembly language into machine code.
Is translation between assembly language and machine code fast?
Yes, as each assembly language instruction has a 1-to-1 relationship with machine code instructions, making translation quick, and straightforward.
Are assemblers platform specific?
Yes. A different assembler must exist for each different type of processor instruction set.
Compilers
Translate high level languages into machine code.
How does a compiler work?
Compilers take a high level language as their source code, check if for errors, then translate the whole program at once.
What do compilers do if they find an error?
If an error is found, it will not be translated.
Are compilers platform specific?
Yes, as they produce machine code.
How are compiled programs run?
Once translated, the program can be run without the need for any other software to be present.
Compilers with intermediate languages
Translate source code into an intermediate language, which allows for platform independence.
Intermediate language example
bytecode
How do compilers with intermediate languages work?
Translates source code into an intermediate language, and then uses a virtual machine to execute the bytecode on different processors. Every processor instruction set has its own virtual machine.
What's an advantage of intermediate languages?
The interpreter only has to translate the code once, while the translated code can be executed with a variety of processors.
Interpreters
Translates high-level languages into machine code line-by-line.
How do interpreters work?
Interpreters translate high level languages line-by-line. This means that they also check for errors whilst translating.
Because of this, programs can be partially translated until the error is reached.
What happens when an interpreter reaches an error?
Translation stops.
How is interpreted code run?
Both the program's source code and the interpreter must be present, resulting in poor protection of the source code.