Computer Architecture -EC502- Module1 ( MAKAUT-Syllabus)


 Today, our communication elements are - Basic structure of the computer/Functional units, software, Performance Issues in Software, Machine instructions and programs, Types of instructions, Instruction Sets, Instruction format, Assembly Language, Stacks and Queues, Subroutines, Processor organization,Information representation, Number Formats.


Basic structure of the computer/Functional units: -

A computer is an electronic machine designed to process data and produce meaningful information. The original structure of the computer is arranged in several functional devices, each playing a specific role in ensuring smooth operation.

Input unit:

The input unit is responsible for feeding data and instructions into the computer. Devices such as keyboards, mice, scanners, and microphones act as input devices. They convert user information into machine-readable form.

Output Unit:

The output unit shows or distributes treated results. General output units include screens, printers, and speakers. These devices convert the binary results of the computer into a human-readable form.

Memory (storage device):

Memory stores data and instructions temporarily or permanently. The primary memory (RAM and ROM) is sharp but limited, while secondary storage (hard drives, SSDs) has large amounts of data. Cash memory provides high-speed access for often-used instructions.

Central Processing Unit (CPU):

The CPU is the brain of the computer. These are:

  • Control unit (Cu): Directs the current of data and instructions.
  • Arithmetic logic unit (ALU): Calculate and perform logical operations.
  • Register: Small, high-speed storage for instant data processing.

System bus:

A system combines all components that activate data transfer. This includes data, address, and control buses.

In summary, data composition ensures a smooth interaction between the entrance, processing, memory, and output units so that it can perform complex functions effectively.


software: -

It is a set of programs, instructions, and related data that directs a computer to perform specific functions. Unlike hardware, which refers to physical components, software is abstract and provides functionality that makes the computer useful.

Types of Software

1. System software

The system software manages and controls the hardware components on the computer, creating an environment to run the application program. This includes:

Operating system (OS): 

Works as an interface between hardware and users, handling memory, file system, and unit control. Examples: Windows, Linux, macOS.

Utility Programs:

Tool program: Accessories that perform maintenance features such as antivirus scanning, file compression, and disc cleansing of the disc.

2. Application software

The application software is designed to help users perform specific functions. This includes:

  • General application: word processor, spreadsheet, presentation equipment, and browser.
  • Special purpose: Sulle for special areas, such as accounting software, medical clinical equipment, or engineering design programmes.

3. Programming software

This type provides equipment to create new software for the programmer. This includes compiler, interpreter, assembly, and integrated development environment (IDE).

The importance of software

Software enables hardware to function effectively. Without software, hardware is useless. It simplifies complex features, automatically improves processes, increases productivity, and supports communication and entertainment.

conclusion

In summary, the software is the spine of modern data processing, reducing the difference between human needs and machine skills. Both system and application software are important for effective and targeted computer use.



Performance Issues in Software: -

Software performance involves how a program or system performs features, manages resources, and responds to users. Poor performance may cause delays, crashes, or excessive resource consumption, making the performance of software an important quality factor in development.

General Performance Problems

High response time

Slow execution or delayed reactions occur when the software takes a long time to process the user's requests. This can lead to disabled algorithms, poor coding practices, or excessive data processing.

Memory leaks

A memory leak occurs when a program uses memory without releasing it continuously. Over time, the available memory reduces and causes the system to slow down or crash.

CPU overload

Poorly adapted software may require excessive CPU usage, cause overheating, affect battery life, and dull performance on other applications.

Bad scalability

Some software works well with small amounts of data, but the data struggles to increase the volume or user load. This is often caused by weak architecture or database inhibition.

Resource

Performance drops when the input/output unit, database, or network bandwidth cannot handle the required charge.


Solutions to Performance Issues

  • Use effective algorithms and customised codes.
  • Common performance tests and profiling.
  • Proper memory handling to avoid leaks.
  • Design a scalable architecture to deal with development.
  • Disposal is often used to reduce treatment time.

conclusion

Addressing Performance Issues Ensures That The Software Is Reliable, Efficient, and user-friendly, which is important for both individual applications and large-scale systems.



Machine instructions and programs: -

A computer performs tasks through instructions, which are basic commands that tell hardware what operation to do. These instructions, written in machine language (binary code) form the basis for all computer operations.

Machine instructions

