The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

The goal of this e-book is to introduce readers to computer architecture and computer organization by explaining how computer systems are constructed, and how their parts work cooperatively to process information efficiently

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by arfidzul, 2026-02-23 02:16:17

Introduction To Computer Architecture

The goal of this e-book is to introduce readers to computer architecture and computer organization by explaining how computer systems are constructed, and how their parts work cooperatively to process information efficiently

Keywords: Computer,Architecture

Copyright ©2026Published By:POLITEKNIK MUKAH KM7.5 JALAN OYA 96400MUKAH, SARAWAKNo Tel: +6084-874001Fax: +6084-874005Website: https://www.pmu.mypolycc.edu.myIntroduction To Computer ArchitectureAuthor: Arfidzul Rajit bin Noor MohammadAll rights reserved. No part of this book may be reproduced or used in anymanner without written permission of the copyright owner except for the use ofquotations in a book review.2


AbstractThe goal of this e-book is to introduce readers to computer architecture andcomputer organisation by explaining how computer systems are constructed,and how their parts work cooperatively to process information efficiently.The basic concepts of a computer system, such as input, output, processing,and memory, are described alongside diagrams of the system structure.The text also encompasses how systems are interrelated, in particular, I/Oorganisation, the bus structure, along with the roles of data, address, andcontrol bus, and the distinction made between a system bus and an I/O bus.The e-book analyses systems and differentiates the methods of data transferas synchronous and asynchronous, the methods of data transmission asserial and parallel, and so as I/O transfer methods such as programmed I/O,interrupt-driven I/O, and DMA.The system memory concepts, both volatile and non-volatile memory, andthe memory hierarchy, along with the CPU components and instruction cycle(fetch–decode–execute), are introduced.The e-book concludes with a series of exercises to consolidate learning andassess understanding.3


4


Introduction to Computer ArchitectureComputer architecture is the study of how computers are designed andhow their components work together to process data efficiently. It providesa foundation for understanding how hardware and software interact withina computer system.1.0 Basic Concepts of a Computer SystemA computer system is an electronic system that accepts data as input,processes the data according to instructions, stores the data, andproduces meaningful output. It consists of hardware, software, data, andusers working together to perform tasks.5


1.1 Computer Architecture vs Computer Organizationa) Computer ArchitectureComputer architecture refers to the conceptual design and logical structureof a computer system as seen by the user or programmer.It includes:Instruction setData formatsMemory addressing modesInput/output mechanismsFocuses onwhat the computer does.6


b) Computer OrganizationComputer organization refers to the physical implementation of thecomputer architecture.It includes:Hardware componentsControl signalsData pathsMemory technologyFocuses on how thecomputer is built.7


1.2 Basic Components of a ComputerA computer system consists of four main components:Input deviceOutput deviceProcess deviceMemory device8


a) Input DeviceInput devices are used to enter data and instructions into the computer.Examples keyboard, mouse, scanner, microphone and webcam9


b) Output DeviceOutput devices are used to display or produce results after processing.Examples monitor, printer, speaker and projector.10


c) Process DeviceThe CPU (Central Processing Unit) processes data and executes instructions.Main parts of CPU:ALU: Arithmetic and logical operationsControl Unit: Controls all operationsRegisters: Temporary high-speed storage11


d) Memory DeviceStores data and instructions.Types:Primary Memory: RAM, ROMSecondary Memory: Hard disk, SSD, USB12


Simple Block Diagram of a Computer System13


2.0 Explain System Interconnection And Input/Output (I/O)OrganizationThe term system interconnection refers to how the various pieces of acomputer system are linked together and how they communicate with eachother. The interconnection and the pathways for communication betweenthe processor, memory, and peripherals are also included. A great I/Osystem organization, and therefore a great I/O system, is pertinent to theseamless flow of information between the computer and external devices,which include printers, monitors, keyboards, storage devices, and networkdevices.14


2.1 Describe the Input/Output (I/O) Bus and Interface ModulesThe communication between the processor and peripheral devices ismade possible through the use of interface modules and the I/O bus.The following are noteworthy components of these modules and buses:a. Interconnection structuresb. Interconnection of Buses15


