Computer Architecture : Practicals

Practical No. 2

Title: To Perform Binary Arithmetic Operations

Aim

To understand and perform fundamental binary arithmetic operations, specifically binary addition and binary subtraction, and to apply complement methods for subtraction.

Introduction

Binary arithmetic is the foundation of all computations performed by a digital computer’s Central Processing Unit (CPU). Every mathematical operation, no matter how complex, is ultimately reduced to basic binary additions and subtractions.

This practical covers:

·         Binary addition

·         Binary subtraction

·         Subtraction using 1’s complement and 2’s complement methods

These methods are widely used in digital circuits because of their simplicity and efficiency.

Procedure / Examples

Example 1: Binary Addition
Add 101
and 011:

   1 1   ← Carry
   1 0 1
 + 0 1 1
 ——–
  1 0 0 0

So, 101 + 011 = 1000.

Example 2: Binary Subtraction
Subtract 011
from 101:

   1 0 1
 - 0 1 1
 ——–
   0 1 0

So, 101 011 = 010.

Example 3: Binary Subtraction (2’s Complement Method, 4-bit)

·         Minuend = 0101

·         Subtrahend = 0011

·         1’s complement of subtrahend = 1100

·         2’s complement = 1100 + 1 = 1101

Now add:

   0101
 + 1101
 --------
  10010

Discard the final carry → Result = 0010.

Result / Conclusion

This practical demonstrated binary addition and subtraction along with complement methods. The use of 1’s and 2’s complement provides an efficient way to perform subtraction in digital systems. Mastering these operations is essential for understanding how a CPU processes data in computer architecture.