INTRODUCTION TO COMPUTING CHAPTER 1 PRESENTED BY : MD. NAZIR AHMED LECTURER DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING, IUBAT INTRODUCTION • Components of Computer CPU Input Devices Output Devices Main Memory • Hardware and Software • Algorithm and Flowchart • Pseudocode COMPONENTS OF COMPUTER • Computer is used to perform various computations involving arithmetic and logical operations. CPU Input Device(s) Output Device(s) Main Memory Fig. 1.1 Components of Computer CENTRAL PROCESSING UNIT • All processing activities take place. • Very Large Scale Integrated (VLSI) circuit. • Consist of ALU, CU and Registers. • ALU execute arithmetic and logical operations. • CU is known as Brain of Computer. • Register holds data or instructions. ALU CU Fig. 1.2 Layout of a model CPU Special Purpose Register Address Bus Data Bus General Purpose Register Internal Bus . Control Bus LAYOUT OF A MODEL CPU INPUT DEVICES • Through input devices users input data and instructions to the computer. • Basically information are transmitted to CPU/memory. • Examples: keyboard, mouse, scanners, readers etc. OUTPUT DEVICES • Output devices are used to display the output. • Examples- Monitor, Printer, Speaker, Plotters etc. ***NB- Input and output devices are known as peripheral devices. MEMORY • Memory is used to store data. • Access speeds and volatility. Memory Primary Memory RAM Secondary Memory ROM DIFFERENCE BETWEEN RAM & ROM RAM 1. Random Access Memory ROM 1. Read Only Memory 2. Permits read & write operation 2. Permits read operation 3. Volatile memory 3. Non- volatile memory 4. High speed 4. Comparatively low speed 5. CPU can access data stored on RAM directly 5. Data to be copied from ROM to RAM so that CPU can access its data. HARDWARE AND SOFTWARE • Hardware is the physical components of a computer, such as the motherboard, processor, memory, storage drives, and other devices. • Software is a set of instructions, data, or programs used to operate a computer and execute specific tasks. TYPES OF SOFTWARE • System Software • Operating System, loader, linker and translator • Application Software • Word processing software, image editing, spread sheet packages, database software and accounting software. ART OF PROGRAMMING THROUGH ALGORITHMS AND FLOWCHARTS ALGORITHM • An algorithm is a finite set of unambiguous instructions which, when executed, performs a task correctly. EXAMPLE 1 • Develop an algorithm to find the average of three numbers taken as input from the user. Step 0 START Step 1 INPUT first number into variable A Step 2 INPUT second number into variable B Step 3 INPUT third number into variable C Step 4 COMPUTE SUM = A + B + C Step 5 COMPUTE AVG = SUM / 3 Step 6 DISPLAY AVG Step 7 END PSEUDOCODE • Pseudocode are a means to represent an algorithm in a coded from. Pseudocode Average { Declare variable num1,num2,num3,average scan num1,num2,num3 average=(num1+num2+num3)/3 print “Average is: “,average } FLOWCHART • A flowchart is a type of diagram that represents a workflow or process. • Notation used in flowchartName Start/End Input / Output Process Decision box Connector Off-page connector Arrowed Line Symbol FLOWCHART EXAMPLE • Flowchart for average of three numbersStart Input num1,num2,num3 Average=(num1+num2+num3) Print Average End