a. Interconnection structuresA computer's primary components consist of three basic types: theprocessor or central processing unit (CPU), the computer's memory, andthe computer's input and output (I/O) components. These componentsprocess and exchange information and data with one another.The arrangement of the different components and various paths ofcomponents is called an interconnection structure.The design of the interconnection structure is determined by the type andfrequency of communication exchanges between each of thecomponents:Processor/CPU :directs the computer's functions and carries out the processing of data.Main memory :retains or 'holds' information.I/O :transmits or 'moves' information to and from the computer and an externaldevice.16


17


The interconnection structure must accommodate the following types ofcommunication or data transfer:Memory to the processor:an instruction or data unit is read by the processor from memory.Processor to the memory:the processor sends (or 'writes') a data unit to the memory.I/O to the processor:data is read by the processor from an input and output (I/O) devicethrough an I/O module.Processor to I/O :the processor sends data to the I/O.I/O to and from memory:an I/O module is permitted to directly exchange data with the memory,bypassing the processor, through a process known as direct memoryaccess (DMA).18


19


b. Interconnection of BusesInterconnection of buses deals with defining how buses communicate witheach other.A bus abbreviated from data bus is a collection of physical lines(conductors) that connect a variety of a computer’s components.Each bus has a unique function. Some buses route control signals, whileothers route addresses and data.The input/output bus is usually the only bus that connects the input andoutput devices to the memory and processor.It facilitates the processor and CPU circuitry to communicate and performinput and output functions, which might be reading running and writing to thedisks setting and reading from keyboards and other operations.20


A bus has the following components:A data bus, which transports data from one component to anotherAn address bus, which communicates the memory address of thedata being transportedA control bus, which governs the bus’s functionality by controlling theread and write operations and the synchronization of the bus21


1. System Bus. The system bus connects the CPU with memory and othersystem components. It allows the CPU and system memory tocommunicate.2. I/O Bus. The I/O bus allows communication between the processor andinput and output devices, which include printers, scanners, storagedevices, and devices that connect to a network. I/O devices do not need totransfer data to the CPUs at the same rate. Therefore, I/O buses usuallyhave a lower data transfer speed than system buses.Types of Buses22


3.0 The Concept of Data Transfer in a Computer System3.1 Methods of Data Transfer in a Computer SystemData transfer refers to the way in which the various components of acomputer system, including the CPU, the memory, the storage devices, andthe input/output (I/O) devices, are inter connected and communicate witheach other.Since the various components of the system operate at differing speeds,there need to be methods to ensure that the transfer of data is bothaccurate and efficient.These methods can be categorized into two main types:A. Synchronous methodB. Asynchronous method23


A. Synchronous Data Transfer MethodDefinitionIn a synchronous data transfer method, data transfer is only permitted whencertain time intervals are reached, and the same clock signal is used by thesender and the receiver to determine when that time has been reached.Both devices in the system will use the same clock signal to determine whendata will be sent, and when it will be read.Key CharacteristicsUtilizes a shared clock signal to coordinate the transfer.Data transfer can be a high velocity stream.Common in systems with high speed devices that are in close proximity toeach other.The timing of the data transfer is predictable and controlled.How it WorksBoth devices in the transfer possess a clock signal.Data transfer occurs at each pulse of the clock.The receiver retrieves the data at the clock cycle that is expected.Benefits✅ Immediate (no lag because of additional signals)✅ Handles large amounts of data efficiently✅ Compatible with high-speed systemsDrawbacks❌ Needs all devices to operate at the same speed❌More expensive because of the need for additional clock synchronizationdevices❌ Not appropriate for slow or unpredictable devicesInstancesCPU and RAM communicationData transfers on system buses (such as memory buses)High-speed peripheral interfaces (such as PCIe)24


B. Asynchronous Transfer of Data MethodDefinitionThe transfer of data without a shared reference clock (which measurestime) at both ends of the transfer is an example of asynchronous datatransfer. There are no time constraints between the sender and thereceiver. They can transfer and process data at different rates, and thetransfer can occur at any moment.CharacteristicsThe absence of a clock signal that is common to both ends of thetransfer.Data can only be transmitted at the appropriate time.Uses handshaking signals, usually:-Request-AcknowledgeAppropriate for different operational speeds.Operational Example (Process of Handshaking)The sender transmits a request signal to the receiver, stating that thedata is ready for transfer.The receiver, after reading or receiving the data, issues anacknowledgment signal back to the sender.The sender is now ready to transfer the subsequent data.25