A machine instruction is a binary-coded operation that specifies:

  • Operation code (OPCODE): Defines action, such as joints, subtraction or data transfer.
  • Operand: Specify the location of data or data (in memory or register).
  • Address Mode: Defines how operands are reached (instant, direct, indirect or register mode).
  • Instructional format: The total design, which usually consists of opcode and operand fields.

For example, an instruction can ask the CPU to add two numbers to memory and save the result in a register.

Categories of machine instructions

  • Data transfer instructions: Transfer data between memory, CPU, and I/O device.
  • Arithmetic instructions: Mutical Operations (Add, Sub, MUD).
  • Logical instructions: Export comparison and logical operations (and, or not).
  • Control instructions: Change the execution sequence (jump, ring, return).
  • Input/output Instructions: Manage communication with external devices.

Programs

A program is a sequence of machine instructions that directs the computer to perform a function. Programs can be written directly in machine language, but they are usually written in high-level languages (e.g., C, Java, or Python). They are then translated into machine instructions using a compiler, collector, or interpreter.

Importance

Machine instructions and programs create bridges between hardware and user needs. Instructions provide building blocks, while the programs add them to meaningful solutions for problem-solving, automation, and system control.


Types of instructions: -

In computer architecture, instructions are given to the CPU to perform specific functions. These instructions are written in machine code but can be classified into several categories based on the operation done by them.

Data Transfer Instructions:

They transfer data between registers, memory, and input/output units. Examples include:

  • Load: Transfer data from memory to a register.
  • Save: Send data from a register to memory.
  • Move: Copy data between the registers.

Arithmetic instructions

They perform mathematical operations on data. Example:
  • Add, subtract, multiply, and divide for additions.
  • Increase/subtraction operations (e.g., ink, December).

Logical instructions

Comparison and logical decision-making are used. Example:
  • And, or, xor, and not for the bitwise operation.
  • Comparison (CMP): The guide program compares two values for the program's current.

Control (branch) instructions

These change the execution sequence. Example:
  • JAMP (JMP): Transfer control to another part of the program.
  • Call/return: Used in the execution of Sabarutin.
  • Conditional branches: Perform based on specific conditions (e.g., JZ – jump if zero).

Input/output instructions

Manage data exchange between the CPU and peripheral devices. Example:
  • In: Read data from an input unit.
  • Out: Send data to the exit device.

conclusion

By combining these types of instructions, a computer can perform complex functions. They act as building blocks, which enable smooth interactions between hardware and software.



Instruction Sets: -

An instruction is a complete collection of specified instructions that can be performed by the Central Processing Unit (CPU) on the computer. It defines the operations available for programmers, data types, address modes, and registers. Essentially, it acts as an interface between hardware and software and determines how the programs control the CPU.

Component of an instructional set

  • Opcodes: Specify the action, such as AD, Move, or Jumping.
  • Operand: Identify the data or memory placements used.
  • Addressed mode: Specify how operands are available (instant, direct, indirect, or register).
  • Instructional format: It defines how OPCA and operands in the binary are organized.

Types of instructional set

Complex Instruction Set Comp (CISC):

  • A large set of instructions; some are very complex.
  • Per program, it reduces the number of instructions but can take more cycles to perform.
  • Example: Intel X86 processor.

Low-Instruction-Set Computer Management (RISC):

  • Offers a small, highly custom set of simple instructions.
  • Each instruction works in a single cycle, improving performance.
  • Example: ARM processor.

Importance

The design of an instructional set affects computer architecture, speed, efficiency, and compiler design to a large extent. This ensures compatibility between hardware and software so that programs can run properly on a given processor.

conclusion

Instructions are the basis for CPU operations. They define the language understood by hardware and make the execution of simple commands and complex programs just as talented.


Instruction format: -

An instruction format is the layout or Structure of bits in a machine instruction. Since the CPU can only understand binary instructions, each instruction must follow a standard format that specifies the operation and specifies the data to be used. The Design of the Instruction Formats Plays An Important Role in Processor Performance and Efficiency.

Component of Instruction Format

  • OPCODE (Operation Code): Identify Operation, Such AS AD, Load, or Jump.
  • Operand (s): Specify the location of the data or the location of the data.
  • Addressing Mode: This Defines How The Operand Is Accessed (Eg, Direct, Indirect, or Immediate).
  • Instructions Length: Total Number of Bits Used for Instructions. This can be decided (RISC) or Char (CISC).


