Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Similar documents
Zimmer CSCI /24/18. CHAPTER 1 Overview. COMPUTER Programmable devices that can store, retrieve, and process data.

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Introduction to Computers. Joslyn A. Smith

What is the typical configuration of a computer sold today? 1-1

An Overview of the Computer System. Kafui A. Prebbie 24

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

Computer Science & Engineering 150A Problem Solving Using Computers

Information Communications Technology (CE-ICT) 6 th Class

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Chapter 1: Why Program? Computers and Programming. Why Program?

Chapter 1 Computer and Programming. By Zerihun Alemayehu

Parts of the Computer System. Parts of the Computer System. Parts of the Computer System. Essential Computer Hardware. Information Processing Cycle

Computer Technology Flash Card 2

Introduction to Computers

Chapter One. Introduction to Computer System

Week 1 Introduction to Programming

INTRODUCTION TO COMPUTERS

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Computer ANAMIKA ACADEMY. Mo Which function has the ability to move from one web page to another Hyper link

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Downloaded From :

CMSC 1513 Lecture 1.2

Components of a personal computer

Chapter Two. Hardware Basics: Inside the Box

Ms. Minerva A. Lagarde

Sahalsoftware college. Welcome To understanding Basic Computer Concept

Computer Programming for Engineering

CSC 121 Computers and Scientific Thinking

The Programming Process Summer 2010 Margaret Reid-Miller

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

Terminology, Types of Computers & Computer Hardware

Intentionally Blank 0

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Computer Fundamentals

Computer Components 1 CSC1103- Nouf AlJaffan Saturday, 02 February 2013

Chapter 2: Computers: The Machines Behind Computing.

15/09/15. Introduction to Computers & The Internet. Contents. Computer hardware and software. Input and output devices CPU. Memory.

Multiple Choice Questions UNIT-I

2011 Francisco Delgadillo

Lecture -1- By lec. (Eng.) Hind Basil University of technology Department of Materials Engineering

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

v.m.g.rajasekaran ramani sri sarada sakthi mat. Hr. sec. school

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Agenda Computer Hardware Input Devices Output Devices Secondary Storage Computer Software System Software Application Software Working with Windows

What is a computer? Units of Measurement. - A machine that: - Counts.

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

About the Presentations

Introduction To Computer Hardware. Hafijur Rahman

HIGHER SECONDARY FIRST YEAR 2 MARK & 5 MARK NOTES CHAPTER 1 1. INTRODUCTION TO COMPUTER

Main Parts of Personal Computer

INFORMATION SYSTEM PARTS AND COMPUTER TYPES

COMPUTER BASICS LECTURER: ATHENA TOUMBOURI

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

Computers Are Your Future

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 1 Introducing Hardware

Day 3. Storage Devices + Types of Memory + Measuring Memory + Computer Performance

Introduction to Computers. Computer Science Department 101COMP حال - 3 للكليات العلمية

Computer System Overview

Chapter 1: Introduction to Computers and Programming

Downloaded from various sources on the NET

Q1. Briefly describe the characteristic features of input and output devices of a computer system.

IBPS Practice Exam 1. One megabyte equals approximately 1) 1,000 bits 2) 1,000 bytes 3) 1 million bytes 4) 1 million bits 5) 2,000 bytes 2.

Computer Concepts and C Programming. Unit I 06CCP13

Parts of Computer hardware Software

C H A P T E R 1. Introduction to Computers and Programming

Programming Principles and Techniques

CHAPTER 1 TYPES & COMPONENTS OF COMPUTER SYSTEM

System Unit Components Chapter2

Copyright 2006 Prentice-Hall. All rights reserved. 1

8. A is approximately one billion bytes a. Kilobyte b. Bit c. Gigabyte d. Megabyte 9. SMPT, FTP and DNS are applications of the layer a. Data link b.

Chapter 2 Basic Computer Configuration

SCSP Programming Technique C

SECTION 2 (Part B) Types And Components Of Computer Systems. Sophia Pratzioti

Chapter 4 The Components of the System Unit

CC411: Introduction To Microprocessors

ICDL-IT. ICDL The ICDL L4 IT. ICDL-IT ICDL