UsesThe keyboard that is used for data entry into the centralprocessing unit (CPU) of the computer.Communication that is conducted serially (e.g. universalasynchronous receiver transmitter (UART)).Communication to and from the printer.Communication through a universal serial bus (USB) (whichuses asynchronous methods and schedules data into packets).Benefits✅ Efficient for devices that operate at different speeds✅ Data is less likely to get lost✅Cost-effective (clock synchronization is not required)Drawbacks❌ It is likely to be slower due to waiting for the additional signal❌ It is likely to be more complex due to the additional overhead ofcontrol lines and handshaking.26


Serial Transmission of Asynchronous is done by two ways:a) Asynchronous Communication Interfaceb) First In First out Buffer (FIFO)The Asynchronous Communication InterfaceMany interactive terminals use a form of asynchronous serial datacommunication that utilizes special bits at both ends of a charactercode. In this technique, each character is made up of threecomponents:- Start bit- Character bit- Stop bit27


Serial transferData transmission occurs one bit at a time along a single line ofcommunication.FeaturesThere are fewer wires usedLower cost and less complicated hardwareMore reliable over great distancesExamples: USB, UART, SPI3.2 Difference between serial and parallel transfer methods28


Parallel transferMore than one bit of data are transmitted simultaneously over several lines ofcommunicationFeaturesGreater rate of data transfer over shorter distancesThere are more wires and connectors neededGreater cost and more complexityMore susceptible to signal skew and interference over longer distances29


a) Programmed I/O (Polling)The CPU controls the entire transfer.The CPU checks (polls) the status register of an I/O device to see if it isavailable.Once available, the CPU transfers data between the device register andmemory (or CPU register) one unit at a time.Downside: wastes CPU time (the CPU keeps checking), making itinefficient for large transfers or slow devices.Mode idea: CPU-driven, busy-waiting transfer.3.3 Mode of Transfer30


b) Interrupt-Initiated I/OThe CPU initiates the I/O operation, then goes on to perform othertasks.When the device is ready (or has completed an operation), it sendsan interrupt to the CPU.The CPU stops what it is doing, and calls an interrupt service routine(ISR) to take care of the I/O (which usually involves transferring asmall amount of data), then goes back to what it was doing.Advantage over programmed I/O: the CPU does not waste timechecking.There is still a downside: the CPU is still required for each datatransfer (typically per byte/word), which adds a lot of overhead forlarge blocks.Mode idea:The device tells the CPU it is ready; the CPU is still the one transferringthe data.31


Direct Memory Access (DMA)Used when large or fast data transfers (disk, network, etc.) transfers arerequired.To set up a DMA controller, the CPU provides:source addressdestination addresssize of transferdirection (read/write)After this, the DMA controller moves data between the I/O device and themain memory, without the CPU moving everything one by one.The CPU will only be interrupted:when the transfer of the whole block is done, orwhen there is an error.Advantage: very efficient; the CPU is freed for other work.Disadvantage: DMA can “steal” cycles of the memory bus from the CPU,slightly delaying the memory access of the CPU during transfers.The main idea: The hardware controller transfers data between thedevice and memory, while the CPU stays mostly out of the process.32


33


4.1 Identify the types of computer memorya) Volatile MemoryDefinition: Loses stored data when power is turned off.Examples:RAM (Random Access Memory)DRAM (Dynamic RAM): Needs constant refreshing.SRAM (Static RAM): Faster, doesn’t need refreshing; used in cache.Use: Temporary storage for currently running programs and data.b) Non-Volatile MemoryDefinition: Retains data even when power is off.Examples:ROM (Read-Only Memory)PROM (Programmable ROM), EPROM (Erasable PROM), EEPROM(Electrically Erasable PROM)Flash memory: Used in SSDs, USB drives, memory cards.Hard drives, optical disks, magnetic tapesUse: Long-term storage for programs, firmware, and files.4.0 System MemoryComputer system memory is how computers are able to runprograms. It is the way computers store instructions and data. Thestorage includes memory that is small and close to the CPU(registers/cache), and memory that is larger and more slow (RAMand secondary storage).34


A memory hierarchy is a model that illustrates various levels of datastorage and their optimal usage in a computer system. The hierarchy isstructured with the fastest levels of data tiered with increasing storagecapacity and access time. Here is a description of the various levels in thehierarchy.4.2 Memory Hierarchy35


