Docsity

Computer communication theory notes, Lecture notes of Computer Science

Toggle sidebar
bg1
Detailed Lecture Notes for CIT 120 – Week 3: Computer Arithmetic
Duration: 4 Hours
Topic: Computer Arithmetic (Addition, Multiplication, Booth’s Algorithm)
Lab Activity: Hands-on Arithmetic Operations
Session Structure
1. Recap & Introduction (20 mins)
2. Binary Addition (1 hour)
3. Binary Multiplication (1 hour)
4. Booth’s Algorithm (1.5 hours)
5. Lab Exercises & Review (1 hour)
1. Recap & Introduction (20 mins)
Objective: Link Week 2 (Data Representation) to Week 3.
Quick Quiz (5 mins):
o Convert decimal 15 to binary and hexadecimal.
o What is the IEEE 754 representation of 0.75?
Key Points:
o Explain how binary arithmetic underpins ALU operations in CPUs (ties to
Week 4).
o Highlight real-world applications: CPU performance, gaming hardware,
cryptography.
2. Binary Addition (1 hour)
Objective: Master binary addition and carry propagation.
Lecture (15 mins):
o Rules of binary
addition: 0+0=00+0=0, 0+1=10+1=1, 1+1=101+1=10 (carry 1).
o Example: 11012+10112=11000211012+10112=110002.
o Overflow detection in fixed-bit systems.
pf3
pf4

Partial preview of the text

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

Detailed Lecture Notes for CIT 120 – Week 3: Computer Arithmetic Duration: 4 Hours Topic: Computer Arithmetic (Addition, Multiplication, Booth’s Algorithm) Lab Activity: Hands-on Arithmetic Operations

Session Structure

  1. Recap & Introduction (20 mins)
  2. Binary Addition (1 hour)
  3. Binary Multiplication (1 hour)
  4. Booth’s Algorithm (1.5 hours)
  5. Lab Exercises & Review (1 hour)

1. Recap & Introduction (20 mins)

Objective: Link Week 2 (Data Representation) to Week 3.  Quick Quiz (5 mins): o Convert decimal 15 to binary and hexadecimal. o What is the IEEE 754 representation of 0.75?  Key Points: o Explain how binary arithmetic underpins ALU operations in CPUs (ties to Week 4). o Highlight real-world applications: CPU performance, gaming hardware, cryptography.

2. Binary Addition (1 hour)

Objective: Master binary addition and carry propagation.  Lecture (15 mins): o Rules of binary

addition: 0+0=0 0 + 0 = 0 , 0+1=1 0 + 1 = 1 , 1+1=10 1 + 1 = 10 (carry 1).

o Example: 11012+10112=110002 11012 + 10112 = 110002.

o Overflow detection in fixed-bit systems.

Activity 1 – Pair Work (20 mins):

o Solve: 101012+11102 101012 + 11102 , 11112+11112 11112 + 11112.

o Discuss overflow in 4-bit systems.  Live Demo (10 mins): o Use an online binary calculator (e.g., RapidTables) to verify answers.  Q&A (15 mins): o Address common errors (e.g., missing carries).

3. Binary Multiplication (1 hour)

Objective: Perform binary multiplication and compare it to decimal.  Lecture (15 mins): o Method: Shift-and-add (similar to decimal multiplication).

o Example: 1012×112=11112 1012 × 112 = 11112.

o Limitations: Inefficient for large numbers/signed integers.  Activity 2 – Group Competition (25 mins):

o Race to solve 11012×1012 11012 × 1012. Fastest correct group wins a

small prize.  Discussion (10 mins): o Why is binary multiplication time-consuming? How do CPUs optimize this?

4. Booth’s Algorithm (1.5 hours)

Objective: Apply Booth’s Algorithm for signed integer multiplication.  Lecture (20 mins): o Why Booth’s? Efficient for signed numbers, reduces multiplication steps. o Algorithm Steps:

  1. Initialize registers (Multiplicand, Multiplier, Product).
  2. Check multiplier LSB and previous bit.
  3. Add, subtract, or shift based on the pair.

o Example: Multiply −310−3 10 (1101₂) by 210210 (0010₂).

Step-by-Step Demo (25 mins):

o Use a whiteboard to solve 01112×00112 01112 × 00112 (7 × 3).

Stallings Textbook: Chapter 4 (Computer Arithmetic).  Patterson & Hennessy: Section 3.3 (ALU Design). End of Session: Remind students to complete the post-lab reflection (e.g., "What surprised you about Booth’s Algorithm?").