Hardware and software - video 104 - 107 Flashcards

1
Q

what does paradigm mean in a computing context

A

to describe an example of a way of doing things

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

what languages are programs grouped into

A

-low level languages
- high level languages

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

summarise machine language

A
  • accesses the hardware directly
  • works with binary numbers representing different instructions
  • the instructions as well as the addresses in memory where data was being stored also had to be referred to as nimbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

summarise assembly language

A
  • each opcode was replaced by a mnemonic which gave a clue to what the operator was doing
  • the operand was replaced by a decimal or hexadecimal number
  • one to one relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

advantages of assembly language

A

made programming more accessible
- executes code as fast as possible
- occupies little space
- can manipulate individual bits and bytes
- used in stuff like interrupt handlers and time systems

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

why are machine language and assembly language called low level languages

A

because they are very close to the actual hardware

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

What are high-level programming languages?

A

Languages where each instruction could give rise to many lines of machine code

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

example of high level languages

A
  • FORTRAN
  • PYTHOM
  • C#
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is imperative language

A

when program code is executed one line at a time, written using sequence, selection, iteration and subroutines/procedures

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

advantages of low level language

A
  • not all low level languages need to be translated, all high level languages do
  • low level languages program are likely to use less memory when executing
  • low level languages programs may execute faster than HLL
  • low level language programs can directly interact interact with hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

disadvantages of machine/assembly language

A
  • machine dependent, code produced is very hard to port
  • finding programmers that are capable of writing efficiently in assembler is hard
  • it can be long and tedious to write
  • is very bug prone
  • the code can be difficult to understand, making it hard to modify and maintain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

things that will affect processor performance

A
  • clock speed - increasing clock speed increases the number of instructions executed per unit time
  • word length - increasing word length means the processor can handle more data per instruction
  • bus width (adress or data)- increasing the address bus size means we can address more unique memory locations
  • the number of cores linked together on a single chip
  • the amount and type of cache memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what are the roles of the address hus, data bus and main memory in the fetch part of the cycle

A
  • Adress in the MAR is sent down address bus to main memory
  • contents of address location sent down the data bus
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

why can the fetch steps occur at the same time

A

because one step does not rely on the prior completion of the other

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

when might the status register have a bit set

A

when there is an interrupt
- when there is an illegal instruction
- overflow or underflow

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

what is assembly language formally known as

A

second generation

17
Q

imperative high level languages

A
  • each instruction is basically a command to perform some step in the program
18
Q

what are high level languages

A

languages that enable programmers to think and code in terms of algorithms

19
Q

advantages of high level languages

A
  • relatively easy to learn / interpret
  • easier and faster to write a program in HLL
  • programs written in HLL are easier to debug, maintain and understand
  • programs written in HLL are machine independent, they can be run of different types of hardware
  • there are many built in library functions available in most HLL
  • different HLLs are usually written specifically for a particular class of problem
  • HLL languages may have a wider range of programming structures like loops available
20
Q

types of system software and their uses

A
  • translators - convert code into machine code
  • utility software - programs that help optimize the computer, eg virus scanners and disk drfragmenters
  • operating systems - manage all operations of the hardware, they provide a user interface
  • libraries - pre written pre tested code used to develop software
21
Q

what is software

A

programs which run on the computer

22
Q

general purpose software

A

software that can carry out many tasks

23
Q

why might someone pick a special application software over bespoke

A
  • most likely to be bug free as it has already been tester
  • lower costs and development costs are shared
24
Q

differences between interepreter and compilers

A

Execution Process:
Compiler: Converts the entire source code into machine code before execution, producing an executable file.
Interpreter: Translates and executes source code line by line, without generating an intermediate executable file.
Speed:
Compiler: Generally produces faster execution as the entire program is translated into machine code beforehand.
Interpreter: May result in slower execution since the source code is translated into machine code line by line
Compiler: Performs a thorough analysis of the entire source code before execution, detecting errors during compilation.
Interpreter: Detects errors as it executes the source code line by line, stopping execution when an error is encountered.

25
Q

advantages and uses of LLLs

A
  • closer to executable machine code than HLLs
  • easier for the computer to understand
  • they provide exact control over the CPU
  • they need less translation and lead to faster code
  • useful for computers with low specifications such as embedded systems
26
Q

what are declarative languages and examples

A
  • languages that define what is to be computed
  • SQL is an example
27
Q

why do we use LLS

A
  • higher execution speed
  • minimal object code size
  • directly access the hardware
28
Q

what is imperative language

A
  • when the programmer gives the computer a sequence of instructions to perform
29
Q

features of imperative language

A
  • includes libraries
  • uses compilers
  • a compiler may not be available for a specific processor