Computer Architecture: Instruction Sets, Addressing Modes, and Control Flow

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/64

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:03 PM on 6/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

65 Terms

1
New cards

What is the objective of the lecture on Instruction Sets?

To further investigate the use of instruction sets in computer design.

2
New cards

What are the two minimal components of an instruction?

An opcode and (optionally) an operand.

3
New cards

What is addressing in the context of instruction sets?

Addressing refers to knowing where operands are located.

4
New cards

What are Address Modes?

Ways in which the bits of an address field are interpreted to find the operand.

5
New cards

Name one type of addressing mode.

Immediate Addressing, Direct Addressing, Register Addressing, Register Indirect Addressing, Indexed Addressing, Based-Indexed Addressing, Stack Addressing.

6
New cards

Describe Immediate Addressing.

The address part of the instruction contains the operand itself, allowing immediate access without extra memory reference.

7
New cards

What is Direct Addressing?

Specifying the full address directly in the instruction.

8
New cards

How does Register Addressing differ from Direct Addressing?

Register Addressing specifies a register instead of a memory location, allowing faster access.

9
New cards

What is Register Indirect Addressing?

The address is contained within a register, allowing reference to memory without hardcoding the address.

10
New cards

Explain Indexed Addressing.

Uses a register plus a constant offset to access memory.

11
New cards

What is Based-Indexed Addressing?

Finds the memory address by adding two registers plus an optional offset.

12
New cards

What is Stack Addressing?

An optimization that shortens instructions by using a stack, resulting in more efficient operations.

13
New cards

What are branching instructions?

Instructions that require addressing a target, which can be done using direct addressing or PC-relative addressing.

14
New cards

What is PC-relative addressing?

An addressing mode where a signed offset is added to the Program Counter (PC) to get the target address.

15
New cards

What is the importance of standardizing instruction formats?

It simplifies the compiler's job and allows for better optimization of addressing modes.

16
New cards

What is the significance of a 3-address machine with a 32-bit instruction format?

It supports up to 256 opcodes and allows for complex instructions with multiple source and destination registers.

<p>It supports up to 256 opcodes and allows for complex instructions with multiple source and destination registers.</p>
17
New cards

What are common types of ISA-level instructions?

Data movement instructions and dyadic operations.

18
New cards

Why do we need to move data in computer architecture?

To bring data from one part of the memory hierarchy to another, specifying source and destination.

19
New cards

What is a Dyadic Operation?

An operation that combines two operands to produce a result, such as arithmetic or Boolean operations.

20
New cards

What is the purpose of a mask in data operations?

To zero out parts of a word that are not needed, allowing extraction of specific bits.

21
New cards

How can you extract the 3rd byte from a 4-byte word using a mask?

By ANDing the original word with a mask and then shifting the result to the right.

22
New cards

What is the role of the opcode in an instruction?

To specify the operation to be performed by the instruction.

23
New cards

What does the term 'data movement' refer to?

The process of copying or moving data from one location to another in memory.

24
New cards

What is the difference between a move and a copy operation?

A move alters the original data, while a copy replicates it without affecting the original.

25
New cards

What is the significance of the Core i7 addressing modes?

It supports various modes of operation, but not all modes apply to all instructions.

26
New cards

What is the purpose of using short instructions in stack addressing?

To improve efficiency by reducing decoding time, memory access, and space used.

27
New cards

What is the opposite operation of masking?

Packing, where information from two words is combined into a single word.

28
New cards

How do you combine two higher-order bytes using masking?

Mask the unwanted bytes from each word and perform an OR operation on the results.

29
New cards

What is a monadic operation?

An operation with a single operand that produces a single result.

30
New cards

Give an example of a monadic operation.

Shifts and rotates.

31
New cards

What is the significance of the sign bit in a right shift operation?

It ensures that positive numbers remain positive and negative numbers remain negative.

32
New cards

What is a dyadic instruction?

An instruction that operates on two operands.

33
New cards

Why might we want to rewrite a dyadic operation as monadic?

To simplify the operation and potentially improve efficiency.

34
New cards

What is the purpose of comparisons in arithmetic operations?

To test conditions, such as ensuring you are not dividing by zero.

35
New cards

How can you compare a very large positive number to a very large negative number?

By subtracting the two and checking if the result is zero, but handle overflow separately.

36
New cards

What is the difference between signed and unsigned number comparisons?

They require specific instructions due to their different representations.

37
New cards

What are procedure call instructions?

Instructions that group other instructions to complete an overall task, similar to functions.

38
New cards

What do procedure call instructions need to return?

Return values to the instruction that invoked them.

39
New cards

Where can the return address of a procedure be stored?

In the first word of the procedure.

40
New cards

What issue arises with recursive procedures?

The return address may need to be stored in a different location to avoid conflicts.

41
New cards

What is the role of a condition bit in comparisons?

To record the result of a test for subsequent branching instructions.

42
New cards

What happens if you experience an overflow in a comparison?

You need to handle that case separately using a different test.

43
New cards

What is the purpose of testing data in arithmetic operations?

To ensure operations are safe and valid, such as avoiding division by zero.

44
New cards

What is the result of comparing a 3-bit unsigned number 000 with a 3-bit signed number 100?

They are considered equal in their respective contexts.

45
New cards

What is a subroutine?

Another term for a procedure that groups instructions to perform a task.

46
New cards

What happens to execution after a procedure call?

Execution continues with the result returned by the procedure.

47
New cards

What is the purpose of using a stack in recursion?

To store the return address and results.

48
New cards

What happens if a recursive procedure uses too many registers?

It can lead to stack overflow.

49
New cards

What is the role of a counter in loops?

To perform the same operation multiple times and control the loop execution.

50
New cards

What are the two types of loop tests?

Test-at-the-beginning (pretest) and test-at-the-end loops.

51
New cards

What is programmed I/O?

A scheme where the CPU directly controls I/O operations with busy waiting.

52
New cards

What is busy waiting in programmed I/O?

The CPU waits for a device to become available, blocking other instructions.

53
New cards

How does interrupt-driven I/O work?

The CPU instructs the I/O device to generate an interrupt when it is ready.

54
New cards

What is a downside of interrupt-driven I/O?

An interrupt is typically needed for each character transferred.

55
New cards

What is DMA I/O?

Direct Memory Access, where a DMA controller manages data transfers without CPU intervention.

<p>Direct Memory Access, where a DMA controller manages data transfers without CPU intervention.</p>
56
New cards

What are the four registers associated with a DMA controller?

Memory address, amount of data, device number, and read/write indicator.

57
New cards

What does flow of control refer to in computer architecture?

The sequence in which instructions are executed dynamically.

58
New cards

How does a procedure affect the flow of control?

It changes the flow and returns control to the instruction after the one that invoked it.

59
New cards

What is a trap in computer architecture?

An automatic procedure call initiated by a specific condition requiring immediate handling.

60
New cards

What is the difference between traps and interrupts?

Traps are synchronous and caused by the program, while interrupts are asynchronous and caused by external events.

61
New cards

What happens to the flow of control during a typical instruction like ADD?

It does not alter the flow; instructions continue to execute in sequence.

62
New cards

What is a branch in programming?

A change in the flow of control that alters the sequence of instruction execution.

63
New cards

What is the significance of the Core i7 architecture?

It is a 32-bit CISC machine that supports various systems.

64
New cards

How does the OMAP4430 ARM architecture differ from Core i7?

It is a 32-bit RISC architecture with fewer addressing modes, designed for efficiency.

65
New cards

What is the ATmega168 AVR known for?

It has 32 8-bit registers and is cost-effective due to its small die size.