CMSC131. Hardware and Software. Hardware

CMSC131. Hardware and Software

Q1. Describe C.P.U and its subunits with the help of diagram?

2016 P C Basics Page 1

Ch. 1: Computer System part I

Chapter 1 Introduction to Computers and Programming

Computer Overview. A computer item you can physically see or touch. A computer program that tells computer hardware how to operate.

QUESTIONS ABOUT COMPUTERS

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Computers Are Your Future

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

c. Compiler d. Program 9. To maximize a window means a. Fill it to capacity b. Expand it to fit the desktop c. Put only like files inside d.

ST. MARY S COLLEGE FORM 4

Introduction. Arizona State University 1

Introduction to computers

Computer Organization

Homeschool Enrichment. The System Unit: Processing & Memory

Computer Basics PC-100

Community Development and Training Centre Semester IT 245 Management Information Systems

Defining Computers. Defining Computers. Understanding Essential Computer Concepts

Transcription:

ELECTRONIC COMPUTERS THEN AND NOW Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound). In the Past (i.e., during 1930-1946) : The electronic computers used vacuum tubes as their basic electronic component. These computers weighed around 30 tons and occupied 30 by 50 foot space. These Computers were expensive. Example of such computer is ENIAC (Electronic Numeric Integrator and Calculator). These computers were used in mathematical computations, predicting weather and making atomic energy calculations. At Present Advancement in technologies allowed designing and manufacturing of electronic computers with electronic components that can be packaged to the size of a postage stamp. In fact the entire circuitry of a computer processor can be packaged into a single electronic component called as microprocessor chip. For example nowadays chips are embedded in pocket calculators, cameras, automobiles and much more. These computers weighed less and occupied less foot space. There was huge drop down of prices in computers compared to computers in the past. Example of such computer is laptops, palmtops, and desktops. Based on size and performance Modern computers can be categorized as Personal Computers: These computers are used by single person at a time either in house or office and other places for performing simple computations and for preparing presentations. Mainframes: These computers are used especially in places where large real-time processing is involved. Eg., banking networks, corporate reservation systems for motels, airlines etc. Super Computers: These computers are the fastest mainframes that are used in research laboratories and for weather forecasting and much more. COMPUTER HARDWARE: Most modern computers vary in cost, speed, size and capabilities. But, still most of them consist of the following components: Main Memory Secondary Memory Central Processing Unit Input Devices Output Devices Below is given a block diagram that shows the interconnection between the hardware components of a computer. Programming in C and Data Structures UNIT I Page 1

Secondary Storage Devices (CD, DVD, Floppy disk, Zip disk and hard disk) Input Devices (Keyboard, Mouse, scanners And Touch Pad) Main Memory Central Processing Unit Output Devices ( Monitor, Printer and Speaker) In the above diagram, the solid line with arrow mark shows the direction of information flow. Below are listed sequences of steps that take place for program execution. The information flow first starts with the programmer or user keying in the program or instructions through the input device (keyboard). The program is stored in any one of the secondary storage device. The program in the secondary storage device should be transferred to main memory before it can be executed. The Central Processing Unit analyses the instructions in the program and accordingly accepts data from the programmer through the input device if required for the program or performs arithmetic calculations if required for the program. The input data keyed by the programmer is stored in main memory for further processing. After successful execution of the program, the results are stored once again in main memory which can be further displayed through any one of the output device. There is also a control unit within the central processing unit that controls and coordinates the activities of all the components of the computer. Memory Memory is an essential component of computer. To have an understanding of the memory one should know the following things. Memory of the computer is an ordered sequence of storage locations called memory cells. Each cell is identified by unique address which can be used to store or access the information. The contents of the memory cell can contain any type of data or instructions. The size of the memory cell usually varies from computer to computer. It is represented as bytes. Few computers use 1 byte for 1 memory cell, few use 2 bytes and some more use either 4 or 8 or 16 bytes or even more. Programming in C and Data Structures UNIT I Page 2

