4.6 Flashcards
What is hardware?
The physical components of a computer.
What is software?
Sequences of instructions that operate over the hardware.
What are the two classifications of software?
System software and application software.
What is system software?
Software that is responsible for the operating of the computer itself. It enables users to use a computer without having to understand its internal software.
What is application software?
Software that solves problems for the user. They support user oriented tasks and do interfere directly with the hardware.
What is the need for system software?
Without it a computer would be unable to use application software.
What are the three different types of application software?
General purpose, special purpose and bespoke.
What is general purpose application software?
Software that is appropriate for a wide range of uses.
What is special purpose application software?
Software that is created for a specific application. It is created for a specific customers.
What is bespoke application software?
When software must be written from scratch to solve a particular task.
What types of system software are there?
Operating systems, Utility programs, Library programs and translators.
What is an operating system?
A program that controls the entire operation of a computer and interacts directly with the hardware.
What are utility programs?
A systems program designed to perform a common task. This includes formatting and partitioning a disk and virus checkers.
What are library programs?
A collection of subroutines that can be used by other programs that link to the libraries.
What are the three types of translator?
Compilers assembles and interpreters.
What is a compiler?
A program that translates high level code into machine code.
What is an assembler?
A translator that translates assembly code into machine code.
What is an interpreter?
Translates and executes a high level program one statement at a time.
What is the role of an operating system?
To hide the complexities of the hardware and to manage the hardware resources.
What are the classifications of programming languages?
High level languages and low level languages.
What are the two types of low level languages?
Machine code and assembly language
What are the classifications of high level languages?
Imperative and declarative
What are imperative high level languages?
They are made up of procedural and object oriented program. They are programs that give commands.
What are the advantages of coding in assembly code over high level languages?
- It has a one to one relationship with machine code.
- Can be very precise locally optimised code.
- Directly accesses system level features without having to go via a software interface improving efficiency
- Complete control
What are the disadvantages of assembly code over high level languages?
- Machine dependent (device specific)
- Very few skilled programmers
- Long and tedious to write in
- Difficult to understand modify and maintain.
What is an important feature of imperative languages?
They can change a programs state.
How does an assembler work?
Assembly language has a one to one correspondence with machine code. Therefore each line in assembly code is mapped line by line to its machine code equivalent.
What does a compiler do broadly? (Specifics later)
A compiler reads a program’s source code and translates it into another language called the object code. It also reports errors in the code.
What can object code include?
- Machine code
- Intermediate code that can be interpreted by an interpreter eg java bytecode
- Executable code for inside a virtual machine
Does a compiler execute code?
No it only translates it.
What are the stages of compilation?
Lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimisation and code generation.
What is lexical analysis in the context of a compiler?
It is when the source code is split up into language defined words eg “while”.
What is syntax analysis in the context of a compiler?
Checks that statements are grammatically correct.
What is semantic analysis in the context of a compiler?
Checking for type errors.
What does an interpreter do?
An interpreter executes a high level program statement by statement. It does this by recognising what type of statement a given statement is eg a variable declaration. It the calls a prewritten function that executes the statement.
What are the differences between a compiler and an interpreter?
- An interpreter translates and executes while a compiler only translates
- A compiler produces an independent form of the source code while an interpreter does not.
- The interpreter has to be on the machine that is running the code whereas a compiler doesn’t have to occur on the same computer that is running it.
- Compilers are not as good at pinpointing errors.
When are assemblers a good choice of translator?
For time critical sections of code as assembly code can be highly optimised. It is also used where direct access to the hardware is required.
When are compilers a good choice of translator?
When the program is distributed it hides the source code. This is useful commercially or whenever someone wants to hide their source code. Compiled code is also faster.
When are interpreters a good choice of translator?
During development as they can locate errors easily.
What is bytecode?
An intermediate language between machine code and high level language code. It comes from a compiler.
How is bytecode used?
It runs on a pretend virtual machine which converts it into machine code.
What logical gates do you need to know for the exam?
Or, nor, and, nand, XOR, not
Can you recognise a full adder and a half adder?
If not google it.
Can you draw a half adder?
If not google it.
What is an edge triggered D-type flip flop?
A RAM memory unit. It can only change its value when the clock is on a rising edge (if a positive flip flop) or a falling edge (if a negative flip flop).
What is a flip flop?
A basic circuit that can store one bit and flip it between 0 and 1
What are the inputs for a flip flop?
A control input (often labelled as D) and a clock signal.