Software
Computer Software
System software is essential and includes the operating system and utility software. It is installed directly on the computer and manages the hardware. On the other hand, application software is optional and installed on top of system software to allow the user to perform specific tasks using the computer.
In short, system software provides what the computer requires while application software provides what the user requires.
Operating System
The operating system is booted after the BIOS has loaded successfully. An operating system is a program designed to manage hardware and software resources. It performs a variety of tasks:
- Memory Allocation
- Peripheral Management
- Interrupt Handling
Utility Software
Utilility programs perform specific tasks related to computer functions, resources, files, and security. They help to configure the system and optimise performance. Some examples include:
- Security Software
- Disk Allocation
Application Software
Application software provides services that are required for users to interact with the computer. Some examples include:
- web browsers
- word processors
- spreadsheet programs
- video games
Interrupts
Interrupts allow computers to multitask. When an interrupt is generated, the CPU stops processing the current task and services the interrupt. There are 2 types of interrupts:
- Hardware Interrupts
- Keyboard Keystroke
- Mouse Movement
- Software Interrupts
- Unresponsive Program
- Division by Zero
Interrupt Service Routine
Interrupts are handled by the operating system. It contains the interrupt handler.
- Interrupt is generated
- Operating system assigns interrupt a priority
- Interrupt is added to queue
- Interrupt stops CPU from processing current instruction
- Interrupt handler services the interrupt
- CPU executes interrupt and continues processing other interrupts or instructions
Programming Languages
High-Level
A high-level language uses natural language as syntax and is designed to make writing code easier for programmers. Examples of high level langauges include:
- Python
- Java
- JavaScript
- Visual Basic
High-level languages are:
- easier to understand
- easier to debug
- portable
These advantages allow programmers to focus on the problem instead of managing memory and harware.
Low-Level
A low-level language communicates with the computer hardware directly and is harder to understand. Assembly and machine code are examples of low-level languages.
Assembly
Assembly code uses mnemonics such as LDA
and ADD
to represent binary instructions.
Machine Code
Machine code is a list of instructions written in binary. Computers can only understand binary. This means that every programming language has to eventually be converted into machine code.
Translators
A translator converts source code written in a high-level or low-level language into machine code.
There are 3 types of translators:
- assemblers
- compilers
- interpreters
Assembler
An assembler translates low-level assembly code into machine code.
Compiler
A compiler translates a whole source code file into machine code in one go. It also:
- checks for errors before running the program
- generates a report of all the errors found in the program
- produces an executable file
Interpreter
An interpreter translates source code one line after the other. It also:
- translates one line of source code into machine code and runs it before moving on to the next line
- stops when it encounters an error
- allows errors to be fixed in real-time
Integrated Development Environment
An IDE provides tools that make it easier for programmers to write code.
Tools
IDEs contain a lot of built-in tools. The functions of an IDE include:
- code editor
- auto-completion
- auto-correction
- prettyprint
- built-in interpreter
- built-in compiler
- run-time environment
It may be useful to think of an IDE as having 2 layers.
- Code Editor: automatically completes or corrects code as it is typed and uses prettyprint to display source code in an attractive way
- Integrated Development Environment: adds interpreters to be used during development, compilers for producing a final executable, and a run-time environment to run the program
For example, Visual Studio Code is a code editor while Visual Studio is an IDE. This is because Visual Studio targets the .NET framework made by microsoft. It has an embedded compiler for C# and Visual Basic. Visual Studio Code on the other hand, requires you to install most resources.