Byte is composed of even smaller units of storage called bits where, bit is binary digit which can be 0 or 1. One byte is 8 bits All information in the memory of the computer is usually stored as bits but for our convenience in the pictorial representation given below the contents of the memory cells are represented in a form which we can understand. For example in the address 1002, A is the contents of the memory cell. Memory cells contents -27 A Add 0.02.... 266 Address 1001 1002 1003 1004 1020 But if we assume that one byte of memory is allocated to memory cell then in the memory of the computer the information content A is stored as 01000001 and similarly if we assume that two bytes of memory is allocated to memory cell then in the memory of the computer the information content A is stores as 00000000 01000001. Storage and Retrieval of information in Memory The computer can store or retrieve value to or from memory. To store a value the computer sets each bit of the memory cell to either 0 or 1. For Example to store A in a memory cell the bits are set as 01000001 if one byte of memory is allocated to memory cell. (i.e., for the character A the ASCII (American Standard Code for Information Interchange) code is 65 which is converted to bits as 01000001) To retrieve a value the computer copies the patterns of 0 s and 1 s stored in the memory cell to another storage area for processing. Main Memory Main memory stores programs, data and results. There are two types of memory namely RAM (Random Access Memory) and ROM (Read Only Memory). RAM: This memory is used for temporary storage of program, data and results when they are being executed by the computer. It is volatile in nature which means the program or data will be lost if power is switched off. ROM: This memory consists of predefined instructions defined by the manufacturer and are usually executed during system start up. It is non volatile in nature which means instructions are not lost if power is switched off. It is read only memory. Secondary Storage Devices Computers need additional storage devices other than the main memory for two reasons 1. Because the program, data or instructions are to be stored in a permanent area so that it can be retained when required and 2. It can store more information than main memory. Some of the frequently used secondary storage devices are hard disk, magnetic tape, floppy disk, zip disk, CD (Compact Disc) and DVD (Digital Video Disk). Each of these disks storage capacity varies from MB (Mega Bytes) to GB (Giga Bytes). Below is listed a table showing storage capacities in terms of bytes and also a table showing the memory capacity of secondary storage devices. Programming in C and Data Structures UNIT I Page 3

Term Abbreviation Equivalent to Byte B 8 bits Kilobyte KB 2 10 bytes Megabyte MB 2 20 bytes Gigabyte GB 2 30 bytes Terabyte TB 2 40 bytes Secondary Storage Capacity Storage Device Hard Disk 60 GB or more Drive DVD 4.7 GB or more CD 650 MB to 700 MB Zip drive Floppy disk drive 250 MB or more 1.44 MB Central Processing Unit It is the heart of the computer system. It interprets the program in the main memory and accordingly generates control signals to other components. It controls and coordinates all operations. It performs arithmetic and logical operations when required. The CPU also uses a high speed storage location called register for temporary computations and the register is located inside the CPU. Input/Output Devices These devices are used to communicate with the computer by allowing the programmer or user to enter data for computation and to observe the results after computation. Keyboard is the standard input device used to key data, instructions or program. On the other end mouse is another input device used to move the mouse pointer to a location on the screen and perform operation of clicking graphical icons which has defined functionalities. Other input devices are scanners and touch pads. Monitor is the standard output device that is used to display the processed information onto the screen. Other output devices are printers and speakers. Programming in C and Data Structures UNIT I Page 4

COMPUTER NETWORK Definition: group of computers and devices interconnected by communication channels that facilitate communication among users and allow users to share resources is called as Computer Network. LAN (Local Area Network) It is a type of network that connects the computers and other devices in a building with a cable. This type of network allows sharing of information and resources with in a building or in a small geographical area. It is connection oriented. WAN(Wide Area Network) It is a type of network that connects the computers and other local area networks over a large geographical area. This type of network allows sharing of information and resources between buildings/states/countries. It is connectionless. Devices/Connections for getting connected to Internet Modem(Modulator/Demodulator): it is a device that converts binary data to audio signals and audio signals to binary data that can be transmitted between computers over telephone lines. Modems in the past transmitted the data at a speed of 300 bits per second. Today s modems tr ansmit with a speed of 50,000 bits per second. DSL(Digital Subscriber Line) Connection: it is a high speed internet connection that uses a telephone line which does not interfere with voice communication on this line. The associated modem transmits data at a speed of 1.5 million bits per second. Cable Internet Access: It is a high speed internet connection that uses coaxial cable. It transmits data at a greater speed than the DSL. COMPUTER SOFTWARE Definition: it is the collection of computer programs and related data that provide the instructions telling the computer what to do. Types of Softwares: System Software Programming Software Application Software Programming in C and Data Structures UNIT I Page 5