RegistersFastest level of memorySmallest capacity, located in the CPUData that is currently being processed in the CPUCache MemoryFaster than the other levels of memoryData that is frequently accessed is stored here to increase processingspeed.Three levels of cache memory, L1, L2, and L3.L1 Cache: The closest to the CPU cores.L2 Cache: Larger than L1, but slower.L3 Cache: The slowest of the three. Shared among the cores.Main Memory (RAM)The storage capacity is greater than the cache.Slower than other access levels.Data is temporarily stored in the memory of the currently runningprograms.Volatile memory. (Data is lost when the system loses power)Secondary StorageMuch larger storage capacity, but slower.HDD (hard disk drives), SSD (solid-state drives), and optical disks.Data is retained when the computer is powered off, meaning it is nonvolatile.Tertiary and Off-line StorageUsed to store data for long periods of time and for backups.Magnetic tapes, cloud storage, external drives, etc.Slower than the other levels, with the longest access time.36


a. Level 1 Cache Memory (L1)Location: Within each individual CPU coreSpeed: Fastest cache performanceSize: Smallest size (generally 32KB–128KB per core)Function:Holds data and instructions most often used and provides theCPU immediate access.Note: Often divided into:Instruction cache (L1i)Data cache (L1d)b. Level 2 Cache Memory (L2)Location: Within the CPU (located at per core or pooled at a fewcores)Speed: Intermediate between L1 and L3 (Slower than L1, butfaster than L3)Size: size is Larger than L1 (typically 256KB–2MB per core)Function:Provides support for L1 cache. When data is not found in L1, L2will be checked by the CPU.c. Level 3 Cache Memory (L3)Location: On the CPU chip (shared among all the cores)Speed: Slowest among L1 and L2, but still much faster than theRAMSize: Biggest cache (4MB–64MB commonly shared)Function:Acts as a cache pool for all cores to minimise access to the mainmemory (RAM) and to enhance performance of multi-coreprocessors.4.3 The Types of Cache Memory37


38


5.0 Central Processing Unit (CPU)5.1 Define the Central Processing Unit (CPU)The CPU (Central Processing Unit) is the most critical part of the computer. Itfollows instructions, performs operations, along with controlling all othercomponents. It takes data from the input devices, executes the instructionsfrom the programmes, and provides the output to either the output devices orthe memory.To put it simply:The CPU is the part of the computer that thinks, makes the calculations, andmakes the choices.Here are the CPU's primary functions:? Processing – handles all calculations and logical operations? Control – handles the management and coordination of all other hardwarecomponents⚡ Execution – executes all instructions of the programmes one after theother39


5.2 The Primary Components of CPU)a. Control Unit (CU)Function: Guides and manages all activities of the computer system.What it does:- Retrieves instructions from memory- Interprets the instructions- Issues control signals to other units (ALU, memory, I/O)In simpler terms:The Control Unit acts as the “traffic controller” of the CPU, commandingall the different components what to do and when.b. Arithmetic and Logic Unit (ALU)Function: Executes all the arithmetic and logic operations.What it does:- Arithmetic operations: +, −, ×, ÷- Logic operations: AND, OR, NOT, and comparisons (>, <, =)In simpler terms,The ALU can be considered as the “calculator + decision maker” of theCPU.c. Memory Unit (Registers / Cache within CPU)Function: Used to store data, instructions and the results temporarily.What it does:- Contains instructions under execution- Holds results from ALU- Offers faster access than main memory (RAM)In simpler terms,The Memory Unit serves as the short term working memory of the CPU.⚠ Note of importance for students:“Memory Unit” when referring to the components of CPU typically meansthe registers and cache materials (L1, L2, L3) inside the CPU, and not theRAM.40


41


SummaryThe CPU is essential to the functioning of a computer, as it executescommands and controls the movement of data. The Control Unit supervisesand commands the stream of processes, the ALU takes care of arithmeticaland logical functions, and the Memory Unit offers some quick-access storageto facilitate rapid processing.5.3 Central Processing Unit (CPU) diagram.42


