midterm 2 Flashcards

1
Q

Name 3 different parts of the CPU

A

Program Counter
Control Unit
ALU(Arithmetic and Logic Unit)

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

How is the ALU different from the Control Unit?

A

The ALU performs the math of the program.. Performs actual computation during the Instruction Execute cycle of the F/E Cycle.

It lets the computer’s other units know how to respond to instructions received from a program.

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

What are the 5 parts of the Fetch/Execute cycle?

A
  1. Instruction Fetch (IF)
  2. Instruction Decode(ID)
  3. Data Fetch(DF)
  4. Executed Instruction (EI)
  5. Result Return
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What information foes the PC (Program Counter) keep?

A

keeps an address that has an instruction that is to be executed NEXT

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

How many bytes can a jump/branch instruction modify a PC?

A

4 bytes. Each instruction requires 4 bytes of memory.

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

What does Instruction Fetch do?

A

The instruction held by the program counter is fetched and loaded from the RAM to be executed.

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

What does the Instruction Decode do?

A

The CPU’s decoder reads the bits from the instruction and places its parts in the right compartments for their immediate processing.

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

What does the Data Fetch do?

A

The Control Unit will analyze the “operands” bits within the instruction and decide whether it should FETCH the data from memory (indirection), or COPY the values directly into the ALU’s operands cells.

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

What does the Execute Instruction and Return Result do?

A

The ALU will execute the instruction, and copy the resulting value into the instruction’s return-to value (in memory)

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

What is an algorithm?

A

A precise, systematic method to produce a

specified result

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

What is an expression?

A

An expression happens on the RIGHT side of the ASSIGNMENT and it’s going to be evaluated following the same precedence mathematical rules.

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

How many bits are in a byte?

A

8

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

If an instruction is 32­bit long, how many instructions can you fit in a 64 bytes memory block?

A

16 instructions in 64 bytes of memory
1 byte = 8bits
1 instruction= 4 bytes
(64*8)/32=16

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

How many bytes would the CPU’s PC move if it skips 7 instructions ahead of the current one?

A

28 bytes

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

What is an instruction? What are its main parts?

A

An instruction is an operation of a processor. It consists of three parts:.
opcode(operation - + * /), address where to receive two operands, return address

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

What is an expression?

A

Everything to the right of the equals sign. It assigns a value to whatever is on the left