Intro to comp sci chapter 5

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/122

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

123 Terms

1
New cards

What is Von Neumann architecture?

Foundation for modern computers

2
New cards

What are the four major subsystems of Von Neumann architecture?

Memory, Input/output, ALU, Control Unit

3
New cards

Where are the ALU and control unit often bundled?

Inside the CPU

4
New cards

What is memory?

Functional unit for storing/retrieving data.

5
New cards

What is Random Access Memory (RAM)?

Memory organized into cells with unique addresses.

6
New cards

What is Read-only Memory (ROM)?

Type of RAM with pre-recorded information that cannot be modified.

7
New cards

What is the cell size/memory width in memory?

Typically 8 bits.

8
New cards

What is the maximum memory size/address space?

2N, where N is the length of the address.

9
New cards

What is fetch?

Retrieve from memory (nondestructive fetch).

10
New cards

What is store?

Write to memory (destructive store).

11
New cards

What is memory access time?

Time required to fetch/store.

12
New cards

How long does modern RAM require for memory access time?

5-10 nanoseconds.

13
New cards

What does the Memory Address Register (MAR) do?

Holds memory address to access.

14
New cards

What does the Memory Data Register (MDR) do?

Receives data from fetch and holds data to be stored.

15
New cards

What are memory system circuits?

Decoder and fetch/store controller.

16
New cards

What is the function of a decoder?

Converts MAR into signal for a specific memory cell.

17
New cards

What is the difference between one-dimensional and two-dimensional memory organization?

One-dimensional is linear, while two-dimensional is grid-like.

18
New cards

What is the role of a fetch/store controller?

Acts as a traffic cop for MDR, routing data flow to/from memory cells and MDR.

19
New cards

What signal does the fetch/store controller take in?

A signal indicating fetch or store.

20
New cards

What is the relationship between RAM speeds and CPU speeds?

RAM speeds increased more slowly than CPU speeds.

21
New cards

What is cache memory?

Fast but expensive memory built into the CPU for fast access times.

22
New cards

What is the principle of locality?

Values close to recently accessed memory are more likely to be accessed. Load neighbors into cache and keep recent values there.

23
New cards

What is cache hit rate?

Percentage of times values are found in cache.

24
New cards

What is the purpose of Input/output (I/O)?

Connects the processor to the outside world

25
New cards

What are some examples of I/O devices for humans?

Keyboard, monitor, etc.

26
New cards

What are some examples of I/O devices for data storage?

Hard drive, DVD, flash drive

27
New cards

What are some examples of I/O devices for other computers?

Network

28
New cards

What is the function of RAM?

Volatile memory, lost without power

29
New cards

What are mass storage systems?

Nonvolatile memory

30
New cards

What are examples of direct access storage devices (DASDs)?

Hard drive, flash drive

31
New cards

What are examples of sequential access storage devices (SASDs)?

Tape drives, magnetic tape

32
New cards

What are DASDs?

Direct Access Storage Devices

33
New cards

What are the components of disks?

Tracks and sectors

34
New cards

What factors affect the time to retrieve data from disks?

Seek time, latency, and transfer time

35
New cards

What are examples of other nondisk DASDs?

Flash memory and solid-state drives

36
New cards

What are DASDs and SASDs?

Direct Access Storage Devices and Serial Attached SCSI Devices

37
New cards

How do DASDs and SASDs compare to RAM in terms of speed?

They are orders of magnitude slower than RAM, measured in microseconds or milliseconds.

38
New cards

What is the role of an I/O Controller?

To manage data transfer with slow I/O devices, allowing the processor to perform other tasks.

39
New cards

What happens when an I/O task is completed?

The controller sends an interrupt signal to the processor.

40
New cards

What is ALU?

Arithmetic Logic Unit, part of the processor.

41
New cards

What functions does ALU perform?

Arithmetic operations (addition, subtraction, multiplication, division), comparison, and logic operations (equality, and, or, not).

42
New cards

What are registers in ALU?

High-speed, dedicated memory connected to circuits.

43
New cards

What is data path in ALU?

The path through which information flows from registers to circuits and back to registers.

44
New cards

How is the operation to perform chosen?

Option 1: decoder signals one circuit to run.

45
New cards

How is the operation to perform chosen?

Option 2: run all circuits, multiplexer selects one output from all circuits.

46
New cards

Which option is usually chosen in practice?

Option 2 is usually chosen.

47
New cards

What is information flow?

Data movement between registers, ALU, and multiplexer.

48
New cards

What is the role of registers in information flow?

Registers receive data from outside.

49
New cards

What is the role of ALU in information flow?

ALU receives signals from registers.

50
New cards

What is the role of multiplexer in information flow?

Multiplexer selects and keeps a value, discarding the rest.

51
New cards

