Software is lines of non-physical instructions that control hardware in order to make it useful
A type of software is systems software - this maintains and manages the hardware of a computer system to make it run efficiently
Application software is another type of software - it performs user-driven tasks
System software has 2 categories:
Operating Systems
Utilities
Examples of application software include:
Word processor - creates and stores text documents
Database - stores maintains and allows access for data
Web browser - Retrieves information from other parts of the internet and transfers it to the computer
Graphics Manipulation - enhances graphical images
A generic application is a type of application that does not have a specific purpose. It can carry out multiple types of tasks, including those that are not related to the original purpose of the application.
An example of a generic application is word processor
A specific application is highly specific to a certain task
It only tends to be installed on systems where it has a direct need
An example is database software
Word processors can be applied to any scenario - as long as they are justified why
A utility software is a housekeeping software. It configures, optimizes, maintains and protects a computer system so that it runs as efficiently as possible
There are some types we need to now:
Antivirus
Compression software
Backup software
File managing software
Defragmentation software
Device Drivers
File repair software
Files can become corrupt or damaged
As a result, file repair software attempts to correct such issues so as to restore a file to its original working state
It is often built into applications, or can be independent
Back-up software can be set to being manual or automatic
It backs up important files by copying them and placing them in memory
It can perform full backups or incremental backups
It may also back-up to an off-site cloud system
It usually comes part of the OS but can be bought separately
Compression software reduces the size of a file so that it takes up less space in memory and can be sent and downloaded faster off of the internet
It first extracts the files before reading
It can carry out both lossless and lossy compression
Defragmentation software reorganises the order of files in a hard disk, placing fragments of files and free space back together
This speeds up the movement of the read/write head across the disk, speeding up file access
This is only necessary for hardware with moving parts
Antivirus software is software that is designed to detect and block malware attacks, and can be updated to protect against the latest threats
Disk cleanup software is software that presents unused or rarely used files to the user, and at their will, deletes them from the hard drive, freeing up space
Open Source software:
Users can distribute and modify the source code
Can be installed on any number of computers
Support is provided by the community as a whole
Users have access to the source code at all times
May not be fully tested
Benefits of open source software:
Software is free to use
Wide modification means errors can be fixed quicker
Drawbacks of open source software:
Can be poorly supported
Some features may not be well tested
Little to no financial gain for creator
Closed source software:
Protected legally by the Copyright design and Patents act
Users cannot modify the software
Usually paid for and licensed per user or per computer
Supported by the developers
Source code is not released
Tested by developers prior to release
Benefits of closed source software:
It tend to be well supported and well built for users
Creators can also gain financial profit
Drawbacks of closed source software:
For users, there is a cost or ongoing subscription fee
Piracy issues for creator
Constant demand from community for creators to make more features and updates
A CPU can only execute code when it is in machine code
It cannot directly execute source code in a high level language
The process of converting source code to machine code is known as translation
There are 3 types of translators
Compiler
Interpreter
Assembler
A compiler works by checking the whole code for any errors, and if it is error free, translates into machine code in just one go
Advantages of compiler:
No need for translation at run-time
Speed of execution is faster
Code is usually optimized
Does not reveal source code
Disadvantages of compiler
Program will not run with syntax errors
Code needs to be recompiled
Designed for a specific type of processor
An interpreter translates high level code into machine code line by line
4 stages of compilation:
Lexical analysis
Syntax analysis
Code generation
Code optimisation
Lexical analysis:
Its input is the source code
Words in the source code are converted to a series of tokens - a token is a binary string of fixed strength
It places each lexeme inside a token class
Whitespaces and comments are removed from the code
Tokens are then inputted into a symbol table
Outputs tokens to prepare code for syntax analysis
Syntax analysis:
This takes the tokens and the symbol table as its input
It checks for syntax errors by placing tokens in an abstract syntax tree
It breaks where errors are detected and reports to the user
The output of this is the parse tree , or the abstract syntax tree
The tree strictly follows syntax rules
Code generation:
This takes the parse tree as an input
This is where machine code is generated
This is the binary instructions in 1s and 0s that are executed by the processor
Code optimisation:
This aims to reduce the execution time of the program
It spots redundant instructions
Removes subroutines that are never called
Removes constants and variables that are never referenced
Assembler:
translates assembly code to machine code
Takes basic commands in assembly code and translates to CPU-specific binary
one-to-one process
Advantages of assembler:
memory efficient
Faster speed of execution due to simple instructions
Hardware-oriented
Libraries are ready-compiled and pre-tested programs that can be run when needed