Types of instructions

  • ZERO-ADDRESS INSTRUCTIONS: Work on an underlying stack. Example: Push, pop.
  • One-address instruction: use a single operand, which often involves an accumulator. Example: Load A.
  • Two-Address Instructions: Two Operands Are Required, One of Which Usually Stores The Result. Example: Add A, b.
  • Three-Address Instructions: Use Three Operands-Two Sources and A Destination. Example: A, B, C. Add

Importance

The Option of Instruction Format Affects Memory Use, Execution Speed, and Hardware Complexity. While the fixed-length Format Instructions of Fixed-Length simplify decoding, Variable-Length Format Provides Flexibility and Compactness.

conclusion

Instructions serve AS A Blueprint for Communication Between Software and Hardware. They Ensure That The CPU Interprets and Executes the Instructions Correctly and Efficiently.




Assembly Language: -

The Assembly Language is a low-level programming language that provides a symbolic representation of a computer's machine instructions. There is a bridge between the gap between binary machine code and high-level programming language by using mnemonics (symbols or abbreviations) for representations.

Features of Assembly Language

  • Mnemonic for instructions: For Example, instead of Writing Binary Opcode, Add Extra to Data Transfer.
  • Opens and Labels: Opens Register, Memory Location or Constant Specify, while Labels are used for program Control (Eg, Loops, Jumps).
  • Mounting: A special program called an assembler is used to translate the assembly language instructions into machine code that the CPU can execute.
  • Hardware Specificity: The Assembly is processor-dependent, which means that the programs written for one CPU architecture cannot run on another.

Advantage

  • Provide Direct Control over hardware.
  • Causes a highly efficient and fixed program.
  • Useful for System Programming, Such AS Operating System, Device Driver, and Embedded System.

Disadvantages

  • It is difficult to learn and write compared to high-level languages.
  • The programs are long and difficult to troubleshoot.
  • Lack of portability across different processors.

Example

MOV A, 5    ; Load value 5 into register A  
ADD A, B    ; Add contents of register B to A  

conclusion

The mounting language provides more readability than the Raw Machine code, and maintains hardware-level control. Although not used for general applications in general today, it is important to understand performance feeding features, built-in systems, and computer architecture.



Stacks and Queues: -

Stacks and queues are two important linear data structures that are used effectively in informatics for the organization and management of data. Both elements follow specific rules for inserting and removing.

Stack

A stack is a data structure that follows the LIFO (Last In, First Out) Theory. This means that the last element is the first to be removed.

Basic Operations:

  • Push: Insert an item in the stack.
  • POP: Remove the top element from the pile.
  • Peek (top): Look at the top element without removing it.

Application:

  • Expressive evaluation and conversion (Infix to PostFix).
  • Functional access administration in programming.
  • Fabric in text editors.

Queue

A queue is a data structure that follows the FIFO (first-in, first-out) theory. The first item inserted is removed.

Basic Operations:

  • Request: Put an item in the back end.
  • DEQUEUE: Remove an item from the front end.
  • Front/rear: items that reach the ends without removing them.

Types of queues:

  • Simple queues: Basic FIFO structure.
  • Circular queue: The final position already returns.
  • Priority queue: Elements are served on a priority basis, not the situation.
  • Double queue: insertion and deletion at both ends.

Application:

  • Planning work in the operating system.
  • Management of requests in printers or networks.
  • After the real-world queue (eg, ticket disk).

conclusion

Stacks and queues provide systematic methods for managing data. While the stacks are useful for reversing or retreat, the queues are ideal for working, planning, and resource sharing.



Subroutines: -

A subroutine is a code block designed to perform a specific function in a large program. Mange ganger i stedet for å skrive det samme settet med instruksjoner, kan en programmerer plassere dem i en underrunnel og kalle det nar det er nødvendig. Depending on the programming language, subtleties are also called procedures, functions, or methods.

Features of Subroutines:

  • Re-purpose: Code Can Be Written Once and Can Be Reused Many Times.
  • Modularity: Programs are divided into small, manageable classes.
  • Parameter: Input values can be sent to subscribe to adapt the operation.
  • Return value: Some subtleties return as a result of conversation programs.

Types of substrates

  • Processes: Work, but cannot return values.
  • Work: Work and Return the Result.
  • Rejuvenated Sabarutin: A subrutin that calls itself until the base position is complicated.

Advantage

  • The code reduces repetition.
  • The Program Improves Readability and Debugging.
  • Make programs easier to test and maintain.

