midterm 2 Flashcards
Name 3 different parts of the CPU
Program Counter
Control Unit
ALU(Arithmetic and Logic Unit)
How is the ALU different from the Control Unit?
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.
What are the 5 parts of the Fetch/Execute cycle?
- Instruction Fetch (IF)
- Instruction Decode(ID)
- Data Fetch(DF)
- Executed Instruction (EI)
- Result Return
What information foes the PC (Program Counter) keep?
keeps an address that has an instruction that is to be executed NEXT
How many bytes can a jump/branch instruction modify a PC?
4 bytes. Each instruction requires 4 bytes of memory.
What does Instruction Fetch do?
The instruction held by the program counter is fetched and loaded from the RAM to be executed.
What does the Instruction Decode do?
The CPU’s decoder reads the bits from the instruction and places its parts in the right compartments for their immediate processing.
What does the Data Fetch do?
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.
What does the Execute Instruction and Return Result do?
The ALU will execute the instruction, and copy the resulting value into the instruction’s return-to value (in memory)
What is an algorithm?
A precise, systematic method to produce a
specified result
What is an expression?
An expression happens on the RIGHT side of the ASSIGNMENT and it’s going to be evaluated following the same precedence mathematical rules.
How many bits are in a byte?
8
If an instruction is 32bit long, how many instructions can you fit in a 64 bytes memory block?
16 instructions in 64 bytes of memory
1 byte = 8bits
1 instruction= 4 bytes
(64*8)/32=16
How many bytes would the CPU’s PC move if it skips 7 instructions ahead of the current one?
28 bytes
What is an instruction? What are its main parts?
An instruction is an operation of a processor. It consists of three parts:.
opcode(operation - + * /), address where to receive two operands, return address