Study Notes on Computer Organisation and Architecture
Computer Organisation and Architecture
Introduction to Computer Architecture
- Course Classification: This course is under “Computer Hardware.” Mastery of both hardware and software is important for efficiency.
- Better software development occurs with hardware understanding.
- Improved hardware design results from knowledge of the executing software.
- A comprehensive computing system is designed when both aspects are understood.
- Focus is on the hardware/software interface and microarchitecture, emphasizing tradeoffs affecting software.
Introduction
- Discussion on data feeding and processing in a computer system.
- Overview of data transfer from external devices to the CPU and memory.
What is a Computer?
- Definition: A computer is a general-purpose device programmed to process information and yield meaningful results.
How Does it Work?
- Program: List of instructions provided to the computer.
- Information Store: Data types include data, images, files, and videos.
- The computer processes the information according to the program's instructions, resulting in outputs.
What Does a Computer Look Like?
- Components: A desktop computer consists of:
Memory and Hard Disk
- Memory: Stores programs and data; contents are destroyed when powered off.
- Hard Disk: Stores programs and data permanently.
Full System Configuration
- Components of a Full System: Memory, Hard Disk, Keyboard, Mouse, Monitor, Printer.
How to Instruct a Computer?
- Write a program in a high-level language (e.g., C, C++, Java).
- Compile the program into an executable format.
- Execute the program leading to output.
What Can a Computer Understand?
- Computers cannot understand complex instructions directly like matrix multiplication or pathfinding.
- They comprehend simple arithmetic instructions such as addition and multiplication.
The Language of Instructions
- Human Language: Can understand complex sentences.
- Computer Language: Only understands simple instructions.
- Instruction Set Architecture (ISA): The semantics around the instructions, their operands, and interfaces with peripheral devices.
Computer Architecture and Organisation
- Computer Architecture: Basic design and structure of a computer system, detailing how components (CPU, memory, I/O devices) work together to perform tasks, run programs, and process data.
- Computer Organization: Describes how the parts (CPU, memory, I/O devices, control units) interconnect and function to complete tasks efficiently.
Issues in Computer Design
- Structure and Function: Designers are concerned with how components communicate and their functionalities.
- Key Issues:
- Assumption of Infinite Speed: Assumption is impractical and leads to design issues.
- Assumption of Infinite Memory: Storage is finite, which complicates designs.
- Speed Mismatch: Performance may suffer if CPU and memory speeds do not align.
- Handling Bugs and Errors: Crucial for system reliability.
- Multiple Processors: Complexity in management and design due to multiple processors.
- Multiple Threads: Necessitates multitasking capability.
- Shared Memory: Requires careful management to prevent collisions among processes.
- Disk Access: Management conflicts can arise with multiple disk access.
- Performance Goals: Continuous optimization of systems for better performance.
- Power Consumption: Need for energy-efficient designs to mitigate environmental impact.
- Security: Ensuring data protection through encryption and authentication.
- Compatibility: Different devices must ensure interoperation.
- User Experience: A focus on intuitive design.
- Reliability: Creating systems that work consistently without failure.
Computer System Level Hierarchy
- Consists of seven levels that connect the computer to the user and facilitate computing activities:
- Level-0: Digital Logic.
- Level-1: Control (microcode level).
- Level-2: Machines (hardware).
- Level-3: System Software (OS, library code).
- Level-4: Assembly Language (machine understandable).
- Level-5: High-Level Language (C++, Java).
- Level-6: Users and Executable Programs.
Features of Computer System Level Hierarchy
- Abstraction: Each level presents abstraction from hardware, aiding software development.
- Modularity: Levels can be developed independently, enhancing maintenance.
- Interoperability: Levels work together to facilitate application execution.
- Scalability: Flexible integration of new functions and components.
- Security: Layered design to mitigate risks of breaches.
Advantages of the Computer System Level Hierarchy
- Modularity: Easier testing and maintenance of components.
- Standardization: Simplifies new component integration.
- Abstraction: Higher interaction levels with lesser complexity.
- Scalability: Efficiently handling increased workloads.
Disadvantages of Computer System Level Hierarchy
- Overhead: Increased complexity and potential performance reduction.
- Dependencies: Changes in one layer can affect others.
- Inefficiency: Resource optimization challenges across levels.
- Complexity: Navigational difficulties with growing components.
Definition of Computer Architecture and Organisation
- The design, selection, and interconnection of hardware components along with the hardware/software interface to create a functional computing system.
Why Study Computer Architecture?
- To build better systems that are faster, more reliable, and cheaper.
- To enable new applications and innovations in software.
- To facilitate improved problem-solving capabilities.
Computer Architecture Today
- The industry is in a paradigm shift towards multi-core designs.
- Challenges include power constraints, design complexity, and technology scaling.
Evolution of Computer Systems
- First Generation: Vacuum tubes.
- Second Generation: Transistors.
- Third Generation: Integrated Circuits.
- Fourth Generation: Microprocessors.
- Fifth Generation: Parallel and intelligent systems.
Numbering Systems and Binary Arithmetic
- Familiarity with the decimal system (Base 10) is common.
- Other systems include:
- Binary (Base 2)
- Octal (Base 8)
- Hexadecimal (Base 16)
Characteristics of Numbering Systems
- Consecutive digits.
- Number of digits equals the base size.
- Zero is always the first digit.
- Base number is not a digit.
- Addition results in a carry when exceeding the largest digit.
- Values depend on positional markers.
Significant Digits in Number Systems
- Examples:
- Binary: 11101101 (most significant bit is 1, least significant is 1)
- Hexadecimal: 1D63A7A (most significant is 1, least significant is A)
Binary Number System
- Base 2: Models electrical signals for computers.
- 0 represents no voltage (off state).
- 1 represents the presence of voltage (on state).
Binary Numbering Scale
- Conversion Table:
- | Binary | Decimal | Power | Position |
| --- | --- | --- | --- |
| 000 | 0 | $2^0$ | 1 |
| 001 | 1 | $2^1$ | 2 |
| 010 | 2 | $2^2$ | 4 |
| 011 | 3 | $2^3$ | 8 |
| 100 | 4 | $2^4$ | 16 |
| 101 | 5 | $2^5$ | 32 |
| 110 | 6 | $2^6$ | 64 |
| 111 | 7 | $2^7$ | 128 |
Decimal to Binary Conversion Method
- Division Algorithm: Repeatedly divide the decimal by 2 to create binary digits.
- Example for converting 67:
- $67 \, (Decimal)
ightarrow 33 \, R1$ - $33
ightarrow 16 \, R1$ - $16
ightarrow 8 \, R0$ - $8
ightarrow 4 \, R0$ - $4
ightarrow 2 \, R0$ - $2
ightarrow 1 \, R0$ - $1
ightarrow 0 \, R1$
- Results in binary: 1000012.
Binary to Decimal Conversion Method
- Multiplication Algorithm: Each binary digit multiplied by increasing powers of two.
- Example for (10101101)₂:
- Products: $128 + 32 + 8 + 4 + 1 = 173 \,(Decimal)$.
Octal Number System
- Base 8 system, uses digits 0-7.
- Conversion with groups of three binary digits.
Hexadecimal Number System
- Base 16 system using digits 0-9 and letters A-F.
- Conversion with groups of four binary digits.
Conversion Methods between Bases
- Decimal to Hexadecimal: Use division algorithm.
- Example: Convert 830₁₀ to hexadecimal:
- $830 / 16 = 51 \,(R14)$, etc.
- Hexadecimal to Decimal: Multiply by respective powers of 16.
- Example: Convert 3B4F₁₆:
- $3 \times 16^3 + B \times 16^2 + 4 \times 16^1 + F \times 16^0 = 12288 + 2816 + 64 + 15 = 15183₁₀$.
Binary to Hexadecimal Conversion
- Each hex digit maps onto 4 binary digits (nibble).
- Conversion Example: 3AB2 to binary results in 0011 1010 1011 0010.
Logic Gates and Functions
- Logic Gate: Fundamental of a digital circuit, typically two inputs, one output.
- Basic Logic Gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR.
Truth Tables
- Used to demonstrate functions of logic gates, listing inputs and corresponding outputs.
Types of Computer Architecture
- Von-Neumann Architecture: Single read/write memory for both data and instructions, facilitates bus communication between components.
- Harvard Architecture: Separate memory blocks for instruction and data with specific coding and address spaces, enabling parallel operations.
- Instruction Set Architecture (ISA): Defines a set of commands the CPU can understand, promoting RISC and CISC instruction models.
- Microarchitecture: Implementation specifics of ISA in processors, varying with technology advancements.
- System Design: Ensures user specifications are met through modular, standardized approaches in hardware/software.
I/O Devices and Peripherals
- Types of Peripherals: Input, output, and input-output devices.
- Common Input Devices: Keyboard, mouse.
- Output Devices: Printers, monitors.
- Storage Devices: Magnetic disks and tapes represent data.
- Keyboard: Sends binary coded characters (typically ASCII coded) to the computer.
- Monitors: Display the interface for user interaction.
- Printers: Produce hard copies of outputs (impact and non-impact).
I/O Interface
- Exchange data between peripherals and internal storage.
- Reasons for the interface:
- Different modes of operation for peripherals vs. CPU.
- Peripherally slower data transfer rate than CPU.
- Diverse data formats between peripherals and CPU/memory.
Main Functions of I/O Interface
- Data Conversion: Between analog and digital signals.
- Synchronization: Aligning speeds of devices.
- Device Selection: Manage queueing of devices by the CPU.
Different I/O Techniques
- Programmed I/O: Directly involves CPU interaction—status checking until task completion.
- Interrupt-Driven I/O: Allows CPU to execute other programs while waiting for I/O completion signals.
- Direct Memory Access (DMA): Enables data transfers directly between peripheral and memory without CPU constant engagement.
Summary of I/O Processing
- Three main techniques: Programmed I/O, Interrupt-Driven I/O, Direct Memory Access.
- Programmed I/O involves CPU waiting; Interrupt-Driven allows concurrent processing; DMA facilitates high-speed data transfers without CPU involvement.
Check Your Progress and Key Points
- Identify types of peripherals.
- Understand roles and functionalities of I/O interfaces.
- Review the I/O techniques for effective communication and data management.
Answers to Progress Checks
- Fill in blanks and true/false questions related to the I/O concepts and functionality, ensuring comprehension of the discussions throughout the lessons.