Example

FUNCTION Square(x)  
   RETURN x * x  
END FUNCTION  

CALL Square(5)   ; Returns 25  

Application

  • Mathematical calculation.
  • String manipulation.
  • Input/output operations.
  • Handling repetitive tasks in large programs.

conclusion

The Sabautin program improves efficiency, readability, and structure. By enabling modular programming, they allow complex problems to be broken into simpler parts, making software development more Organized and effective.



Processor organization: -


The processor organization refers to the internal structure and arrangement of the Central Processing Unit (CPU) of the computer. It is related to the fact that various functional units, such as arithmetic logic units (ALU), control units, registers, and connections, are designed and coordinated to provide effective instructions. To analyze performance and system design, it is necessary to understand the processor organization.

It is the register in the origin of the processor organization, which is a small, high-speed storage element used for temporary data storage and instruction execution. The register for performing arithmetic and logical operations interacts with alu. The control unit (CU) manages sequencing operations by obtaining instructions from the memory, decoding them, and issuing control signals to correct the flow of data between components.

An arithmetic logic unit (ALU) performs basic calculations such as addition, subtraction, logical comparison, and bitwise operations. The instruction set architecture (ISA) also defines operations that the processor can perform.

The processor often involves buses for data, addresses, and controls, connecting different devices. Data paths determine how information goes on information between memory, registers, and the ALU. Modern processors also employ techniques such as pipelining, equality, and discarding to increase the speed of execution.

The organization can be classified into one-core, multi-core, and super-canal processors, each designed to handle the growing charge. Effective processor organization ensures rapid instructional design, adapted memory use, and better system performance.

In summary, processor organization integrates hardware units and control mechanisms to organize programs systematically and effectively.

Information representation: -


Information representation refers to the methods used to coded data and instructions in a computer system for effectively stored, processed and communicate. Since computers are powered by binary digits (0S and 1S), all types of information - either numbers, text, image or audio - are finally represented in binary format.

Numerical representation is basic. Integers are stored in the binary bits, which use a certain number of bits. Signed numbers can be represented by using Sign Magnette, 1 complement or a maximum of 2 complement, which simplifies arithmetic operations. According to standards such as IEEE-754, fractions and real numbers are stored using liquid point representation, which balances the range and accuracy.

Grading representation is achieved through coding schemes. The ASCII code represents the English characters using 7 or 8 bits, while Unicode expands it to represent many languages and symbols, which are widely used in modern systems.

Lessons, images, and sound are represented using specific coding techniques. For example, images are represented as a collection of pixels, each with a binary value indicating color or intensity, while the sound is represented by samples and a review of sound waves in binary form.

Logical data is displayed using single pieces (0 for 0, 1 for 1). More complex data types in programming (matrices, structures, objects) are created on these basic binary representations.

In summary, information representation provides a standardized method for encoding a variety of data to secure hardware, software, and accurate communication between users.




Number Formats: -

In computer systems, the number format defines how numerical values are represented and stored in binary. Since computers only use 0s and 1s, calculations require special coding methods for integers, fractions, and real numbers to ensure accuracy and efficiency.

1. Integer representation:

The unconscious integer is stored as simple binary values. For signed integers, different schemes are used:
  • Sign-magnitude: The most important bit (MSB) represents the signal (0 for positive, 1 for negative).
  • 1’s Complement: Negative numbers are formed by inverting all pieces of positive numbers.
  • 2’s Complement: The most commonly used format, where negative numbers are formed by inverting all bits and adding 1. It simplifies arithmetic operations and avoids many representations of zero.

2. Fixed point representation:

Figures are represented with a certain number of pieces for integers and partial parts. It is suitable for applications that require estimated accuracy, but limited accuracy, such as built-in systems.

3. Liquid Point Representation:

Used for very large or very small real numbers, the IEEE-754 standard follows. A floating-point number is divided into three regions: character bits, exponent, and mantissa (fraction). It provides a wide range and accuracy, but requires more complex hardware.

4. Other format:

  • Binary-coded decimal (BCD): Each decimal digit is depicted separately in the binary.
  • Hexadecimal and octal: Used as short-term notation for binary, making representation compact and readable.
Finally, number formats are necessary for accurate data storage, effective arithmetic, and reliable processing in computer systems.





-------------------------------------------MODULE-2 NEXTPAGE-------------------------------------------


No comments:

Post a Comment