Lecture 3 Flashcards

1
Q

What is a machine instruction?

A

Machine instruction: An instruction (or command) encoded as a bit pattern recognizable by the CPU.

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

What is machine code?

A

Machine code is the only code that the processor understands and is:
Written in 1s and 0s (binary)
Very hard for humans to understand
Very hard to spot mistakes and to make changes
Specific to a processor

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

why will most programmers use a high level language to write their code ?

A

Written in English-like language
Easy to learn
Easy to understand, make changes and spot mistakes
Can be transferred between different types of computer
BUT processors do not understand high level languages
To solve the problem of processors not understanding high level languages, a program called a translator is used.

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

What is a translator?

A

A translator is used to convert a high level language into machine code (low level language).

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

What is an interpreter?

A

Translates one line at a time
Gives accurate error messages where the error occurs
Easier to spot/edit mistakes
BUT every time code is run you must use the interpreter

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

What is a compiler?

A

Compiles whole code in one go therefore faster than interpreter
Only needs to be compiled once and produces object code
Can be harder to spot/edit mistakes

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

Interpreter vs Compiler?

A

An interpreter is used for program development as it is easier to debug and partially test the code. Once the program is error free and complete, the program should then be compiled, as compiling only needs to be done once.

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

The 3 features of the Machine Cycle

A

Fetch
Decode
Execute

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

Describe the machine cycle?

A

1) Retrieve the next instruction from memory(as indicated by the PC) and then increment the PC
2) Decode the bit pattern in the instruction register
3) Perform the action required by the instruction in the instruction register

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

Types of communication?

A

Parallel Communication: Several communication paths transfer bits simultaneously.
Serial Communication: Bits are transferred one after the other over a single communication path.

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

Data communication rates?

A
Measurement units
Bps:  Bits per second
Kbps:  Kilo-bps (1,000 bps)
Mbps:  Mega-bps (1,000,000 bps)
Gbps:  Giga-bps (1,000,000,000 bps)
Bandwidth: Maximum available rate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is pipelining?

A

Pipelining: Overlap steps of the machine cycle

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

What is parallel Processing?

A

Parallel Processing: Use multiple processors simultaneously (I: instruction, D: data)
SISD: No parallel processing
MIMD: Different programs, different data
SIMD: Same program, different data

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