4.6 (every spec point covered) Flashcards

1
Q

What is meant by hardware

A

Hardware describes the electrical or electro-mechanical parts of a computer system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the functions of OS (5)

A

processor management

user management

memory management

file management

device management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the two low level languages

A

Machine code
Assembly language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe assembly code/language

A

Assembly language is a low-level programming language that uses human-readable mnemonics instead of binary machine code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is meant by software

A

Software comprises all of the programs that make the computer function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain what is meant by system software

A

Software used in the management of a computer system (OS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what are the different types of system software (3)

A

OS - manages hardware and controls resources

utility programs - Performs maintenance tasks

Translators - convert programs between language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is meant by application software

A

computer programs designed to perform specific tasks for users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of an OS ( 2)

A

To hide the complexities of the hardware from the user (i.e. provide a virtual machine)

Manages the hardware (resources) including the allocation of hardware resources (to processes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is utility software / utility programs

A

Utility software is software that performs a non-core, ancillary function for a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are three examples of utility software

A

Defragment a disk
install/uninstall software
Virus checkers
Automatic backup and restore
File compression software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a library program

A

A library program is a collection of pre-compiled routines that can be used by other programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is machine code (2)

A

Machine code is a computer programming language consisting of binary or hexadecimal instructions

which a computer can respond to directly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a translator

A

A translator is used to translate code written in assembly language or other high level code into machine-code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the three types of translators

A

Assembler
Compiler
Interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does an assembler do

A

translate assembly language into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does an interpreter do

A

An interpreter is a type of program that translates and executes code line by line rather than compiling the entire code at once. It converts high-level programming languages into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does a compiler do

A

translate high-level language programs into object code (machine code) which can be saved and run whenever needed, without the compiler having to be present (executable file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is general purpose software

A

General purpose softwares can be used for a range of generic tasks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is special purpose software

A

Special-purpose software performs tasks for a single, specific job

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is off the shelf software (2)

A

Off-the-shelf software is software that can be purchased by lots of different customers -

they are all purchasing the same piece of specialised software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is bespoke software

A

Bespoke software is software that has been developed by programmers specifically for a particular customer to meet their exact needs and requirements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the benefits and drawbacks of off the shelf software

A

Off-the-shelf software is readily available for anyone to use

The cost is usually lower because development costs are shared among all the buyers

You have little or no control over what features there are

It may not do exactly what you want

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Definition of an API (2)

A

An application programming interface (API) is a way for two or more computer programs to communicate with each other.

It is a type of software interface, offering a service to other pieces of software.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the OS responsible for (4)
allocating processors to processes allocating memory/RAM to processes allocating I/O devices (input and output devices) to processes allocating space on storage devices to files
26
What is meant by the scheduler
The scheduler is the operating system module responsible for ensuring that processor time is used as efficiently as possible
27
How does the OS control RAM (2)
The OS allocates memory to processes and moves data into and out of RAM The OS ensures processes can only write to memory that they have been allocated
28
How does the OS carry out IO device managment (3)
Allocate I/O devices to processes manages communication between processes and I/O devices carrys out automatic installation of drivers for new I/O devices
29
How does the OS manage storage on a computer system (2)
The OS keeps track of where all files are stored on hard disk or external drives, and where space is free to be used if the user performs a save operation
30
What two things does machine code consist of
In machine code, a typical instruction holds an operation code (opcode) in the first few bits and an operand in the rest of the bits
31
What is meant by an instruction set of a computer
The instruction set of a computer is all the instructions that it can understand and execute
32
What is assembly language
is a low-level programming language that is a human-readable representation of machine code
33
What were the two major improvements made with assembly language
Each opcode was replaced by a mnemonic which gave a clue as to what the operation did The operand was replaced by a decimal (or hexadecimal) number
34
Advantages and disadvantages of assembly language compared to machine code
It is much easier to write, understand and debug programs in assembly language The assembly code has to be translated into machine code by an assembler
35
Advantages of using high level languages as opposed to low level(4)
Easier to read, write, and understand Faster to write and debug due to simpler syntax Provides abstraction from hardware details Code runs on multiple platforms with little or no modification
36
disadvantages of low level languages (2)
not portable as they are machine specific hard to write/read
37
disadvantages of high level languages (3)
slower to run as needs to be translated No direct bit control less memory and time efficient
38
What is meant by a low level language
A language that is close to the hardware
39
Advantages of low level languages (4)
Assembly language enables close manipulating of bits Executes very quickly Uses less memory than a comparable HLL version To maintain historic coding
40
What is the difference between imperative and declarative high level language
An imperative high-level language consists of commands for the computer to perform This is in contrast to a declarative language which focuses on what the program should do without listing the steps needed to achieve the result (eg SQL)
41
Explain why an intermediate language is produced at the final output by some compilers and how it is used
Instead of compiling directly to machine code (which is CPU-specific), the compiler generates an intermediate representation that can run on multiple architectures. Such as bytecode
42
What is meant by a imperative high level language
Imperative: Instructions are executed in a programmer defined sequence Instructions specify how to solve the problem Executed line by line HLL: A language that uses English-like/more meaningful keywords
43
How are HLL easier to maintain and understand? (3)
HLL allows several machine code statements to be replaced by one high level statement HLL program expressed in language that is human-oriented Able to use meaningful identifier names
44
How is assembly code translated (3)
Assembly language is translated into machine code by a program called an assembler Typically, one assembly code instruction is translated into one machine code instruction Each type of processor has its own assembly code and assembler program
45
What is source code and object code in the context of an assembler (4)
The assembly code program is the input to the assembler This is known as the source code The output is the machine code instructions produced by the assembler, called the object code The object code can be saved and run whenever needed
46
Why use assembly code and what are some of its uses (4)
Assembly code is used when a program needs to execute as fast as possible, occupy as little space as possible or manipulate individual bits and bytes Typical uses include embedded systems, real-time systems, sensors, mobile phones, device drivers and interrupt handlers
47
Difference between assembly code and assembly language
There is none, they are interchangeable
48
Can every hardware platform use the same compiler explain your answer
No Different hardware platforms need different compilers to translate the source code into the machine code that the computer understands
49
What are the the three different stages of the compilation process
lexical analysis, syntactic analysis, and semantic analysis, going through the whole program at each stage
50
Advantages of a compiler
The object code runs faster than interpreted code after compiling The object code is more secure, as machine code cannot easily be read and copied by someone wishing to modify the code and sell it as their own product
51
Describe the operations of an interpreter (5)
Interpreter analyses program on a line-by-line basis Interpreter calls subroutines within its own code to carry out commands Interpreter translates/executes program until first error is encountered Interpreter translates a program each time it is executed Interpreter executes each line immediately after translating it
52
What is bytecode
Some compilers such as the Java compiler compile the source code into an intermediate form known as bytecode
53
What is different from bytecode and source code
The bytecode file is portable, because each computer that can run Java has a JVM or Java Virtual Machine (which is itself a program) that understands bytecode and converts it into the machine code required for that particular computer
54
What is the difference between source code and object (executable) code.
source code: Human-readable code written by a programmer using a high-level language object code: Machine-readable binary code generated by a compiler
55
How is bytecode translated into machine code (5)
Additional software is used to finish the translation process (on the computer running the program) This is done by a virtual machine or a just-in-time (JIT) compiler The virtual machine will translate the bytecode by calling functions within its own code to carry out the command Each processor will have its own virtual machine The JIT compiler compiles the bytecode into machine code for the processor it is being executed on
56
Why use bytecode (4)
Enables processor independence and enhances code portability. only needs to Compile source code once; bytecode runs on multiple platforms. Generates bytecode for a standardized virtual machine. Virtual machine ensures security through pre-execution checks.
57
Describe the symbol for the OR Gate and its boolean notation
A curved shape similar to a rocket A + B
58
Describe the symbol for the AND Gate and its boolean notation
A D-shaped symbol with a flat input side and a rounded output side. A.B
59
Describe the symbol for the XOR Gate and its boolean notation
Similar to the OR gate but with an extra curved line on the input side. Circle with a plus inside it
60
Describe the symbol for the NOT Gate and its boolean notation
A small triangle with a circle at the output. A'
61
Describe the symbol for the NAND Gate
Similar to an AND gate but with a small circle (inversion bubble) on the output.
62
Describe the symbol for the NOR Gate
Similar to an OR gate but with a small circle at the output.
63
Advantages of NAND gates
Using only NAND gates to build a circuit can minimise cost of production Using as few gates as possible can speed up processing
64
Describe DE morgans law
NOT A AND NOT B = NOT( A OR B)
65
Describe DE morgans 2nd law
Inverse of the first law NOT( A OR B) = NOT A AND NOT B
66
Simplify X . 0
0
67
Simplify X . 1
X
68
Simplifty X.NOTX
0
69
What is the commutative law
States that X.Y = Y.X AND Y + X = Y + X
70
What is the associative law
States that X.(Y.Z) = Z.(X.Y)
71
What is the distributive law
States that X.(Y+Z) = X.Y + X.Z
72
What is the absorption law
States that X + (X.Y) = X
73
What is the order of precedence for booelan algebra 1-5
Brackets NOT XOR AND OR
74
What is a half adder and its boolean expression for the carry and sum
A half-adder is a circuit that performs the addition of two bits The Boolean expressions for a half adder are: S=A⊕B (XOR gate) C=A⋅B (AND gate)
75
What is a full adder
A combination of two half adders
76
What is a flip flop
A flip flop is an elemental sequential logic circuit that can store one bit and flip between two states, 0 and 1
77
What is a d type flip flop (2)
A D-type flip flop has one input called D, and two outputs Q and NOT Q It also has a Clock signal input Output of the flip flop changes when the clock pulse is at a positive/riding edge if clock value not at a rising edge then the input value is held and does not change
78
Why is the clock needed in a d type flip flop
A clock is needed to synchronise the change of state of flip flop circuits
79
What are the uses of d type flip flops (4)
D-type flip-flops are used for creating registers and counters can be used as a memory cell for the state of a single bit They are used for the intermediate storage needed during arithmetic operations Static RAM is also created using D-type flip-flops
80
Application software is made up of what two types of software
Special purpose General purpose
81
Traits of low level languages (4)
hardware can be instructed directly code is made from mnemonics programmer works with the memory directly one instruction translates to one machine code instruction
82
Describe how an operating system provides a platform for multi-tasking.
programs are loaded from secondary storage into memory programs are held in a queue by the operating system program at the front of the queue runs its code the program stops running and is moved to the back of the queue next program runs its code cycle continues with new programs joining the back of the queue multi-tasking is only possible if there is enough RAM to hold more than one program in memory at once
83
lexical analysis, syntactic analysis, and semantic analysis, What is meant by each of these
Lexical :This is the first stage of processing source code, where the program text is converted into meaningful symbols syntactic: This stage checks if the sequence of symbols follows the grammatical rules of the programming language. Semantic: This stage ensures that the program has meaningful logic and adheres to language rules beyond syntax.
84
what are the use cases for Compilers
Best for producing finished polished software for users
85
what are the use cases for interpreters
Best for testing and debugging code
86
what can be said about n full adders
n full adders are able to inut the carry bit into a subsequent adder with two brand new inputs in order to add a binary number of n bits