Skip to main content

Basics of Computer Architecture

 

Basics of computer Architecture

The computer system hardware comprises of three main components —

1. Input/Output (I/O) Unit,
2. Central Processing Unit (CPU), and
3. Memory Unit.

The I/O unit consists of the input unit and the output unit. CPU performs calculations and processing on the input data, to generate the output. The memory unit is used to store the data, the instructions and the output information. Figure below illustrates the typical interaction among the different components of the computer.

I.Input/Output Unit 

The user interacts with the computer via the I/O unit. The Input unit accepts data from the user and the Output unit provides the processed data i.e. the information to the user. The Input unit converts the data that it accepts from the user, into a form that is understandable by the computer. Similarly, the Output unit provides the output in a form that is understandable by the user. The input is provided to the computer using input devices like keyboard, mouse, joystick,tracker ball etc. Some of the commonly used output devices are monitor, printer,speakers etc.

Note:Look into the latest specifications and price of keyboard,mouse,printers ,monitors etc

II.Central Processing Unit (CPU)
CPU controls, coordinates and supervises the operations of the computer and is often called the brain of the computer. It is responsible for processing of the input data. CPU consists of Arithmetic Logic Unit (ALU) and Control Unit (CU).

o ALU performs all the arithmetic and logic operations on the input data.

o CU controls the overall operations of the computer i.e. it checks the sequence of execution of instructions, and, controls and coordinates the overall functioning of the units of computer.

Additionally, CPU also has a set of registers for temporary storage of data, instructions, addresses and intermediate results of calculation.

CPU uses the registers to store the data, instructions during processing.

CPU executes the stored program instructions, i.e. instructions and data are stored in memory before execution. For processing, CPU gets data and instructions from the memory. It interprets the program instructions and performs the arithmetic and logic operations required for the processing of data. Then, it sends the processed data or result to the memory. CPU also acts as an administrator and is responsible for supervising operations of other parts of the computer.

The CPU is fabricated as a single Integrated Circuit (IC) chip, and is also known as the microprocessor. The microprocessor is plugged into the motherboard of the computer (Motherboard is a circuit board that has electronic circuit etched on it and connects the microprocessor with the other hardware components).

Note:Look into the latest specifications and price of  Processors and Motherboards.

( now a days we also use GPU( Graphical Processing Unit) which support CPU for high end computing widely used in image processing, machine learning and block chain applications)

Arithmetic Logic Unit

 ALU consists of two units—arithmetic unit and logic unit.

The arithmetic unit performs arithmetic operations on the data that is made available to it. Some of the arithmetic operations supported by the arithmetic unit are—addition, subtraction, multiplication and division.

The logic unit of ALU is responsible for performing logic operations. Logic unit performs comparisons of numbers, letters and special characters. Logic operations include testing for greater than, less than or equal to condition.

ALU performs arithmetic and logic operations, and uses registers to hold the data that is being processed.

Registers

Registers are high-speed storage areas within the CPU, but have the least storage capacity.

Registers are not referenced by their address, but are directly accessed and manipulated by the CPU during instruction execution.

Registers store data, instructions, addresses and intermediate results of processing.

Registers are often referred to as the CPU’s working memory.

The number of registers and the size of each (number of bits) register in a CPU helps to determine the power and the speed of a CPU.

The overall number of registers can vary from about ten to many hundreds, depending on the type and complexity of the processor.

Control Unit (CU)
The control unit of a computer does not do any actual processing of data. It organizes the processing of data and instructions. It acts as a supervisor and, controls and coordinates the activity of the other units of computer.

CU coordinates the input and output devices of a computer. It directs the computer to carry out stored program instructions by communicating with the ALU and the registers. CU uses the instructions in the Instruction Register (IR) to decide which circuit needs to be activated. It also instructs the ALU to perform the arithmetic or logic operations. When a program is run, the Program Counter (PC) register keeps track of the program instruction to be executed next.

CU tells when to fetch the data and instructions, what to do, where to store the results, the sequencing of events during processing etc.

CU also holds the CPU’s Instruction Set, which is a list of all operations that the CPU can perform.

III.Memory Unit 
Memory unit stores the data, instructions, intermediate results and output, temporarily, during the processing of data. This memory is also called the main memory or primary memory of the computer. The input data that is to be processed is brought into the main memory before processing. The instructions required for processing of data and any intermediate results are also stored in the main memory. The output is stored in memory before being transferred to the output device. CPU can work with the information stored in the main memory. Another kind of storage unit is also referred to as the secondary memory of the computer. The data, the programs and the output are stored permanently in the storage unit of the computer. Magnetic disks, optical disks and magnetic tapes are examples of secondary memory.

The memory unit consists of cache memory and primary memory. Primary memory or main memory of the computer is used to store the data and instructions during execution of the instructions. Random Access Memory (RAM) and Read Only Memory (ROM) are the primary memory.


Cache Memory

