Docsity

Computer communication theory notes, Lecture notes of Computer Security

Toggle sidebar
bg1
Detailed Lecture Notes for Week 4: CPU Architecture & Instruction Set
Duration: 4 Hours
Subtopics: CPU Components, Addressing Modes
Activity: Assembly Language Exercises
Hour 1: Introduction to CPU Components
Objective: Understand the core components of a CPU and their roles.
1. Interactive Lecture (30 mins)
o Key Components:
ALU (Arithmetic Logic Unit): Performs arithmetic and logical
operations.
Control Unit (CU): Fetches, decodes, and executes instructions.
Registers: Small, fast storage (e.g., Program Counter, Instruction
Register).
Bus System: Data, address, and control buses.
o Visual Aids: Use diagrams (e.g., Von Neumann vs. Harvard Architecture)
and animations to explain data flow.
o Real-World Analogy: Compare CPU components to a "factory" (ALU as
workers, CU as manager, registers as conveyor belts).
2. Engagement Activity: Quick Quiz (15 mins)
o Use Kahoot! or Mentimeter for a 5-question quiz (e.g., "What does the
ALU do?").
o Discuss answers and clarify misconceptions.
3. Think-Pair-Share (15 mins)
o Prompt: "How do CPU components collaborate to execute an
instruction?"
o Students discuss in pairs, then share responses. Summarize with a
flowchart.
Hour 2: Instruction Set Architecture (ISA) & Addressing Modes
Objective: Explain ISA types and demonstrate addressing modes.
1. Lecture: ISA Basics (20 mins)
pf3

Partial preview of the text

Download Computer communication theory notes and more Lecture notes Computer Security in PDF only on Docsity!

Detailed Lecture Notes for Week 4: CPU Architecture & Instruction Set Duration: 4 Hours Subtopics: CPU Components, Addressing Modes Activity: Assembly Language Exercises

Hour 1: Introduction to CPU Components

Objective: Understand the core components of a CPU and their roles.

  1. Interactive Lecture (30 mins) o Key Components:ALU (Arithmetic Logic Unit): Performs arithmetic and logical operations.  Control Unit (CU): Fetches, decodes, and executes instructions.  Registers: Small, fast storage (e.g., Program Counter, Instruction Register).  Bus System: Data, address, and control buses. o Visual Aids: Use diagrams (e.g., Von Neumann vs. Harvard Architecture) and animations to explain data flow. o Real-World Analogy: Compare CPU components to a "factory" (ALU as workers, CU as manager, registers as conveyor belts).
  2. Engagement Activity: Quick Quiz (15 mins) o Use Kahoot! or Mentimeter for a 5-question quiz (e.g., "What does the ALU do?"). o Discuss answers and clarify misconceptions.
  3. Think-Pair-Share (15 mins) o Prompt: "How do CPU components collaborate to execute an instruction?" o Students discuss in pairs, then share responses. Summarize with a flowchart.

Hour 2: Instruction Set Architecture (ISA) & Addressing Modes

Objective: Explain ISA types and demonstrate addressing modes.

  1. Lecture: ISA Basics (20 mins)

o Types of Instructions: Data transfer (e.g., MOV), arithmetic (e.g., ADD), control (e.g., JUMP). o RISC vs. CISC: Brief comparison (details in Week 9).

  1. Addressing Modes Deep Dive (25 mins) o Modes Covered: Immediate, Direct, Indirect, Register, Indexed. o Examples: Use MIPS assembly (via MARS simulator):  Immediate: addi $t0, $t1, 5  Indirect: lw $t0, ($t1) o Live Coding Demo: Show how each mode affects register/memory.
  2. Interactive Exercise: Mode Identification (15 mins) o Display code snippets. Students identify addressing modes on whiteboards.

Hour 3: Guided Assembly Language Exercises

Objective: Apply addressing modes in practical coding.

  1. Setup (10 mins) o Distribute lab manuals. Ensure MARS or SPIM is installed.
  2. Step-by-Step Coding (25 mins) o Task 1: Write a program to add two numbers using immediate and register addressing. o Task 2: Swap values in memory using indirect addressing. o Instructor walks through Task 1; students attempt Task 2 in pairs.
  3. Debugging Challenge (25 mins) o Provide a buggy code snippet (e.g., incorrect addressing mode). o Groups compete to fix it fastest. Winner presents their solution.

Hour 4: Group Projects & Presentations

Objective: Reinforce concepts through collaborative problem-solving.

  1. Group Activity: Design a Mini-Program (30 mins) o Scenario: "Create a program that calculates factorial using at least 3 addressing modes." o Groups draft code on paper or whiteboards.