What happens to the result from the multiplexer in information flow?

The result goes back to the register and then to outside.

52
New cards

What is the stored program characteristic?

Programs are encoded in binary and stored in computer's memory.

53
New cards

What does the control unit do?

Fetches instructions from memory, decodes them, and executes them.

54
New cards

How are instructions encoded?

With an operation code (op code) and addresses for memory addresses/registers.

55
New cards

What is machine language?

Binary strings encoding instructions that can be executed by hardware.

56
New cards

What is an instruction set?

Instructions implemented by a specific chip or processor.

57
New cards

How do sequences of instructions encode algorithms?

By representing a series of steps to be executed by the hardware.

58
New cards

What is a Reduced Instruction Set Computer (RISC)?

Small instruction sets, highly optimized, easy hardware design.

59
New cards

What is a Complex Instruction Set Computer (CISC)?

Large instruction set, single instruction does a lot of work, complex hardware design.

60
New cards

What is the compromise between RISC and CISC in modern hardware?

A balance between simplicity and complexity in instruction sets and hardware design.

61
New cards

What is an instruction set?

A set of commands that a computer's processor can execute.

62
New cards

Give an example of a data transfer instruction.

Move data from memory to register.

63
New cards

What are arithmetic instructions used for?

Performing mathematical operations like addition and logical operations like AND.

64
New cards

What is the purpose of comparison instructions?

To compare two values.

65
New cards

What is branching in the context of instruction sets?

Changing to a nonsequential instruction.

66
New cards

What are the benefits of branching?

Enabling conditional and loop forms of execution.

67
New cards

Give an example of a branching instruction.

JUMPLT a = If previous comparison of A and B found A < B, then jump to instruction at address a.

68
New cards

What is an instruction set?

A set of commands that a computer's processor can execute.

69
New cards

Give an example of a data transfer instruction.

Move data from memory to register.

70
New cards

What are arithmetic instructions used for?

Performing mathematical operations like addition and logical operations like AND.

71
New cards

What is the purpose of comparison instructions?

To compare two values.

72
New cards

What is branching in the context of instruction sets?

Changing to a nonsequential instruction.

73
New cards

What are the benefits of branching?

Enabling conditional and loop forms of execution.

74
New cards

Give an example of a branching instruction.

JUMPLT a = If previous comparison of A and B found A < B, then jump to instruction at address a.

75
New cards

What is a Von Neumann machine?

A computer architecture that combines previous pieces.

76
New cards

What is the fetch/decode/execute phase?

A repeating cycle in a Von Neumann machine until HALT or error.

77
New cards

What is the fetch phase?

Getting the next instruction into memory.

78
New cards

What is the decode phase?

The instruction decoder retrieves the op code.

79
New cards

What is the execute phase?

The phase that varies for each instruction.

80
New cards

What happens in the fetch phase?

1. PC → MAR: Send address in PC to MAR

2. FETCH: Initiate fetch, data to MDR

3. MDR → IR: Move instruction in MDR to IR

4. PC + 1 → PC: Add one to PC

81
New cards

What happens in the decode phase?

1. IRop → instruction decoder

82
New cards

What happens in the execution phase?

Loading and storing data

83
New cards

What does LOAD X mean?

Copy data from CON(X) to R

84
New cards

What does STORE X mean?

Copy data from R to CON(X)

85
New cards

What happens in step 1 of the execution phase?

Send address X to MAR

86
New cards

What happens in step 2 of the execution phase?

Initiate fetch or send data to MDR

87
New cards

What happens in step 3 of the execution phase?

Copy data in MDR to R or initiate store of MDR to X

88
New cards

What does ADD X mean?

Perform addition operation using data in R and X, store result in R

89
New cards

What does IRaddr → MAR mean?

Send the address X to the Memory Address Register (MAR)

90
New cards

What happens during FETCH?

Initiate the fetch operation and transfer data to the Memory Data Register (MDR)

91
New cards

What does MDR → ALU mean?

Send the data in MDR to the Arithmetic Logic Unit (ALU)

92
New cards

What does R → ALU mean?

Send the data in R to the Arithmetic Logic Unit (ALU)

93
New cards

What does ADD circuit do?

Select the ADD circuit as the result of the operation

94
New cards

What does ALU → R mean?

Copy the selected result from the ALU to R

95
New cards

What does JUMP X mean?

Get the next instruction from address X

96
New cards

What does IRaddr → PC mean?

Send the address X to the Program Counter (PC)

97
New cards

What is the meaning of COMPARE X?

Comparison of X with R

98
New cards

What happens if CON(X) is greater than R?

GT is set to 1, else 0

99
New cards

What happens if CON(X) is equal to R?

EQ is set to 1, else 0

100
New cards

What happens if CON(X) is less than R?

LT is set to 1, else 0