System Software: o It is responsible for managing variety of independent hardwares. o It includes the following: Device drivers Operating System Utilities Operating System: It is a collection of programs that act as an interface between the user of the computer and computer hardware. Few programs related to the operating system are permanently stored in the ROM chip. These programs are necessary to load the remaining programs of the operating system from hard disk to memory. Loading of instructions/ programs from memory is called booting of the computer. Functions of Operating System: It acts as a command interpreter i.e., translating the user commands to a form which the machine can understand and in turn translating the response from the machine to a form which the user can understand. It plays key role in managing memory, time, processes and peripherals. Examples of Operating Systems that come under command line interface are MS-DOS, UNIX. Examples of Operating Systems that come under graphical user interface are Windows, Unix + X window system. Programming Software: o It provides tools to assist the programmer in writing computer programs. o It includes Compiler Interpreter Assembler Linker Text editor Compiler: It is a type of translator/program that translates high level language program to machine level language program. E.g., C, C++, FORTRAN, COBOL, Pascal Interpreter: It is a type of translator/program that translates high level language statement to machine level language statement. E.g., basic, visual basic. Assembler: It is a type of translator/program that translates assembly level language program to machine level language program. E.g., masm, tasm. Loader: Programming in C and Data Structures UNIT I Page 6

This program copies the executable statements to memory and initiates the execution of instructions. Linker: This program combines the pre-fabricated functions to the object file to create an executable machine file. Flow of information in transforming the source file to executable machine file Compiler/interpreter/assembler translates the source file to object file. Linker links the object file to pre-fabricated functions (system library) to create executable file. Loader copies the executable file to memory and initiates execution of instructions. IDE(Integrated Development Environment): it refers to the software that provides support for editing the program, compiling, linking and loading. Application Software: It is a collection of programs that allow the computer user to accomplish specific tasks. For example Microsoft word can be used for document processing, Microsoft Excel can be used for computations, Microsoft Power point can be used for presentations, Tally for accounting, dbase/foxpro/oracle for data base management. The user should be careful enough while purchasing application software in checking for the compatibility of the software i.e., whether the application software works in all Operating systems or in only few operating systems. Computer Languages: Languages can be categorized as listed below: Machine level language Assembly level language High level language Machine Level Language: This is the language which the machine can understand. Statements will be written as combination of 0 s and 1 s. This language is not standardized and has the difficulty of writing separately for each machine. Assembly Level Language: This is the language in which the programming statements are written using mnemonic codes for performing operations. For example MUL A, where MUL is the mnemonic code signifying the multiplication operation. High Level Language: This is the language in which the programming statements look very much similar to that of English. It takes the advantage of running programs on any machine. Examples of such languages are C, C++, Java, COBOL, FORTRAN, Small talk, LISP, PROLOG etc. Programming in C and Data Structures UNIT I Page 7

Source File: It is a file comprising of program statements written either in high level language or assembly level language. Object File: it is a file comprising of program statements in machine level language. ALGORITHM It is one of the techniques used to provide solution to the problem. It is defined as the finite set of clearly stated steps for providing the solution to a problem in finite time. An algorithm should be analyzed with respect to space and time complexity i.e., with respect to usage of computer memory and processing time. An algorithm should also be analyzed to trace whether the steps specified are executed at least once. The steps in the algorithm can be divided into three categories as Sequence Selection Iteration Sequence: The steps described in the algorithm are performed successfully one after the other. Selection: if any of the step described in the algorithm has multiple solutions then that algorithm steps are written using one of these if, if..else, case. Iteration: if one or few steps of an algorithm are to be performed more than once or until a condition is met then that algorithm steps are written suing one of these repeat..until, do..while, while..end while FLOWCHART It is one of the techniques used to provide solution to the problem. It is defined as the pictorial representation of algorithm steps. There are different symbols used to indicate the operational steps of an algorithm. Below in the table are listed some commonly used symbols in flowcharts. SYMBOL NAME SYMBOL PURPOSE Rounded Rectangle or Flat oval Indicates the beginning(start) and end of the flowchart Small Circle Indicates connector. It is used in situations whenever it is impossible to directly join two parts Programming in C and Data Structures UNIT I Page 8