The computing instruction cycle describes a cycle that a computerfollows every time an instruction needs to be executed. This cycleis broken down into several parts, including a description of theprocessing of such instruction. An important detail is everysubdivision of instruction processing has a name. This includesthe breakdown of the processes of the instruction cycle which is aseries of steps such as the following:a. Instruction Fetch CycleThe instruction fetch cycle includes the `fetching` of theinstruction. The steps of this cycle are carried out with theseseveral steps:The Program Counter (PC) has an address of the instructionthat needs to be executed next.The instruction is obtained from the address of the ProgramCounter (PC) that points to the Memory so an instruction canbe obtained.The instruction will be obtained from the memory and thatinstruction will be stored to be fetched in the InstructionRegister (IR).The next instruction is obtained by incrementing the ProgramCounter (PC).5.4 The Instruction Cycle43


b. Decode CycleThe Decode Cycle is another step in the process. It is the one wherethe computer determines what action it needs to take. In this phase:The Control Unit (CU) holds the instruction that is located in theInstruction Register (IR) to decode it.To determine what action is supposed to be taken, the ControlUnit (CU) tries to decode the operation code (opcode) that ispresent in the instruction. For example, it can be an ADD,SUBTRACT, or MOVE instruction.The operation fetched from the last instruction is executed andthe required operands are retrieved from the registers ormemory.c. Execute CycleThe Execute Cycle is where you actually perform what theinstruction says to do. During this phase:An operation, such as a logical or arithmetic operation, is carriedout by the necessary functional unit(s), such as the ArithmeticLogic Unit (ALU).Based on the instruction, the output is either stored in a memorylocation or a register.According to the instruction, if a data transfer is required, thedata is moved between the necessary registers, memory, or I/Odevices.If the instruction is a control operation (like a branch or jump),then the instruction address gets a new value in the ProgramCounter (PC).Then, the processor moves on to the next instruction in the FetchCycle, and this whole process carries on until the completion of theprogram.44


6.0 ExercisesMultiple Choice Questions (30 Questions)1. Select the main focus of computer architecture.A. How a computer is physically constructedB. What function the computer performs (design on the concept)C. How chips are manufacturedD. How the power supply is designed2. Choose the following is part of computer architectureA. Control SignalsB. Technology MemoryC. Instruction SetD. Data Paths3. Select the following that refers to computer organization.A. Oversight of the conceptual design visible to programmersB. The logical structure of the instruction setC. The physical structure of the architectureD. Patterns of design in software45


4. Determine the following is part of computer organisation.A. Input/output mechanismsB. Data formatsC. Memory addressing modesD. Data Paths5. Predict the produce from computer system after it takes ininput, processes and stores data.A. NoiseB. Signals that are meaninglessC. Meaningful outputD. Random output6. List the four main components of a computer system.A. CPU, Monitor, Printer, InternetB. Input, Output, Process, MemoryC. Keyboard, Mouse, Speaker, RAMD. Software, Data, Network, User46


7. Choose the following is an input device.A. PrinterB. MonitorC. ScannerD. Projector8. Select the following is an output device.A. MouseB. MicrophoneC. WebcamD. Speaker9. Indicate the main responsible of CPU.A. Storing files permanentlyB. Processing the data and carrying out the instructionsC. Showing resultsD. Providing power47


10. What component of the CPU carries out the operations ofArithmetic and logic?A. RAMB. ALUC. Control BusD. ROM11. What is the best description of Registers?A. Storage that is PermanentB. Storage that is Temporary and of high speedC. Storage that is ExternalD. Storage that is Optical12. Which of the following is included in Primary memory?A. Hard disk and SSDB. USB and DVDC. RAM and ROMD. Magnetic tape and cloud48


13. Choose the following is related to system interconnection.A. How software is updatedB. How the parts of a computer are connected and how they communicateC. How websites are connected to the Wi-FiD. How the pixels are displayed on a monitor14. Determine the following refers to the arrangement of elementsand the pathways that link them.A. A compilerB. An interconnection structureC. A databaseD. A firewall15. What are the three basic types of primary elements that acomputer is made of?A. CPU, main memory, I/O componentsB. CPU, monitor, printerC. RAM, ROM, USBD. Keyboard, mouse, scanner49


16. Describe a bus.A. A storage chipB. A bundle of connecting lines to the componentsC. A program that is running in the CPUD. A printer cable of a certain kind only17. Which bus is responsible for the transportation of data amongthe components?A. Address busB. Control busesC. Data busesD. System clocks18. State the purpose of the address bus.A. Carrying only control signalsB. Communicating the memory address of the dataC. Permanently storing dataD. Providing power to RAM50


Click to View FlipBook Version