Computer Structure Flashcards

1
Q

Explain what a translator does.

A

A translator converts the high level program (source code) e.g python into binary (machine code).

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

Name the 2 diffrent types of translators

A

Interpreters and Compilers

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

Describe how an interpreter works

A

Interpreters translate the code line by line, if it find a error in the program it will stop running

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

Describe how a complier works

A

A compiler translates all of your high level code (source code) into machine code all at once

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

What is the advantage of using an interpreter

A

Errors are flagged after each line has been interpreted making debugging easier

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

What are the disadvantages of using an interpreter

A

Can be slow to run code as the processor needs to run the translator software and the interpreted code
You will always need the interpreter to run the code, which may not be good for software you wish to distribute.
Anyone can see (and copy!) your source code.

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

What are the advantages of using a complier

A

A program will run without needing translated any more which is good for distributing software.
A program will run much more quickly as the processor is not needing to translate the code any more.
Compiled code is difficult to reverse-engineer, so your competitors cannot just copy your source code!

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

What are the disadvantages of using a compiler

A

Debugging can be complex as errors are not reported immediately.
You will need to re-compile your code every time an error is found and corrected. This may take time with a long program.

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

Which type of translator is better for debugging/troubleshooting code

A

Interpreter

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

Which type of translator should be used prior to the release a program for sale

A

Complier

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

Give 2 reasons why it is benifical to compile program before release

A

Translator does not need to be
present to run the code
The program runs/executes faster as
it does not require further
translation
The compiled version of the program
requires less memory (RAM) to run.
It is difficult to reverse engineer the program

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

Name the 3 areas of the processor:

A

Arithmetic and Logic Unit;
Control unit;
Registers.

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

Describe the role of the Arithmetic and Logic Unit (ALU)

A

All calculations and logical decisions are handled by the ALU.

It performs all calculations
It performs comparisons on numeric values
It makes decisions based on logic (AND, OR, NOT)

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

Describe the role of the Control Unit (CU)

A

The control unit is responsible for coordinating all the activities happening in the computer that require some of the processors time. This includes:

  • fetching instructions and data from the main memory;
  • decoding instructions (sending them to the correct part of the processor);
  • executing instructions;
  • the clock signal to keep actions in time with each other;
  • responding to peripherals sending/receiving data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which part of the processor performs all calculations
It performs comparisons on numeric values
It makes decisions based on logic (AND, OR, NOT)

A

Arithmetic and Logic Unit (ALU)

17
Q

Which part of the processor performs comparisons on numeric values

A

Arithmetic and Logic Unit (ALU)

18
Q

Which part of the processor makes decisions based on logic (AND, OR, NOT)

A

Arithmetic and Logic Unit (ALU)

19
Q

Which part of the processor is responsible for fetching instructions and data from the main memory;

A

Control Unit (CU)

20
Q

Which part of the processor is responsible for decoding instructions (sending them to the correct part of the processor);

A

Control Unit (CU)

21
Q

Which part of the processor is responsible for executing instructions

A

Control Unit (CU)

22
Q

Which part of the processor is responsible for f the clock signal to keep actions in time with each other

A

Control Unit (CU)

23
Q

Which part of the processor is responsible for responding to peripherals sending/receiving data.

A

Control Unit (CU)

24
Q

Describe the registers

A

Registers are fast temporary storage locations on the processor, they store data, intructions or addresses being used by the CPU

25
Q

Which part of the processor is a fast temporary storage location

A

The registers

26
Q

Which part of the processor stores information going to be used buy the CPU

A

Registers

27
Q

What part of the process stores instructions to be processed by the CPU

A

The registers

28
Q

Describe Memory/RAM in a computer system

A

RAM is a block of storage locations connected to the processor by the data bus and address bus
It is used to store data, programs and the operating system
It is volatile meaning its contents are cleared when it has no power i.e. the computer is switched off

29
Q

Describe how memory is organised so information can be easily be retrived

A

every storage location in memory, has a unique binary address that can be used when reading data

30
Q

Describe memory is organised so a new data can be added

A

very storage location in memory, has a unique binary address that can be used when writing data

31
Q

What is the role of the Buses in a computer system

A

Buses are used to allow communication to take place between the processor and memory

32
Q

Name the 2 types of Buses

A

Data Bus and Address Bus

33
Q

Describe the address bus

A

The address bus is uni-directional (one way) it tells memory which memory location is being read from/written to

34
Q

Describe the Data Bus

A

The data bus is is bi-directional it carries data from memory to be used by the processor and carries data from the processor to be stored in memory

35
Q

Explain why the address bus is uni-directional

A

The address bus is uni-directional(one way) because the address is always sent from the processor (by the CU) to memory

36
Q

Explain why the address bus is bi-directional

A

Data travels in both directions, data is sent from the processor to memory and visa versa