The data and instructions that are required during the processing of data are brought from the secondary storage devices and stored in the RAM. For processing, it is required that the data and instructions are accessed from the RAM and stored in the registers. The time taken to move the data between RAM and CPU registers is large. This affects the speed of processing of computer, and results in decreasing the performance of CPU.

 Cache memory is a very high speed memory placed in between RAM and CPU. Cache memory increases the speed of processing.

 Cache memory is a storage buffer that stores the data that is used more often, temporarily, and makes them available to CPU at a fast rate. During processing, CPU

first checks cache for the required data. If data is not found in cache, then it looks in the RAM for data.

 Cache memory is built into the processor, and may also be located next to it on a separate chip between the CPU and RAM. Cache built into the CPU is faster than separate cache, running at the speed of the microprocessor itself. However, separate cache is roughly twice as fast as RAM.

 Cache memory is very expensive, so it is smaller in size. Generally, computers have cache memory of sizes 256 KB to 2 MB.

Primary Memory

 Primary memory is the main memory of computer. It is used to store data and instructions during the processing of data. Primary memory is semiconductor memory.

 Primary memory is of two kinds—Random Access Memory (RAM) and Read Only Memory (ROM).

 RAM is volatile. It stores data when the computer is on. The information stored in RAM gets erased when the computer is turned off. RAM provides temporary storage for data and instructions.

 ROM is non-volatile memory, but is a read only memory. The storage in ROM is permanent in nature, and is used for storing standard processing programs that permanently reside in the computer. ROM comes programmed by the manufacturer.

 RAM stores data and instructions during the execution of instructions. The data and instructions that require processing are brought into the RAM from the storage devices like hard disk. CPU accesses the data and the instructions from RAM, as it can access it at a fast speed than the storage devices connected to the input and output unit.

 The input data that is entered using the input unit is stored in RAM, to be made available during the processing of data. Similarly, the output data generated after processing is stored in RAM before being sent to the output device. Any intermediate results generated during the processing of program are stored in RAM.

 RAM provides a limited storage capacity, due to its high cost.( 4GB-8GB)

Secondary Memory

 The secondary memory stores data and instructions permanently. The information can be stored in secondary memory for a long time (years), and is generally permanent in nature unless erased by the user. It is a non-volatile memory.

 It provides back-up storage for data and instructions. Hard disk drive, floppy drive and optical disk drives are some examples of storage devices.

 The data and instructions that are currently not being used by CPU, but may be required later for processing, are stored in secondary memory.

 Secondary memory has a high storage capacity than the primary memory.

 Secondary memory is also cheaper than the primary memory.

 It takes longer time to access the data and instructions stored in secondary memory than in primary memory.

Magnetic tape drives, disk drives and optical disk drives are the different types of storage devices.

(note :now a days SSD ( solid state drives ) are used instead of hard disk which uses a special type of circuitry called   NVRAM( non volatile RAM) to store data)
512GB-1TB is the typical capacity of harddisk/SSD used in PCs now a days.

Comments

Popular posts from this blog

KTU Mandatory C programs for Laboratory and Solutions

LIST OF LAB EXPERIMENTS 1. Familiarization of Hardware Components of a Computer 2. Familiarization of Linux environment – Programming in C with Linux 3. Familiarization of console I/O and operators in C     i) Display “Hello World”     ii) Read two numbers, add them and display their sum     iii) Read the radius of a circle, calculate its area and display it 4. Evaluate the arithmetic expression ((a -b / c * d + e) * (f +g))   and display its solution. Read the values of the variables from the user through console 5. Read 3 integer values, find the largest among them. 6. Read a Natural Number and check whether the number is prime or not 7. Read a Natural Number and check whether the number is Armstrong or not 8. Read n integers, store them in an array and find their sum and average 9. Read n integers, store them in an array and search for an element in the    array using an algorithm for Linear Search 10.Read n integers, store them in an array and sort the elements in t

PROGRAMMING IN C KTU EST 102 THEORY AND LAB NOTES

PROGRAMMING IN C  KTU  EST 102  THEORY AND LAB   COMMON FOR ALL BRANCHES About Me Syllabus Theory Syllabus Lab Model Question Paper EST 102 Programmin in C University Question Papers  and evaluation scheme   EST 102 Programming in C  Introduction( Lab) Introduction to C programming Linux History and GNU How to create a bootable ubuntu USB stick Installing  Linux Install Linux within  Windows Virtual Box and WSL Linux Basic Features and Architecture Basic Linux Commands Beginning C Programming Compiling C programs using gcc in Linux Debugging C program using gdb Module 1: Basics of computer hardware and software          Module-1 Reading Material Basics of Computer Architecture Hardware and Software System Software and Application Software  Programming Languages ( High level, Low level and Machine Language) and Translators ( Compiler, Interpreter, Assembler) Algorithm, Flowcharts and Pseudo code Program Development Structured Programming Basics of hardware ( video) Know about Motherboar