in a flowchart. Rectangle Indicates the process. It is used when assignment statements of an algorithm are to be represented. SYMBOL NAME SYMBOL PURPOSE Parallelogram Indicates Input/Output symbol. It is used to represent the step of algorithm whenever data is to be read or displayed. Lines with arrow mark Indicates the flow lines. It indicates the direction of flow. Symbol of AND gate Indicates delay symbol. It is used for adding delay to the process step. Indicates Loop. It is used Hexagon when iteration steps of algorithm is to be represented. Diamond symbol Indicates decision symbol. It is used to represent selection steps of an algorithm. ------------------------------------------------------------------------------------------------------ SOFTWARE DEVELOPMENT METHOD It is the systematic approach of solving a problem. It encompasses of the following steps: State the problem Analyze the problem Design the algorithm to solve the problem Implement the algorithm Test and verify the completed program. Maintain and update the program. State the problem: Programming in C and Data Structures UNIT I Page 9

The user or the customer describes the problem and the programmer has to understand the problem and accordingly follows the next step. Analyze the problem: The programmer after understanding the problem should identify the inputs, outputs and other requirements of the customer and also know the format of how results are to be displayed and according follows the next step. Design the Algorithm: The programmer having understood the problem, having identified the inputs, outputs and requirements of the problem frames the steps to be followed to provide solution to the problem. These steps are to be reviewed before moving on to the next step. Implement the Algorithm: The programmer transforms the algorithmic steps proposed by him to an implementation (programming) language of his like or to an implementation language as asked by the customer. Test and verify the program: The programmer has to test the program with different combinations of input to ensure that the program produces the desired results and also to ensure that each statement of the program is executed at least once for some input or the other. Maintain and Update the program: The programmer must be ready to make changes to the existing program if there is a request for change in requirements by the customer and also ensure that it works properly and successfully. The programmer must also ensure that the program is not hacked or not accessed by unauthorized users. ------------------------------------------------------------------------------------------------------ Below we will see a simple example of how the software development methods are applied Problem Statement : To find the sum of two integer numbers and display the result. Analyze the problem: For the above problem, two integer values are required as input and the sum of the two integer values is to be displayed as result. Design the Algorithm: The following steps to be followed to provide solution to the above problem. Step 1: start Step 2: read integer value into a variable named one Step 3: read integer value into a variable named two Step 3: add the contents in variable one and two and store the result in a variable named result as shown below Result=one + two Step 4: print the value in the variable named result Step 5: stop Programming in C and Data Structures UNIT I Page 10

Implement the Algorithm:( here the implementation language is C, Algorithm steps transformed to equivalent statements supported in C language) #include <stdio.h> Main() { int one,two,result; Scanf( %d %d,&one,&two); result=one+two; printf( result=%d\n,result); } ------------------------------------------------------------------------------------------------------ Review Questions: 1. Explain how information flows between the components of a computer with a block diagram? (Refer Page 1 and 2) 2. Describe the components of the computer with a block diagram. (Refer Page 1,2,3 and 4) 3. Differentiate high level language, assembly level language and machine level language. (Refer Page 7) 4. Briefly discuss the program/software development steps. (Refer Page 9& 10) 5. Define Flow chart. List some commonly used symbols and specify its purpose (Refer Page 8 & 9) 6. Differentiate LAN from WAN. (Refer Page 5) 7. Bring out the differences between use of computers in the past and at present. (Refer Page 1) 8. Differentiate RAM from ROM (Refer Page 3) 9. Write Short notes on a) Algorithm b) Operating System c) Compiler d) Interpreter e) Assembler f) Modem g) DSL connection h) IDE i) Application Software (Refer Page 5,6 & 7) Programming in C and Data Structures UNIT I Page 11