CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Firmware
Firmware is a type of computer software. It provides the low level control
needed for a particular piece of hardware to work correctly.
It can communicate directly with the hardware without needing to go through
an operating system or device drivers.
Firmware is found in many hardware devices such as TV remotes, cameras,
routers, scanners, computers etc.
The firmware software is stored in a special dedicated memory chip embedded
inside the hardware. This is added at the time of manufacturing.
What role does firmware play in a modern computer system?
In a modern computer, firmware is stored in a ROM chip (hardware).
We call this firmware the BIOS (basic input/output system), or the bootloader.
When you power up the computer, it’s job is to provide enough hardware
functionality to locate the OS on the hard disk and begin loading it into
memory.
Once enough of the OS is loaded, it can take control of the computer and
continue to load the remainder of itself.
In most computers the firmware/BIOS is no longer needed now until the next
boot-up.
Finally, any application software that you open is run on top of the OS, using
device drivers as necessary.
Be cautious when asked to update firmware
On many computer systems the firmware stored on a ROM chip cannot be
changed.
1|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
However, on other common hardware devices (e.g. dash-cam, router etc) you
may be asked to download and install a firmware update from time to time.
When updating firmware you must make sure the process is uninterrupted.
Any issues part way through a firmware installation could cause it to corrupt
and the device may become permanently unusable.
High and Low Level Languages
A computer program is a list of instructions that enable a computer to perform a
specific task.
Computer programs can be written in high and low level languages, depending
on the task and the hardware being used.
So, what’s the difference between high level language and low level language?
High Level Languages
When we think about computer programmers, we are probably thinking about
people who write in high-level programming languages.
High level languages are written in a form that is close to our human language,
enabling to programmer to just focus on the problem being solved.
No particular knowledge of the hardware is needed as high level
languages create programs that are portable and not tied to a particular computer
or microchip.
These programmer friendly languages are called ‘high level’ as they are far
removed from the machine code instructions understood by the computer.
2|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Examples include: C++, Java, Pascal, Python, Visual Basic.
Advantages
Easier to modify as it uses English like statements
Easier/faster to write code as it uses English like statements
Easier to debug during development due to English like statements
Portable code – not designed to run on just one type of machine
Our Translators page explains how high-level languages are translated into
machine code.
Low Level Languages
Low level languages are used to write programs that relate to the specific
architecture and hardware of a particular type of computer.
They are closer to the native language of a computer (binary), making them
harder for programmers to understand.
Examples of low level language:
Assembly Language
Machine Code
Assembly Language
Few programmers write programs in low level assembly language, but it is still
used for developing code for specialist hardware, such as device drivers.
It is easy distinguishable from a high level language as it contains
few recognisable human words but plenty of mnemonic code.
3|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Advantages
Can make use of special hardware or special machine-dependent
instructions (e.g. on the specific chip)
Translated program requires less memory
Write code that can be executed faster
Total control over the code
Can work directly on memory locations
Our Translators page explains how low-level languages are translated into
machine code.
Machine Code
Programmers rarely write in machine code (binary) as it is difficult to
understand.
Interrupts
A key feature of any operating system is the ability to handle interrupts.
To learn more about operating systems, visit our operating systems page.
What is an interrupt?
An interrupt is a signal which is sent from a device or from software to the
operating system.
The interrupt signal causes the operating system to temporarily stop what it is
doing and ‘service’ the interrupt.
The interrupt handler is the part of the operating system which is responsible for
dealing with interrupt signals.
The interrupt handler prioritises interruptions as they are received, placing them
into a queue as necessary.
4|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
For every interruption, the current task needs to be stopped, with it’s status
saved (so it can resume later).
Examples of interrupts
Here are some examples of the causes of interrupts. Note that not all need any
intervention from the user.
Hardware issue, such as a printer paper jam
Key press by the user, e.g. CTRL ALT DEL
Software error
Phone call (mobile device)
Disk drive indicating it is ready for more data
Multitasking
Interrupts allow computers to give the impression they are multitasking.
This is achieved through regular scheduled interruptions between programs.
This ‘time sharing’ is essential as in reality a processor can only handle one
process at a time.
Operating System
5|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
An operating system (OS) is the computer program (software) responsible for
the operation and smooth running of a computer.
Most general purpose computers (including smartphones and tablets) will have
an operating system to manage the running of other programs and control the
system’s inputs and outputs.
Operating systems usually provide a graphical user interface (GUI) to help users
to interact with the computer, however successful operating systems can also
function from a command line interface (CLI).
Our User Interface Design page explains all about a variety of interfaces.
Examples of operating systems include:
Microsoft Windows
Linux
iOS
Mac OS
Andriod
6|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Functions of an operating system
Operating systems have many functions:
Provides an interface for computer interaction
Control of inputs and outputs
Interrupt and error handling
Management of hardware and peripherals
Management and loading of software
File management (copy, save, sort, delete)
Processor management for multitasking
Memory management
Security (access rights, user accounts, firewalls etc)
Network communication
User interface
A user interface provides a way for the user to interact with the computer.
Without it, most computers would be too difficult for the average person to use.
Management of hardware and peripherals
The operating system is responsible for controlling all the devices connected to
the computer. It tells them how to interact and operate correctly.
Device drivers are used to manage these connections.
Running of software
The operating system runs programs, allowing them to function as designed.
Programs are designed to run on a particular operating system. This enables
them to benefit from the existing connections and functions available.
7|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Processor management
The operating system manages the CPU.
When software is opened, the OS finds it and loads it into memory (RAM).
The CPU can then be instructed to execute the program.
The operating system will manage the sharing of processor time.
Interrupt and error handling
Several programs can be stored in RAM at the same time, but the processor can
only process one at a time.
Through the use of regular interruption signals, the OS can prioritise and juggle
the requests made to the processor.
This gives the illusion that the CPU is actually dealing with more than one
program or task at once (multitasking).
Errors are spotted and usually dealt with without needing to alert the user.
Our interrupt page explains more about interrupts
Memory management
The operating system is responsible for transferring programs to and from
memory.
It keeps track of memory usage, and decides how much should be given to each
program.
The OS also decides what happens if there is not enough memory.
File management
A file system is created to organise files and directories.
This gives programs a consistent way to store and retrieve data.
8|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
The OS is also responsible for the naming, sorting, deleting, moving and
copying of files (at the request of the user).
Look-up tables are used to relate file names to storage locations.
Security
The operating system is responsible for the creation and application of user
accounts and passwords.
An OS also comes with many utility programs, including firewalls.
Software Device Drivers
A device driver is software that accompanies a hardware component, e.g a
printer or scanner.
The device driver software sits between the hardware device and the operating
system.
This allows generic instructions from software applications to be turned into
specific instructions for that particular hardware device. This avoids the need
9|Page
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
for software creators to know and program the instructions required to operate
every make and model of a device.
Without the correct driver, a hardware component may not work correctly, or
even at all.
Purpose of device drivers:
Operate and control a device attached to the computer
Provide an interface between the OS/application and the device
Tell the operating system how to communicate with the hardware device
Translate requests between a device and the computer
Translators
Computers only understand machine code (binary), this is an issue
because programmers prefer to use a variety of high and low-level programming
languages instead.
To get around the issue, the high-level and low-level program code (source
code) needs to pass through a translator.
A translator will convert the source code into machine code (object code).
There are several types of translator programs, each able to perform different
tasks.
Compiler
10 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Compilers are used to translate a program written in a high-level language into
machine code (object code).
Once compiled (all in one go), the translated program file can then be directly
used by the computer and is independently executable.
Compiling may take some time but the translated program can be used again
and again without the need for recompilation.
An error report is often produced after the full program has been translated.
Errors in the program code may cause a computer to crash. These errors can
only be fixed by changing the original source code and compiling the program
again.
If you need to learn more about high-level languages, visit our Languages page.
Interpreter
Interpreter programs are able to read, translate and execute one statement at a
time from a high-level language program.
The interpreter stops when a line of code is reached that contains an error.
Interpreters are often used during the development of a program. They make
debugging easier as each line of code is analysed and checked before execution.
Interpreted programs will launch immediately, but your program may run
slower then a complied file.
11 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
No executable file is produced. The program is interpreted again from scratch
every time you launch it.
If you need to learn more about high-level languages, visit our Languages page.
Assembler
Assemblers are used to translate a program written in a low-level assembly
language into a machine code (object code) file so it can be used and executed
by the computer.
Once assembled, the program file can be used again and again without re-
assembly.
If you need to learn more about low-level languages, visit our Languages page.
Summary of translators
Compiler Interpreter Assembler
Temporarily executes high- Translates low-level
Translates high-level languages
level languages, one statement assembly code into
into machine code
at a time machine code
No executable file of machine An executable file of
An executable file of machine code
code is produced (no object machine code is produced
is produced (object code)
code) (object code)
Compiled programs no longer Interpreted programs cannot be Assembled programs no
need the compiler used without the interpreter longer need the assembler
12 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
One low-level language
Error report produced once entire Error message produced
statement is usually
program is compiled. These errors immediately (and program stops
translated into one
may cause your program to crash at that point)
machine code instruction
Interpreted code is run through
Compiling may be slow, but the
the interpreter (IDE), so it may
resulting program code will run
be slow, e.g. to execute
quick (directly on the processor)
program loops
One high-level language statement
may be several lines of machine
code when compiled
User Interface Design
A user interface is the boundary between the user and a computer system. It
allows us to communicate with the computer, and vice versa.
There are many types of user interfaces, each with their own advantages and
disadvantages. Some are outlined below.
13 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Graphical User Interface (GUI)
A graphical user interface is common in desktop computers, tablets, mobiles,
TVs, set top boxes, photocopiers, car entertainment systems, and sat navs etc.
Graphical user interfaces are recognisable by their use of windows, icons,
menus and pointers (WIMP).
An area of the screen devoted to a specific task, e.g. an open app
Windows
or dialog box
An image used to represent a program, file or task. The icon can
Icons
be selected to open the program, file or task
Words on the screen which represent a list of options that can be
Menus
expanded into further sub-menus
The method of representing movement from a pointing device
Pointers such as a mouse or human finger on a touch screen. The pointer is
also used to select and manipulate objects on the screen
Advantages of a GUI
Intuitive to use, so easy to learn (due to commands represented as images
and menus).
Disadvantages of a GUI
Can be restrictive, especially when attempting unusual tasks.
Sometimes require a lot of computer memory.
14 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Command Line Interface (CLI)
A command line interface allows the user to enter text commands into the
computer. The computer responds with text based results.
Advantages of a CLI
Uses very little memory to operate.
Great for technical users who wish to carry out complex tasks quickly.
Disadvantages of a CLI
Can be difficult to learn and use as you have to know all of the text
commands.
Easy to make errors.
Dialogue Interface
A dialogue interface uses spoken words to communicate with the computer
system. The computer responds with an action or further spoken words.
Dialogue interfaces can sometimes be found in mobile devices (e.g. Siri in an
iPhone), in-car entertainment, home entertainment systems (e.g. Amazon Alexa
or Echo) and home automation systems (e.g. lighting, curtains).
Advantages of dialogue interfaces
No hands are needed.
Can be quicker than typing.
15 | P a g e
CIE(COMPUTER SCIENCE) MOE KHIN MAR LAY ONLINE CLASS SOFTWARE
Disadvantages of dialogue interfaces
The user needs to know the correct commands.
Can sometimes struggle to recognise spoken words.
16 | P a g e