You are on page 1of 212
ry Mes 1@ een eka) % cea Oy Pradeep K. Sinha aged i f » ay ie 2 3 S Merle Tee eee Noy P 0 mar __HELP & SOPPORT — IF YOU HAVE ANY PROBLEM RELATED TO SCAN PHOTOS OF THIS BOOK PDF (LIKE = NO CLEAR VISIBLE PAGE . BLURE , CUTTING AND SO ON...) THEN , PLEASE MAIL ME ON THIS MAIL ID : priyajoshi85348@gmail.com (upgrade study with gaming) ! will answer your mail ASAP: | COMPUTER FUNDAMENTALS __ Concepts, Systems & Applications Sixth Edition Pradeep K. Sinha Priti Sinha [&4) BPB PUBLICATIONS 8-14, CONNAUGHT PLACE, NEW DELHt a FIRST EDITION 2003 SIXTH REVISED & UPDATED EDITION 2011 Copyright © 2011 BPB Publications, INDIA ISBN 10 : 81-7656-752-3 ISBN 13 : 978-81-7656-752-7 All Rights Reserved. No part of this publication can be stored in any retrieval system or reproduced in any form or by any means without the prior written permission of the publishers LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY The Author and Publisher ofthis book have tried their best to ensure that the programmes, procedures and functions described in the book are correct. However, the author and the publishers make no warranty of any kind, expressed or implied, with regard to these programmes or the documentation contained in the book. The author and publishers shall not be liable in any event of any damages, incidental or consequential, in connection with, or arising out of the furnishing, performance or use of these programmes, procedures and functions. Product name mentioned are used for identification Purposes only and may be trademarks of their respective companies. All trademarks referred to in the book are acknowledge as properties of their respective owners. Distributors: COMPUTER BOOK CENTRE 12, Shrungar Shopping Centre, M.G Road, BENGALURU-560001 Ph. 25587923, 25584641 MICRO BOOKS Shanti Niketan Building, 8, Camac Street, KOLKATA-700017 Ph; 22828518, 22826519 BUSINESS PROMOTION BUREAU 8/1 Ritchie Street, Mount Road, CHENNAI 600002, Ph: 28410796, 2a550491, MICRO MEDIA ‘Shop No.5, Mahendra Chambers, 150 DN Rd. Next to Capital Cinema, VT. (C.S.T,) Station, MUMBAI-400 001, Ph: 22078296, 22078297 BPB PUBLICATIONS 8-14, Connaught Place, New Delhi-t10001 Ph: 23325760, 43526249 NOTE: THE CD-ROM INCLUDED WITHTHE BOOK HAS NO COMMERCIAL VALUE AND CANNOT BE SOLD SEPARATELY DECCAN AGENCIES 4-3-329, Bank Street, HYDERABAD-500195, Ph. 24756967, 24756400 BPB BOOK CENTRE 376 Old Lajpat Rai Market, DELHI-110008 Ph: 23861747 INFOTECH G-2, Sidhartha Building, 96 Nehru Place, New Delhi-110019 Ph: 26438245 INFOTECH ‘Shop No. 2, F-38, South Extension Part -1 New Dethi-i 10049) Ph 24691288, Published by Manish Jain for BPB Publications, 8-14, Connaught Place, New Delhi-110001 and Printed by him at Rajeev Book Binding House, New Delhi ~» wntneelg iaainia Taste of CONTENT: LETTER TO READERS PREFACE .. ABOUT LECTURE NOTES CD . ABBREVIATIONS .. CHAPTER 1: INTORDUCTION Characteristics of Computers Evolution of Computers Computer Generations .. First Generation (1942-1955) . Second Generation (1955-1964) .. Third Generation (1964-1975) Fourth Generation (1975-1989) .. Fifth Generation (1989-Present) Points to Remember Questions .. CHAPTER 2: BASIC COMPUTER ORGANIZATION Input Unit Ae Output Unit > Storage Unit Arithmetic Logic Unit (ALU) Control Unit (CU). ; r Central Processing Unit (CPU) a The System Concept Points to Remember Questions... EF it Computer Fundamentals CHAPTER 3: NUMBER SYSTEMS .... Non-Positional Number Systems. Positional Number Systems .. Binary Number System. Octal Number System Hexadecimal Number System. Converting from One Number System to Another Converting from Another Base to Decimal 23 +23 24 24 25 + 25 +26 - 26 Converting from Decimal to Another Base (Division-Remainder Tec nique} + 28 Converting from a Base Other Than 10 to Another Base Other Than 10 - 30 Shortcut Method for Binary to Octal Conversion + 32 - 32 = 33 34 35 Shortcut Method for Octal to Binary Conversion Shortcut Method for Binary to Hexadecimal Conversion Shortcut Method for Hexadecimal to Binary Conversion Fractional Numbers .. Points to Remember. Questions... CHAPTER 4: COMPUTER CODES... BCD Code . EBCDIC .. Zoned and Packed Decimal Numbers ASCII... ++ 38 41 43 46 6 Need for Unicode: Unicode Features Unicode Encoding Form: Collating Sequence Points to Remember .. Questions .. CHAPTER 5: COMPUTER ARITHMETIC.. 51 Why Binary? 51 Binary Arithmetic .. 52 Binary Additior 52 Binary Subtraction 53 Binary Multiplication 57 59 60 Binary Division Why Do Computers Use Additive Method? Points to Remember 61 Questions... 61 Table of Contents [Er CHAPTER 6: BOOLEAN ALGEBRA AND LOGIC CIRCUITS .. Boolean Algebra .... Fundamental Concepts of Boolean Algebra .... Postulates of Boolean Algebra The Principle of Duality... Theorems of Boolean Algebra Boolean Functions Minimization of Boolean Functions Complement of a Functior Canonical Forms of Boolean Functions. Conversion Between Canonical Forms. G ‘AND Gate OR Gate .. NOT Gate NAND Gate. NOR Gate Logic Circuits Converting Expressions to Logic Circuits. The Universal NAND Gate . 87 The Universal NOR Gate. za Exclusive-OR and Equivalence Functions. 194 Design of Combinational Circuits .. 95 Design of Half-Adder 96 Design of Full-Adder A Parallel Binary Adder. Points to Remember Questions . CHAPTER 7: PROCESSOR AND MEMORY... Central Processing Unit (CPU). Control Unit (CU).. Arithmetic Logic Unit (ALU) Instruction Set Registers... Processor Speed. Types of Processors Main Memory... Storage Evaluation Criteria ‘Main Memory Organization Main Memory Copacity.. Types of Memory Chips Cache Memory ... Points to Remember Questions “W]_Computer Fundamentals CHAPTER 8: SECONDARY STORAGE DEVICES.. Sequential and Direct-Access Devices.. Magnetic Tapes........ . Basic Principles of Operation. Types of Magnetic Tapes ‘Advantages and Limitations of M Uses of Magnetic Tapes. 122 123 124 124 126 128 lagne 129 Magnetic Disks ........ +130 Basic Principles of Operation. +130 Types of Magnetic Disks .. +135 = 137 - 138 Advantages and Limitations of Magnetic Disks © __ Uses of Magnetic Disks.. Optical Disks 2138 Basic Princip )peration . 2138 Types of Optical Disks . 141 ‘Advantages and Limitations of Optical Disks. 1143 Uses of Optical Disks. "~Memory Storage Devices Flash Drive (Pen Drive) . Memory Card (SD/MMC) ‘ass Storage Devices Disk Array... Automated Tape Library CD-ROM Jukebox. Access Time Data Backup. What is Data Backup? Why Backup Data: Types of Backup . Backup Policy On-line, Near-line, and Off-line Storage Hierarchical Storage System (HSS).. 144 145 2145 = 146 146 146 147 147 147 148 148 148 148 - 149 149 - 150 Points to Remember .. Questions... 151 - 152 CHAPTER 9: INPUT-OUTPUT DEVICES . Input Devices. Keyboard Devices. Point-and-Draw De Data Scanning Devices Digitizer. Electronic-card Reader Speech Recognition Devices Vision-Input System Output Devices . Monitors . “161 Printers .. 168 Plotters f 173 ~~ 156 . 156 - 156 - 160 165 - 166 - 166 167 - 167 a Table of Contents Screen Image Projector. Voice Response Systems Points to Remember .. ag Questions CHAPTER 10: COMPUTER SOFTWARE Cthat is Software? ....sn lationship between Hardware and Software Types of Software System Software. Application Software Logical System Architecture Firmware - Middleware Acquiring Software Buying Pre-written Software 180 | 186 Ordering Customized Software. 186 Developing Customized Software . 187 Downloading Public-domain Software. 188 Software development Life cycle (SDLC) 189 Software Engineering ... 2191 What is Software Engineering? 191 Need for Software Engineering. 191 Goals of Software Engineering 191 Principles of Software Engineering CASE Tools... Points to Remember . Questions .. CHAPTER 11: PLANNING THE COMPUTER PROGRAM .. Purpose of Program Planning . Algorithm What isan Alg Sample Algorithms Representation of Algorithms Flowchart. Flowchart Symbols . Sample Flowcharts Levels of Flowcharts ... Flowcharting Rules. Advantages and Limitations of Flowcharts Pseudocode .... What is Pseudocode Pseudocodes for Basic Logic (Control) Structures... ; MW) _ Computer Fundamentals Sample Pseudocode Advantages and Limitations of Pseudocode Points to Remember Questions CHAPTER 12: COMPUTER LANGUAGES / Analogy with Natural Languages ‘Machine Language. Advantages and Limitations of Machine Language Assembly Language . Assembler... Advantages of Assembly Language over Machine Language. Limitations of Assembly Language. Typical Uses of Assembly Language. Assembly Languages with Macro Instructions . High-level Language .. Compiler. Linker Interpreter .. Intermediate Language Compiler and Interpreter Advantages and Limitations of High-level Languages. Object-Oriented Languages......... What is Object-Oriented Programming ( Fundamental Concepts of OOP. Key Elements of Object-Oriented Paradigm. Some High-level Languages . FORTRAN. coBoL BASIC Pascal Cand C++ Some More High-level Languages . Java.. Characteristics of a Good Programming Languag Selecting a Language for Coding an Application Subprogram .. mas Points to Remember ... Questions ... CHAPTER 13: SYSTEM IMPLEMENTATION AND OPERATION... ftware Testing and Debugging... Sotfmat are Testing ond Debugging? Types of Program Errors... Testing a Program... Debugging a Program for Syntax Errors. Debugging a Program for Logic Errors. Testing of Software Containing Many Programs . Difference between Testing and Debugging... Software Documentation What is Documentation? Need for Documentation ... Forms of Documentation . Documentation Standard. Software Deployment. Changeover Operations. Changeover Methods.. System Evaluatior Software Maintenance Points to Remember .... Questions .... CHAPTER 14: OPERATING SYSTEMS .. What is an Operating System? ‘Main Functions of an Operating System. Measuring System Performance Process Management... Process Management in Early Systems Multiprogrammin; ‘Multitasking, Multithreading .. Multiprocessing Time-sharing Memory Management .... Uniprogramming Memory Model . ‘Multiprogramming Memory Models. Virtual Memory ..... File Management ae File Access Methods... Fite Operations . File Naming......:. Device Management... Controlling 1/0 Devices . Simple and Easy User Interface C0 1/0 Devices Security. : Command Interpretation - 05 Capability Enhancement Software Translating Programs . Library Programs Utility Programs... Some Popular Operating Systems .. [Mii] Computer Fundamentals, Microsoft Windows Microsoft Windows N1 Linux... Points to Remember .. Questions... CHAPTER 15: APPLICATION SOFTWARE PACKAGES... Word-Processing Package What it is? Spreadsheet Package What it is?. Commonly Supported Features. Graphics Package. What it is?.. Commonly Supported Features. Personal Assistance Packag What it is? Commonly Supported Features. Points to Remember Questions... CHAPTER 16: BUSINESS DATA PROCESSING What is Data Processing? Data Storage Hierarchy Standard Methods of Organi File-oriented Approach... Databese-oriented Approach File Management System File Types... File Organizations File Utilities. Database Management System Database Models. ‘Main Components of a DBMS Creating and Using a Databa: Points to Remember .. Questions. CHAPTER 17: DATA COMMUNICATIONS AND COMPUTER NETWORKS. Basic Elements of a Communication System Data Transmission Modes. ‘Table of Contents [TK] Data Transmission Speed. Data Transmission Media . Twisted-Pair Wire .. Coaxial Cable Microwave System. Communications Satellite. Optical Fibers Digital and Analog Data Transmission Modulation Techniques... ‘Modems .. Analog versus Digital Transmissio Data Transmission Services Multiplexing Techniques. Asynchronous and Synchronous Transmission Asynchronous Transmission 359 359 Synchronous Transmission, - 360 Switching Techniques. Circuit Switching ‘Message Switchin Packet Switching Routing Techniques Network Topologies. ‘Star Network Ring Network, Completely Connected Network 365 ‘Multi-access Bus Network Hybrid Network Network Types (PAN, LAN, C Communication Protocols Roles of a Communication Protocol . Concept of Layered Protocols in Network Design Network Interface Card (NIC). The OSI Model Example of Message Transfer in the OSI Model Internetworking Tools . Wireless Networks. Types of Wireless Computing Systems Issues in Wireless Computing Systems. Wireless Applications . Wireless Technologies Distributed Computing Systems Points to Remember Questions... CHAPTER 18:THE INTERNET... Definition (What It Is?) .. Brief History. Its Basic Services | Computer Fundamentals. Electronic Mait. File Transfer Protocol (FTP) Telnet Usenet News. The World Wide Web (WWW). WWW Browsers .. Internet Search Engine: Major Elements of Internet Search Engines Some Popular Internet Search Engines. Uses of the Internet... Points to Remember . Questions .... CHAPTER 19: MULTIMEDIA ... What is Multimedia?. What is a Multimedia Computer System: ‘Multimedia Components, Text Graphi Animation... Audio Video . Multimedia Applications Media Center Computer Media Center PC Features and Functionalities Points to Remember . Questions .. CHAPTER 20: CLASSIFICATION OF COMPUTERS . Notebook Computers (laptops) Personal Computers (PCs) Workstations . Mainframe Systems Supercomputers. Client and Server Compiiters PDA! Pocket PC Smartphone . Points to Remember Questions... Sy _____ Table of Contents [7377] CHAPTER 21: INTRODUCTION TO C PROGRAMMING LANGUAGE .. Introduction... Character Set, Constants, Variables, Keywords, and Comments. Character Set Constants Variables. Keywords. Comments .. Operators Statements Performing Simple I/O Operations in C Preprocessor Directives . Pointers, Arrays, and Strings . Pointers. User Defined Data Types Structure. . Control Structures, Loop Structures, Functions .. Sample Programs . Points to Remember Questions .. GLOSSARY... INDEX... KNOW YOUR AUTHOR... Letter To Reapers Dear Reader, 4 book that connects well with your thoughts and learning Process can be written undoubtedly by an author who shares the same thoughts, understanding, and passion for learning as yours. Puzr two decades ago. I introduced my frst book with a strong convietion tothe above statement, ‘That was the beginning of a revolution, which continues even today. I am committed to writing quality books in Computer Science and associated areas for my readers. To date, I have authored three textbooks targeted towards this endeavor, and plan to author more in future, Wide popularity of my books clearly indicates the support that I have received from my readers. I express my gratitude and regards to all my readers for their support and feedback. Your support provides greater strength and inspires me to work harder towards my commitment. [look forward to yout continued encouragement. Yours truly, March 2011 Pradeep K. Sinha we Pic Audience Computer Fundamentals is intended for anyone interested in knowing about computers. In today’s information age, computers are used in every occupation. They are used by people of all ages and professions, in their work as well as in their leisure. This new social revolution has changed the basic concept of ‘Computing’. Computing, in today's information age, is no more limited to computer programmers and computer engineers. It has become an activity of common men and women. Rather than knowing how to program a computer, most computer users simply need to understand how a computer functions and what it can do. Even those who need to program a computer can do their job more effectively with a better understanding of how computers function, its capabilities, and limitations, The book addresses this requirement of a wide variety of computer users. Rather than focusing on how to program a computer, it explains how a computer system functions, what its various components are, and ‘what are its capabilities and limitations. ‘The book has been consciously structured to serve as an ideal textbook for various introductory courses offered in Computer Science, Computer Applications, Information Technology, and other related areas. More specifically, different classes of readers can benefit from this book in following manner: It-can be used as a textbook for the first course in computers taught in diploma, bachelor’s, and master’s programmes in computer science, computer applications, and information technology (for example, DCA, PGDCA, BCA, BCS, B.Sc. (IT), MCA, MCS, M.Sc. (IT), DOEACC ‘0” Level, ete.) Tt can be used as a textbook for the first course in computers taught to the engineering students of all branches of engineering. It can be used as a textbook for the first course in computers taught to B.Sc. and B.Com. students. Itcan be used as a textbook for the first course in computers taught to management students (for example, BBA, MBA, and MCM students). ‘The book can also serve as a good course material for participants of short-term courses conducted by various organizations and training institutions. «+The book explains frequently used computer jargons in a simple language. Hence, it can also be used as a self-study material for obtaining basic knowledge and understanding of various hardware and software components of computers. L a SME |_Computer Fundamentals Knowledge of computers is not a Prerequisite to follow the contents of the book. It assumes no background in Computers or computer programming. Overview ZThe layout, organization, and contents ofthe book are Gesigned to present the fundamental concepts of ‘computers in a interesting, logical, and informative mannex The book does not concentrate on any particular computer aplicakty Catdware. Instead, it discusses, in a general seiting, the organization, functions, and usage Principles applicable to all types of modern computer systenne All concepts presented in the book are illustrated with Practical examples whenever required. The book also Contains numerous diagrams for better illustration These features enable the readers 10 grasp the Presented concepts easily and to use the book effectively for self-study, Each chapter also contains a large number of carefully designed review questions that test the understanding of the materials presented in the chapter, To make the text easy to read and understand, the Style of presentation used throughout the book is motivational, ‘non-mathematical, and explanatory in nature, Contents ‘The book begins with an introduction to computers Chapter I explains what this versatile tool is, why i is so Powerful and useful, what its limitations are, and how it has evolved from its early days to become a Powerful and. Useful tol for all types of users in today’s society. Chapter 2 presents the basic organization of a computer system, It introduces the five main units present in all Computer systems. They correspond tothe five basic operations performed by all computer systems, Chapter 3 introduces the fundamentals of number system and some of the ‘umber systems used commonly by computer professionals. computer codes. Chapter 5 describes how basic arithmetic operations are performed in a computer by using binary numbers, ter 6 introduces Boolean algebra that deals with binary number system, It also Aescribes logic gates that are oe building logic circuits, which in turn are used in design of processors of computer systems, aaa Chapter 7 deals with intemal structure and working of Central Processing Unit (popularly known as CPU or processor). It also covers the description of primary storage (popularly known as main memory or simply memory). Chapter 8 deals with the structure and working of secondary storage devices. Chapter 9 deals with the structure and working of inpuvoutput devices. Chapter 10 introduces the concept of sofiware. It explains why both hardware and software are necessary for a computer to do useful job, what the various types of sofware are, and how to acquire or develop software. Chapter 11 deals with commonly used tools for planning computer programs, before starting to write them. Chapter 12 deals with commonly used programming languages for writing computer programs. It also explains how to choose a programming language for developing an application. Chapter 13 deals with the main acti of implementation and operation phase, which include testing and debugging of programs. It also covers the importance of documentation of a system, changeover from an existing system to a new system, and system modification and maintenance. Chapter 14 presents the important concepts of operating systems, which is “system software” present in all computer systems. It also introduces some popular operating systems used today. Chapter 15 describes some commonly used application software packages like word-processing package, spreadsheet package, graphics package, and personal assistance package. Chapter, 16 deals with business data processing. It. describes the basic concepts of organizing data, file management system, and database systems. Chapter 17 presents the important concepts of data communications, computer networks, and distributed computing systems. Chapter 18 describes the Internet and its various uses. Chapter 19 explains multimedia computing systems and their applications. Chapter 20 explains how computers are classified as palmtop, laptop, personal computers, workstations, ‘mainframe systems, and supercomputers. It also describes client-server computing, and explains what a client computer and a server computer are. Chapter 21 introduces C programming language and explains how programs are written in C. Sixth Edition Features Readers will find this edition more useful than previous editions because: + New topics and classifications are added to various chapters, introducing readers to newer frontiers in computing, Illustrative diagrams and overall layout are improved to make the contents attractive and easier to read, “201 | Computer Fundamentals * Lecture Notes CD contents is suitably updated. ion. This is mai readers, making the book more suit impact, We are indebted to all the readers and other ‘experts who have used earlier ‘editions of this book and have Provided paliable inputs about its contents. Ther inputs have helped slr sradually improving the overall quality of the book from one edition to another, We are thankful to Mr. Gaur Sunder for Providing valuable inputs regarding technical contents and sentence Structures. His inputs have helped in improving the book's overall quality. We Would like to thank Mr. Rajeev Rudrakshi fr his excellen esign ofthe cover page and is help in improving the overall quality of the slides in lecture notes CD. ‘We would also like to thank Mrs. Sushma Pawar and Mrs, Prajakta Kulkarni for their support activities, We are also thankful to Mr. Manish Jain and other members of BPB Publications for their support and help in Publishing the work. Finally. we would like to thank our Son, Deeptanshu, for his loving support and understanding during the entire period of this long project. We dedicate the book to our parents whose sacrifices, love, and affection made us capable of carrying out such work. Pradeep K. Sinha Priti Sinha March 2011 Asout Lecture Notes CD Computer Fundamentals is widely adopted as a textbook for various courses in Computer Science, Computer Applications, Computer Engineering, Information Technology. and related areas by many universities, colleges, and training institutions. Faculty members and students have praised the book’s contents and its presentation style. They have also provided valuable feedback for its further improvement. Need for lecture notes in the form of presentation slides, is an important feedback received from many faculty members. On the other hand, several students have requested for a quick review material based on the book's contents to enable them to quickly recall the knowledge gained from the book just before an examination or interview. To address these requirements of the users of our book, we have thoughtfully prepared and included a lecture notes CD with the book. It contains chapter-wise presentation slides covering the main points of each chapter in the book. The lecture notes CD is not a substitute for the textbook. They complement each other. Hence, real benefits can be derived when the book and lecture notes are used as mentioned below. We believe that the book and lecture notes, together form the best instructional package currently available to Jaaculty members for teaching the topics covered in the book. CD Contents ‘The CD contains chapter-wise Portable Document Format (PDF) files that can be used as follows: 1, Insert the CD in your computer's CD-ROM drive. If autorun feature is enabled, the index page opens, Otherwise, using your file explorer, navigate the CD- ROM drive file system and double click on index. hm file to open it. Three options provided for viewing/printing the presentation slides contained in the file for each chapter are: a, View Note: Opens the file for vie viewer/reader for presentations, ig and presentation. Use full screen option of PDF b. 2oP Handout: Opens the file for printing two slides on a page format, Use Print option of Pp viewer/reader for printing . ¢ 3oP Handout: Opens the file for Printing three slides on a page format, Use print option of Ppp viewer/reader for Printing. ° ; We Fecommend You to use ret wlewine/printing the contens of the CD using Adobe Acrobat® Reader, we Adobe Acrobat Render wat above, Adobe Acrobat® Reader sofware is freely downlomate from ‘Mip:get.adobe.com/reader/, Following are few tips for: ‘viewing the CD contents in Adobe Acrobat® Reader: 1. To open a chapter's file (in PDF format), run Adobe Acrobat® Reader application and choose File > Open ‘menu option and select the desired file. To view the presentation slides in Full Sereen mode, press Cir! + L key combination OR choose View > Full Sereen menu option, | 3. To print the file's conteits, press Crt + P key combination OR choose File > Print.. menu option and choose appropriate printer and settings. ‘The CD can be used on all computer platforms having followir 1. VGA monitor or better (800x600 Pixel, 256 colors minimum) 2. CD-ROM drive 3. PDF reader/viewer Use by Faculty Members / Faculty members should prepare for their Hectures using the book. However, to save tim and writing notes on board during a lecture, they can use the presentation slides of a chapter bei the following manner: 1 a LCD (Liquid Crystal Display) projection i connected to a PC is available in classroom, they can use “View Note” opi ‘0 display the corresponding presentation slides on a 3. If neither LCD projection system, nor OP system is a Handout” or “3oP Handout” option ‘mentioned presentation slides on a single page wailable for use in classroom, they can use “2oP above to print handout material containing multiple the lecture. “About Lecture Notes CD [3] Use by Students Students should primarily use the book for acquiring knowledge on the topics covered. This is because the presentation slides of the lecture notes CD cover only the main points and not full details and explanation of the subject being dealt with. Hence, students can use the lecture notes CD to: 1. Browse through the main points of a chapter before going to the class on the day that chapter is to be taught. This will enable them to have better understanding of the topics being taught in the class. 2. Review the main points of the,topies they have already learnt through the book or classroom lectures just before an examination or interview. Normally, students do not have sufficient time just before their examination or interview to go through the contents of the book. Adobe Acrobat® Reader is a trademark of Adobe Corporation. | AssReviations -BASDN Broadband ISDN ——______?_~ANy BNA Burroughs Network Architecture ie Bytes Per Inch 26 Second Generagich ESD Berkeley Softwa /Dstibtion 3 BSNL Bharat Sanchar Nigam Limited —_—____ 3 3G Third Generation c a A cAD Computer Aided Design Lo Computer Aided Engineering A Accumulator register CAM Computer Aided Manufacturing AD Analog-to-Digital CAN Campus Area Network ABC Atanasoff Berry Computer CASE Computer Aided Software ACL Access Control List Engineering ACM Association for Computing Machinery cD Compact Disk AL Artificial Intelligence C-DAC Centre for Development of Advanced ALGOL —ALGOrithmic Language Computing ALU Arithmetic Logic Unit cpc Control Data Corporation AM Amplitude Modulation CDR CD-Recordable AMD Advanced Micro Devices CD-ROM — Compact Disk Read Only Memory ANSI American National Standards Institute CD-RW CD Read/Write APL A Programming Language CHS Cylinder Head Sector ARPANET Advanced Research Project Agency CIsc Complex Instruction Set Computer Network cL Command Language ASCIL American Standard Code for CLI Common Language Infrastructure; Information Interchange Command Line Interface ATM Automatic Teller Machine; CLR ~~. Common Language Runtime Asynchronous Transfer Mode COBOL —_COmmon Business Oriented z Language ‘CODASYL Conference On DAta SYstems SS ees thabha Atomic Research Cent Languages Pane abel ‘Alkpapeee Sy an CPPM Content Protection for Pre-recorded Instruction Code Media BCD Binary Coded Decimal ces Characters Per Second 310S Basic Input Output System cpu Central Processing Unit MPS Billions of Instructions Per Second CRT Cathode Ray Tube CSCW Computer Supported Cooperative Working cu Control Unit FF DIA Digital-to-Analog, DAT Digital Audio Tape DBMS —_Daata Base Management System DBS Demand Based Switching DDL Data Definition Language DDS Digital Data Storage DEC Digital Equipment Corporation DMA Direct Memory Access DML Data Manipulation Language DNA Digital Network Architecture DPI Dots Per Inch DRAM Dynamic RAM DRDO —_Defense Research and Development Organization DSN ted Systems Network DTS Digital Theater System DVD Digital Video/Versatile Disk E ——————_ -._ EBCDIC Extended Binary Coded Decimal Interchange Code ECMA —_ European Computer Manufacturers Association EDSAC Electronic Delay Storage Automatic Calculator EDVAC Electronic Discrete Variable Automatic Computer EEPROM Electrically EPROM EFM Eight-to-Fourteen Modulation ENIAC Electronic Numerical Integrator And Calculator EPG Electronic Programming Guide EPIC Explicitly Parallel Instruction ‘Computing EPROM Erasable Programmable Read-Only Memory ERNET Education and Research NETwork F FAT File Allocation Table FDM Frequency Division Multiplexing FEP Front End Processor FLOPS —_Floating Point Operations Per Second. FM Frequency Modulation FMS File Management System FORTRAN FORmula TRANSIation ey FSK Frequency Shift Keying FTP File Transfer Protocol s GB Giga Bytes GFLOPS Giga FLOPS GHz Giga Hertz, GIGo Garbage In Garbage Out GIs Geographical Information System GNU Gnu Not Unix GPL General Public License GPRS General Packet Radio Service GPS Global Positioning System GsM Global System for Mobile communication Gu Graphical User Interface 4 es HP Hewlett Packard HSS Hierarchical Storage System HTML ——_HypterText Markup Language HTTP HyperText Transport Protocol Hz Hertz 1 I Instruction register vo Input and Output; VO register 1BG Inter Block Gap IBM International Business Machines Ic Integrated Cireuit DL Interface Definition Language; Intermediate Definition Language IDN Integrated Digital Networks IEEE Institute of Electrical and Electronics Engineers INSAT Indian National SATellite P Internet Protocol IDA Infrared Data Association IRG Inter Record Gap ISAM Indexed Sequential Access Method ISDN Integrated Services Digital Network Iso International Standards Organization ISP Internet Service Provider J 2 J2EE Java 2 Enterprise Edition ho (8a ] Computer Fundamentals eS ee RSE Java 2 Standard Edition NIC National Informatics Centre; Network ICL Job Control Language Interface Card or Just-ln-Time NICNET National Informatics Center NETwork JPEG Joint Photographie Experts Group Nos ‘Network Operating System JRE Java Runtime Engine NTSC National Television Systems ISP Java Server Pages Committee K ° KB Kilo Bytes OcR Optical Character Recognition KHz Kilo Hentz OMR Optical Mark Reader OOP Object-Oriented Programming L Os Operating System ‘<< ictm. Eo. he OsI Open System Interconnection TAN Local Area Network oss Open Souree Sofware Leb Liquid Crystal Display LED Light Emitting Diode P LISP LISt Processing LPM Lines Per Minute PAL Phase Alternating Line Lsb Least Significant Digit PAN Personal Area Network LST Large Scale Integration Pc Personal Computer; Program Control register M PCB Process Control Block; . Board MAN Metropolitan Area Network PDA Peary MAR Memory Address Register PDF Portable Document Format MB Mega Bytes . PDL Program Design Language MBR Memory Buffer Register pos Proganiaial Dats Prec MFLOPS — Mega FLOPS — PIM Personal Information Manager MFT Multiprogramming with Fixed Tasks PIP Peripheral Interchange Program es Mega Hertz ; PLL Programming Language One -MICR Magnetic Ink Character Recognition et PeeManiian MIDI Musical Instrument Digital Interface 1S Point OF Sale i Pepa ee Per Second POTS Plain Old Telephone Service PPM Pages Per Minute Hane Microcom Network Prot PRIMENET PRIME Computers NETwork MODEM — MOdulator/DEModulator PROM Programmable Read-Onlf Pinon MP3 MPEG-1 Audio Layer 3 aromnmnabte me 2 PSTN Public Switched Telephone Network MPEG Moving Pictures Expert Group a MPI Message Passing Interface ae pete a MSCDEX — MicroSoft CD EXtension ee MSD Most Significant Digit Q MS-DOS MicroSoft Disk Operating System MST Medium Scale Integration BE Query By Example MTNL —— Mahanagar Telephone Nigam Limited QC Quarter Inch Cartridge MVT. Multiprogramming with Variable QoS Quality of Service Tasks N aa 7 — ID. Redundant Array of Inexpensive NCMRWF National Center for Medium Range Disks Ary of Inerpen Weather Forecasting RAM Random Access Memory Abbreviations [Geil RGB Red, Green and Blue USB Universal Serial Bus RISC Reduced Instruction Set Computer UTF Unicode Transformation Format rlogin Remote Login uTP Unshielded Twisted Pair ROM Read Only Memory UVEPROM Ultra Violet EPROM RPG Report Program Generator UWB Ultra Wide Band s v sD Secure Digital ‘VAN ‘Value Added Network SDK Sofiware Development Kit VCR Video Cassette Recorder SDLC Software Development Life Cycle VDT Video Display Terminal SEQUEL Structured English QUEry Language VGA ‘Video Graphies Array SGML ‘Syntax for Generalized Markup VLSI Very Large Scale Integration Language voD ‘Video-On-Demand SIMM Single In-line Memory Module VoIP Voice over Internet Protocol SNA Systems Network Architecture VSAT Very Small Aperture Terminal SNOBOL StriNg Oriented symBOlic Language VSNL —_Videsh Sanchar Nigam Limited SQL Structured Query Language VTOC —_-Volume Table Of Contents SRAM Static RAM SSI ‘Small Scale Integration w 1 WAN Wide Area Network =f. WAP Wireless Application Protocol TB ‘Tera Bytes WiMAX Worldwide Interoperability for TCO Total Cost of Ownership Microwave Access rep ‘Transport Control Protocol WLAN Wireless Local Area Network TCPAP —— Transmission Control WL Wireless Local Loop Protocol/Internet Protocol WORM Write Once Read Many TDM Time Division Multiplexing WWW World Wide Web TFLOPS Tera FLOPS WYSIWYG What You See Is What You Get u x upp User Datagram Protocol X.400 Electronic Mail Protocol upT User Data Type X.500 Directory Server Protocol ULSI Ultra Large Scale Integration XHTML eXtensible HyperText Markup UNIVAC — UNIVersal Automatic Computer Language upc Universal Product Code XML. URL Uniform Resource Locator eXtensible Markup Language Chapter 1 Introduction The word “computer” comes from’ the word “compute”, which means, “to calculate”. Hence, people usually consider a computer to be a calculating device that can perform arithmetic operations at high speed/ Although the original objective of inventing a computer was to create a fast calculating device, we now define a computer as a device that operates upon data because more than 80% of work done by today's computers is data processing. Data can be anything like bio-data of applicants when computer is used for shor listing candidates for recruiting: marks obtained by students in various subjects when used for preparing results; details (name, age, sex, etc.) of passengers when used for making airline or railway reservations; or number of different parameters when used for Solving scientific research problems, etc, Notice from the examples that data can be either numerical, non- numerical, or a mixture of both, A computer is often referred to as a data processor because it can store, process, and retrieve data whenever desired. The name data processor is more inclusive because modern computers not only compute in the usual sense but also perform other functions with data that flows to and from them. For example, data processors may gather data from various incoming sources, merge (process of mixing or putting together) them all, sort (process of arranging in some sequence ~ ascending or descending) them in the desired order, and finally print them in desired format. Notice that none of these operations involves arithmetic computations in the usual sense but a ‘computer is the most suitable device for performing them. ‘The activity of processing data using a computer is called dati processing. Data processing consists of three sub- activities: capturing input data, manipulating the data, and managing output results, As used in data processing, information is data arranged in an order and form that is useful to people receiving it. Hence, data is raw material used as input to data processing and information is processed data obtained as output of data processing (see Figure 1.1). Ouput, ~~ Information Finished prosivet Figure 1.1. A computer (also known as data processor) converts data into information. CHARACTERISTICS OF COMPUTERS Increasing popularity of computers has proved that it isa very powerful and useful tool. The power and usefulness of this popular tool are mainly due to its following characteristies | 1. Automatic, An automatic machine works by itself without human intervention. Computers are automatic machines because once started on a job, they carry out the job (normally without any human assistance) until it is finished, However, computers being machines cannot start themselves and cannot go, out and find their own problems and solutions. We need to instruct a computer using coded instructions that specify exactly how it will do a particular job. Some of the other characteristics of computers (such as speed and accuracy) are because they are automatic and work on a problem without any human intervention. 2. Speed. A computer is a very fast device. It can perform in a few seconds, the amount of work that a hhuman being can do in an entire year ~ if he/she worked day and night and did nothing else, In other ‘words, a computer can do in a few minutes what would take a man his entre lifetime. While talking about the speed of a computer we do not talk in terms of seconds or even milliseconds (10°) but in terms of microseconds (10°), nanoseconds (10°), and even picoseconds (10 ), A powerful ‘computer is capable of performing several billion (10°), even trillion (10), simple arithmetic operations per second. 3. Accuracy. In addition to being very fast, computers are very accurate. Acciiracy of a computer is consistently high and the degree of its accuracy depends upon its design. A computer performs every calculation with the same accuracy. However, errors can occur in a computer, These errors are mainly due to human rather than technolo ‘weaknesses. For example, errors may occur due to imprecise thinking by a programmer (a person who \writes instructions for a computer to salve a particular problem) or incorrect input data. We often refer to ‘computer errors caused due to incorrect input data or unreliable programs as garbage-in-garbuge-out (GIGO). Diligence. Unlike human beings, a cémputer is free from monotony, tiredness, and lack of concentration. It can continuously work for hours without creating any error and without grumbling, Hence, computers score over human beings in doing routine type of jobs that require great accuracy. If ten million calculations have to be performed, a computer will perform the last one with exactly the same accuracy and speed as the first one. : - me Versatility. Versatility is one of the most wonderful things about a computer. One moment itis preparing results of an examination, next moment it is busy preparing electricity bills, and in between, it may be helping an office secretary to trace an important letter in seconds. All that is required to change its talent {s 10 slip in a new program (a sequence of instructions for the computer) into it, In brief, a computer is capable of performing almost any task, ifthe task can be reduced toa finite series of logical steps. 6, Power of remembering. As a human being acquires new knowledge, hisher brain subconsciously selects ‘what it feels to be important and worth retaining, in memory. The brain relegates unimportant details to ~ wy ’ We olution of Computers: [73] back of mind or just forgets them. This is not the ease with computers. A computer can store and recall Sty amount of information because ofits secondary storage (a type of detachable memory) capability. It can retain a piece of information as long as a user desires and the user can recall the informeson whenever required. Even after several years, a user can recall exactly the same information that he/she ha stored in the computer several years ago. A computer forgets or looses cerzin information only when F raet asks it to do so, Hence, itis emirely up to the user to make a computer retain or forget some information, No. Q. A computer is not a magical device. It possesses no intelligence of its own, Its Q is zero, at Feast until today. It has to be told what to do and in what sequence. Hence, only a user determines what ‘asks a computer will perform. A computer cannot take its own decision in this regard No feelings. Computers are devoid of emotions. They have no feelings and no instincts because they are fruchines. Although men have succeeded in building a memory for computer. but no computer posesees de eativalent of a human heart and soul. Based on our feelings, tate, knowledge. and expenence we often make certain judgements in our day-to-day life whereas, computers cannot make such judgements on their own, They make judgements based on the instructio ns given to them in the form of programs that are written by us (human beings). Figure 1.2 provides a summary of characteristics of computers. = Sr.No. | Characteristics Description ] Automatic. | ttcarries outa job normally without any human intervention 2 | Speca I can perform several billion (10°), even trillion (10"), simple arithmetic ‘ ‘operations per second we | Accuracy I performs every calculation with the same accuracy v7 _| Diligence {tis free from monotony. tiredness, and lack of concentration | Versatitty {can perform a wide variety of sks {can store huge amount of information and can recall any piece of this information 47 _| Memory whenever required 7 [wore i cannot take ts ovin decisions, and has to be instructed what to do and in what sequence . J 18 _[No feetings cannot make judgments based on feelings and instinets Figure 1.2. Characteristics of computers, EVOLUTION OF COMPUTERS Necessity js the mother of invention. The saying holds true for computers too. Researchers invented computers because of man’s search for fa and rate calculating devices. Blaise Pascal invented the first mechanical adding machine in 1642. Later, in the year 1671, Baron Gottfried Wilhelm von Leibniz. of Germany invented the first calculator for multiplicat in the United States around 1880 and we use them even tod: Business, tion, Keyboard machines originated Around the same period. Herman Hollerith came up with the concept of punched cards that computers used extensively as input medium even in late 1970s, nineteenth ichines and calculators made their appearance in Europe and America towards the end of the entury. \ — Chapter 4: tnuroduction 4 w father of mode, Tiles Babbage, a nineteen century Profesor at Cambridge Universi. oa Serial nt stalin Sigital programmable computers He had employed a Foe Oe archi ind ecaltions could tables, Babbage had to ‘spend several hours checking these tables because even utmost cf monotonous job, Ag Fault mnt human errors. Soon he became dssaisfed and exasperated with this wool eet tes keg [Hull he started thinking about building a machine that could compute tables verdict reliable tables To 1842, Process, Babbage designed a “Differenc Engine” in the year 1822 that could produce ri ing basic arithmetic Babbage came out with his new idea of ’ completely automatic Analytical Engine for a ferumanet he was functions for any mathematical problem at an faggot ios fet noe. Unfortu, boas Unable to produce a working model ofthis machine kecaree the precision engineering required to eel ee Fann its 8 available during that period, However, his effonsexalishd a number of principles that are fundamental to the design of any digital rogrammable computer. sulot drawback ofthe early automatic calelaing machines was tha their programs were wired on boaftsthid Thoreau to change programs. In 1940s, Dr John Von Neumann introduced ihe “stored program concept jhat helped in overcoming hard-wired program problem The toe le tebe toe, concept is that a sequence of instructions and data can be stored in memory of a computer for automaticaly directing flow of operations. This feature considerably influenced development of moder digital computers because of ease with which different Computer ate loaded and executed on a single computes Due to tis feslure, we often rete o meen digital ‘Computers as stored program digital computers Figure 1.3 provides basic information about some ofthe well-known early computers, »~ COMPUTER GENERATIONS nner Generation” in computer talk. provides a framework for the growth of computer industry based on key technologies developed. Originally, it was used to distinguish between hardware technologies but was later extended to include both hardware and software technologies. In the description below, you will come across several new terminologies, Subsequent chapters will deal. with these terminologies in detail. The idea here isto provide an overview ofthe ‘major developments and technologies uring the five generations of computers and not to explain them in deval Hence, this section provides. an Overview of what all you are going to learn in this entire book. First Generation (1942-1 955) The early computers of Figure 1.3 and others oftheir time were manufactured Using vacuum tubes as electronic switching d ‘fy0o unowy yon ou) Jo ous loge UOREUUEH SEG “EE @ANBld -svaindwoo r Toning ‘soi Zot Isot iS revel Aejaq suon9a(3| UL (ovada) soda Sarwony asap Jo peas oy Cag wt EP ree Mate pau uo post 2rndwo> ty 2 wor |_—_ 59461 ovina Ayanaye wor po A rads tA Senuopgounosty | —_ SI-EN6t av) aaj pn us 4) soHaede pu cece) | Suma soseumy 9 cv spose sp pu sloqu os pp oF PHBE € no 29 i 8 un somo roa Jono pant 9120 nv "VivenoH | PrLCé rey pos 5 -soanyeay A935 sqeg ayeunpxorddy auwu wa}sks [Ea sonata nao La “was composed of magnetic cores. Magnetic cores are small rng Chapter 1 Introduetion Most of the first-generation computers worked on the principe of storing program tala bt a Memory of computer (stored program concept) so that they could automatically wees ee instructions let teeTention. Memory of these computers used electromagnetic relays, and users fed al ylinguages scone iis stem Using punched cards Programmers wrote instructions in machine and assembly language Because 9 cof high-level programming languages in those days. Since machine and assembly languages are difficult ‘work with, only a few specialists understood how to program these carly computers. Characteristic features of first-generation computers area follows: They were the fastest calculating devices oftheir time, 2 They were too bulky in size, requiring large rooms for instalation, They used thousands of vacuum tubes that emitted large amount of heat and burt out frequently, Hence, ‘he rooms/areas in which these computers were located had to be Properly air-conditioned. Each vacuum tube consumed about half a watt thousand vacuum tubes, of power. Since a computer typically used more than ten Power consumption of these computers was very high, 5. AS vacuum tubes Used filaments, they had a limited life, Because a computer used thousands of vacuum tubes, these . ‘computers were prone to frequent hardware failures & Due to low mean time between failures, these computers required constant maintenance. In these computers, thousand: s of individual components were assembled manually by han« circuits. Hence, commercial Production ofthese computers was difficult and costly. Since these computers were diffi icult to program and use, they had limited commercial use, Second Generation (1955-1 964) electronic switching device called transistor John Bardeen, Willian Shockley, and Walter Brattain invented a new {see Figure 1.4(b)] at Bell Labor soon proved to be a beter electronic switching device ratories in 1947. Transisto than vacuum tubes due to ther following proper 4. They ‘were more rugged and easier to handle than tubes since they were made of germanium semiconductor material rather than glass, 2. They were highly reliable as compared to tubes since they had no Parts like a filament that could burn out, 3. They could switch much faster (almost t ten times faster) than tubes. Hence, switching circuits made of ‘ransistors could operate much faster than their counterparts made of tubes, ‘They consumed almost one-tenth the power consumed by a tube. ‘They were much smaller than a tube. ‘They were less expensive to produce. They dissipated much less heat as compared to vacuum tubes. Second-generation computers were manufactured using transistor S. They were more powerful, more reliable, less expensive, smaller, and cooler to operate than the first-generation ‘computers, The second generation also experienced a chang in sorag ecology, Memory of second-generation computers made of ferrite that can be magnetized in either Computer Generations [777] Clockwise or anti-clockwise direction. Large random access memory (having storage capacity of few tens of kilobytes) had several magnetic cores strung on a mesh of wires. In 1957, researchers introduced magnetic tape as a faster and more convenient secondary storage medium. Later ‘magnetic disk storage was also developed, and magnetic disk and magnetic tape were the main secondary storage media used in second-generation com iputers. Users still used punched cards widely for preparing and feeding programs and data toa computer. On software front, high-level programming languages (like FORTRAN, COBOL, ALGOL, and SNOBOL) and batch operating system emerged during second generation. High-level programming languages made second- generation computers easier to program and use that first-generation computers. Introduction of batch operating system helped in reducing human intervention while processing multiple jobs resulting in faster processing, enhanced throughput, and easier operation of second-generation computers. In addition to scientific computations, business and industry users used second-generation computers increasingly for commercial data processing appli ications like payroll, inventory control, marketing, and production planning. Ease of use of second-generation computers gave birth to a new in computing that is more oriented towards usa; profession of programmers and systems analysts computer science related courses in several col we rather than design of computers. This triggered introduction of leges and universities, Characteristic features of second-generation computers are as follows: 1. They were more than ten times faster than the first-generation computers. 2 They were smaller than first-generation computers and required smaller space. 3, They consumed less power and dissipated less heat than the first-generation computers. The rooms/areas in which the second-generation computers were located still required to be properly air-conditioned. 4, ‘They were more reliable and less prone to hardware failures than the first-generation computers. 5. ‘They had faster and larger primary and secondary storage as compared to first-generation computers. They were easier to program and use than the first-generation computers. Hence, they had wider commercial use, 7. In these computers, thousands of individual transistors had to be assembled manually by hand into electronic circuits making commercial production of these computers difficult and costly. (2) A vacuum tube {b) A transistor (O)AnIC chip Figure’t.4. Electronics devices used for manufacturing computers of different generations. A ee Third Generation (1964-1975) rate In 1958, Jack St. Clair Kilby and Robert Noyce invented the first ee cos ad coaches gomage a ICS) are circuits consisting of several electronic component like pen hiclaas wacilon Evie Single chip of silicon eliminating wired interconnection between comp: T numnber of circuit components into “microelectronics” technology because it made it possible to integrate larg Figure Lt). Initially the integrated Yeny small (less than 5 mm square) surface of silicon, known as “chip” [see was named small-scale integration cacults contained only about ten to twenty components. This technology wa . yssible to integrate up to (SSI) Later with the advancement in technology for manufacturing ICs, it viens integration (MSD. about hundred components on a single chip. This technology was knovn as me x circuit. Integrated circuits (called “ ind later ones used Third generation computers were manufactured using ICs. Earlier ones used SsTeeeanody tak pa od MSI technology. ICs were smaller, less expensive to produce, aore iene aol ‘companegs eel dissipated less heat, and consumed less power than circuits built by wiring elect smaller, and cooler i: Hence, third-generation computers were more powerful, more reliable, less expensive, Fh operate than second-generation computers. Parallel advancements in storage technologies allowed construction of larger magnetic core based att ane recat ce (nel as larger capacity magnetic disks and tapes. Hence, third-generation computers Serene imegabytes (less than 5 Megabytes) of main memory and magnetic disks capable of storing few tens of megabytes of data per disk drive. On ‘software front, standardization of high-level programming languages, timesharing operating systems, Unbundling of software from hardware, and creation of an independent software industry happened during third Since FORTRAN and COBOL were the most popular high-level programming languages in those days, American National Standards Institute (ANSI) standardized them in 1966 and. 1968 respectively, and the Standardized versions were called ANS] FORTRAN and ANSI COBOL. The idea was that as long as a ee NST reqaow's these standards in program writing, he/she could run hither program on any computer with MANS! FORTRAN or ANSI COBOL compiler (See Chapter 12 fr details). Some mote high-level programming languages were introduced during the third-generation period. Notable among these were PL/I, PASCAL, and BASIC. Second-generation computers used batch Programs and then submit them to a computer entre for processing. The opera these user jobs and fed them to @ computer in batches at scheduled intervals. The respective users then collected their job's output from the computer centre, The inevitable delay resulting from thie bank Processing approach caece fustating to some users, especially programmers, because often they had to walt fp days to locate and correct a few program errors. To rectify this situation, John Kemeny and Thomas Kurtz of Dartmouth College dean ee tne concept of timesharing operating system, Timesharing operating system cables ‘multiple users to directly access and share a computer's resources simultaneously in a manner that each user feels that no one else is using the computer. This is accomplished by using a large number of independent, relatively low-speed, on-line the enals connected to the computer simultaneously. A separate user uses each ternincl ng gain direct access to te computer. Timesharing operating system allocates CPU time in such a way hatch ser programs have a brief to another rapid succession and execute a small portion of each jab in alloc slice until the job is completed. Bach user gets the illusion that he/she alone is using the computer Introduction of timesharing concept helped in drastically improving the productivity of programmers and made on-line systems feasible, resulting in few on-line applications like arine reservation systems, ineactive query geen tt Se Computer ( Until 1965, computer manufacturers sold their hardware along with all associated software without separately charging for software. For example, buyers received language translators for all languages supported on a ‘computer they purchased. From user's standpoint, software was free. However, the situation changed in 1969 when IBM and other computer manufacturers began to price their hardware and software products separately. This unbundling of software from hardware gave users an opportunity to invest only in software of their need and value. For example, now buyers could purchase only the language translators they needed and not all language translators supported on the purchased computer. This led to the creation of many new software houses and the beginning of an independent software industry. Another important concept introduced during third-generation was that of backward compatible family of computers. During this period, IBM introduced its System 360 as a family of computers with backward compatibility as they were different sizes of mainframe systems based on the same machine language. This enabled businesses to upgrade their computers without incurring costs of replacing peripheral equipment and modifying programs to run on new systems, Development and introduction of minicomputers also took place during third-generation. Computers built until early 1960s were mainframe systems that only very large companies could afford to purchase and use. Clearly, a need existed for low-cost smaller computers to fill the gaps left by the bigger. faster, and costlier mainframe systems. Several innovators recognized this need and formed new firms in 1960s to produce smaller computers. Digital Equipment Corporation (DEC) introduced the first commercially available minicomputer, the PDP-8 (Programmed Data Processor, in 1965. It could easily fit in the comer of a room and did not require attention of a full-time computer operator. It used timesharing operating system and a number of users could access it simultaneously from different locations in the same building. Its cost was about one-fourth the cost of a traditional ‘mainframe system making it possible for smaller companies to afford computers. It confirmed the tremendous demand for small computers for business and scientific applications, and by 1971, there were more than 25 computer manufacturers in minicomputer market, Characteristic features of third-generation computers are as follows: 1 ‘They were more powerful than second-generation computers. They were capable of performing about 1 million instructions per second, ‘They were smaller than second-generation computers req} ing smaller space. They consumed less power and dissipated less heat than second-generation computers, The rooms/areas in which third-generation computers were located still required to be properly air-conditioned. They were more reliable and less prone to hardware failures than second-generation computers requiring lower maintenance cost. They had faster and larger primary and secondary storage as compared to secondsgeneration computers. ‘They were general-purpose machines suitable for both sciemtific and commercial applications. ‘Their manufacturing did not require manual assembly of individual components into electronic circuits resulting in reduced human labor and cost involved at assembly stage. Hence, commercial production of these systems was easier and cheaper. However, highly sophisticated technology and expensive setup was, required for the manufacture of IC chips. Standardization of high-level programming languages allowed programs written for ane computer ta be casily ported to and executed on another computer. 9. Timesharing operating system allowed interactive usage and simultaneous use of these systems by multiple users. 10, , ivy of programmers cutt Timesharing operating system helped in drastically improving the productivity of progr me veral fold. down the time and cost of program development by several if System also made on-line systems feasible resulting in usage of these systems for 1. Timesharing operating ‘ew on-line applications. Unbundiing of software software of their need and value - '5: Minicompaters of third-generation made computers affordable even by smaller companies. from hardware gave users of these systems an opportunity to invest only in Fourth Generation (1975-1989) icked on a silicon chip doubled each year after 1965. This progress a me when it was possible to integrate over 30,000 electronic large-scale integration (VLS1) when it was possible to integrate velopment ~ creation ll circuits needed to perform arithmetic logic and control on a single chip. Hence, it became possible to build a complete nen ser with a microprocessor. a few addtional primary Storage chips, and other suppor circuitry. It started a They ocial revolution ~ personal computer (PC) revolunon Overnight computers became incredibly: compact. They became inexpensive to make, and suddenly it became possible for many to own a computer. Average number of electronic components soon led to the era of large-scale ineeration spmponents on a single chip, followed by very about one million electronic components on a zh Of a microprocessor. a ‘s8Or contains al By 1978. Apple Il from Apple Computer Inc. and the a. 780, model from the Radio Shack Division of Tandy Corporation were dominant personal computers By 1980, IBM realized thatthe personal computer market wag mean cfoutising t© ignore and came out with its own PC in 1981 Popularly known as IBM PC. Several other Heftion and designed their own PCs, popularly known as IBM compatible PCs or manufacturers used IBM's specifi Clones. The IBM PC and its clones became a Popular standard for the PC industry during the fourth generation. . ‘magnetic core memories resulting in large random oF gist access time. Hard disks became cheaper, smaller an larger in capacity. In Poppy disks became popular asa portable mediutn for Porting programs and data from search : cluded Cray hereas of the later category included TBM, Silicon Graphics, and Digital Equipment Corporation. ‘ king also developed during fourth- i High-speed computer networking a " shen ot. This enabled interconnection of Iultiple computers for communication and sharing of dala among the Local area networks (LANs) bocance popular for connecting computers within an organization or win 8 campus. Similarly, area networks (WANs) became popular tor connecting computers located larger distances. This gave ri to network of computers and distributed systems, Computer Generations [77 (On software front, several new developments emerged to match the new technologies of fourth generation, For example, vendors developed several new operating systems for PCs. Notable ones among these were MS-DOS, MS-Windows, and Apple's propriety Mac OS. Since PCs were for individuals who were not computer professionals, companies developed graphical user interfaces for making computers more user friendly (easier to use). A graphical user interface (GUD provides icons (pictures) and menus (list of choices) that users can select With a mouse. PC manufacturers and application software developers developed several new PC-based applications to make PCs a powerful tool. Notable among these were powerful word processing packages that allowed easy development of documents, spreadsheet package that allowed easy manipulation and analysis of data organized in columns and rows, and graphics packages that allowed easy drawing of pictures and diagrams. Another very useful concept that became popular during fourth-generation was that of multiple windows on a Single terminal screen, This feature allowed users to sce the status of several applications simultaneously in separate windows on same terminal screen, In the area of software for large-scale computers, key technologies that became popular included multiprocessing operating systems and concurrent programming | languages. With multiprocessing operating systems, a mainframe system could use multiple processors (a main processor and several subordinate processors) in such a manner that the subordinate processors could manage the user terminals and peripheral devices, allowing the main processor 0 concentrate on processing. the main program, improving the overall performance. Supercomputers also used multiprocessing operating system to extract the best performance from the large number of processors used in these systems. Concurrent Programming languages further helped in effectively using the multiprocessing capabilities of these systems by allowing programmers to write their applications in such a way that different Processors could execute parts of the application in parallel. The most ambitious language of this type was ADA During fourth-generation, the UNIX operating system also became very popular for use on large-scale Additio nally, due to proliferation of computer networks, several new features were included in existing syster operating ms to allow multiple computers on the same network to communicate with each other and share resources, systems, Some other software technologies that became popular during fourth-generation are C programming language, object-oriented software design, and object-oriented programming. C language combines features of hish level programming languages with efficiency of an assembly language. The primary objectives of object-oriented software design are to make programs generalized and to build software systems by combining reusable pieces of Program codes called objects. To facilitate object-oriented software design, several object-oriented programming languages were introduced. Out of these, C++ emerged as the most popular object-oriented language. Characteristic features of fourth-generation computers are as follows: 1. PCs were smaller and cheaper than mainframes or minicomputers of third generation. 2. Although the fourth-generation mainframes and supercomputers required proper air-conditioning of the Fooms/areas in which they were located, no air-conditioning was required for PCs. 3. They consumed less power than third-generation computers. 4. They were more reliable and less prone to hardware failures than third-generation computers requiring negligible maintenance cost. 5. ‘They had faster and larger primary and secondary storage as compared to third-generation computers 6, They were general-purpose machines. Their manufacturing did not require manual assembly of individual components into electronic circuit resulting in reduced human labor and cost involved at assembly stage, Hence, commercial production 9 these systems was easier and cheaper. However, highly sophisticated technology and expensive setup wa required for manufacturing LSI and VLSI chips. for one computer to be 8. Use of standard high-level programming languages allowed programs written ‘easily ported to and executed on another computer. es ters. 9°. Graphical user interface (GUD enabled new users o quickly learn how to use compl 10. PC-based applications made PCs a powerful tool for both office and home usage. 1. Network of computers enabled sharing of resources like disks, printers, etc. ame aida et and their users. They also enabled several new types of applications oak Working (cscm, computer users at geographically distant locations. Computer Supported Coope) : i ject and a aaupware is one such application in which multiple members working on a single project and located 3t distant locations cooperate with each other by using a network of computers. '2. In addition to unbundled software, these systems also used addon hardware Feature that allowed users to invest only in the hardware ‘Configuration and software of their need and value. 15. PCs of fourth generation made Gomputers affordable even by individuals for ther personal use at home, 4 Supercomputers of fourth generation enabled parallel processing of different parts of an application on {arse number of processors used in these systems. This, in tum, enabled running of time-consuming applications much faster. Fifth Generation (1989-Present) dramatic increase in power of microprocessor k continued during fifth generation. VLSI technology fifth generation resulting in production of oF maja cessor chips having ten million electronic components. Infact, the speed of ‘microprocessors and the size Cf main memory and hard disk doubled almost every eighteen month, Meo result, many features found in the CPUs of large mainirame systems of third- and fourth-generation systems became part of microprocessor puchitecture in fith generation. This ultimately resulted in availability of very powerful and compact computers i mainframe systems. Recently, processor ng multicore processor chips instead of increasingly powerful (faster single-core Processor chips. The multicore chips improve overall performance by handling more work parallel Due to this fast pace of advancement in computer technology, we see more compact and more powerful eer uers being introduced almost every year at more or less the same price os cca cheaper. Notable among aoerfel ane the power of PC to their users even while traveling, powerful sesktop PCs and workstations, powerful servers, powerful supercomputers and handheld computers, (sce Chapter 20 for a detailed description of these types of computers), Storage technology also advanced making larger main memory and disk storage available in newly introduced systems. Currently, i capacity are common. Similarly, workstations having 4 to 64 Gigabstes of main memory and few hundreds of Gigabytes of hard disk capacity are common, RAID (Redundant Array of newman Disks) technology enables Zonfiguration of a bunch of disks asa single large disk. It, thus, supports arene space with better in-built ‘liability. During fifth generation, optical disks (popularly known a8 Conpaak [ok oF CDs) emerged as a sopular portable mass storage media athe area Of large-scale systems, fifth-generation saw the emergence of more Powerful supercomputers based on arallel processing technology. They used multiple processors and wen of two types — shared memory and tributed memory parallel computers. In a shared “memory Parallel computer, a high-speed bus or mmunication network interconnects a number of processors toa common main memory, whereas in a ee _ Computer Generations [743] distributed memory parallel computer, a communication network interconnects a number of processors, each with its own memory. These systems use parallel programming technique to break a problem into smaller problems and execute them in parallel on multiple processors of the system. Processors of a shared memory parallel ‘computer use memory access mechanism for communication, whereas those of a distributed memory parallel computer use message-passing mechanism for communication. Distributed memory parallel computers have better scalability (can grow larger in capability) than shared memory parallel computers, and are now built by clustering together powerful commodity workstations by using a High-speed commodity switched network. This is known as clustering technology. A + During fifth generation, the Internet emerged with associated technologies and applications. It made it possible for ‘computer users sitting across the globe to communicate with each other within minutes by use of electronic mail (known as e-mail) facility. A vast ocean of information became readily available to computer users through the World Wide Web (known as WWW), Moreover, several new types of exciting applications like electronic commerce, virtual libraries, virtual classrooms, distance education, etc. emerged during the period. The tremendous processing power and the massive storage capacity of fifth-generation computers also made them a very useful and popular tool for a wide range of multimedia applications dealing with information containing text, graphics, animation, audio, and video data. In general, data size for multimedia information is much larger than plain text information because representation of graphics, animation, audio, or video media in digital form requires much larger number of bits than that required for representation of plain text. Because of this, multimedia Computer systems require faster processor, larger storage devices, larger main memory, good graphics terminal, and inpuVoutput devices required to play any audio or video associated with a multimedia application program. ‘The availability of multimedia computer systems resulted in a tremendous growth of multimedia applications during fifth-generation, In the area of operating systems, some new concepts that gained popularity during fifth-generation include microkernels, multithreading, and multicore operating systems. Microkernel technology enabled designers to model and design operating systems in a modular fashion. This makes operating systems easier to design and implement, easier to modify or add new services, and allows users to implement and use their own service. Multithreading technology is a popular way to improve application performance through parallelism. In traditional operating systems, basic unit of CPU scheduling is a process but in multithreading operating systems, basic unit of CPU scheduling is a thread. In such operating systems, a process consists of an address space containing its instructions and data, and one or more threads sharing same address space. Hence, these systems can create a new thread, switch CPU between threads, and share resources between threads of same process more efficiently than between processes, resulting in faster execution and better overall system performance. A ‘multicore operating system can run multiple programs at the same time on a multiocre chip with each core handling a separate program. In the area of programmi 2 languages, concepts that gained popularity during fifth generation are JAVA programming language, and. parallel programming libraries like MPI (Message Passing Interface) and PVM (Parallel Virtual Machine). JAVA is used primarily on the World Wide Web. It supports Java-based applets allowing web pages to have dynamic information and more interactivity with users of web information. MPI and PVM libraries enable development of standardized parallel programs, so that a programmer can easily port and execute a parallel program developed for one parallel computer on other parallel computers. MPI is used for distributed memory parallel computers and PVM is used for shared memory parallel compute Characteristic features of fifth-generation computers are as follows: 1. Portable PCs (called notebook computers) are much smaller and handy than PCs of fourth generation allowing users to use computing facility even while travelling, (aa desktop PCs and workstations are several times more powerful than PCs of fourth 18 Of the “Omputers, 2. Fifth-generation generation. + Although ffth-generation mainframes and su des wtreas in which they are located, no air-conditir desktop PCs, and workstations. 4. They consume less power than their predecessors do. + They are more reliable and ess prone to hardware failures} dian} beir predecessors were, Tequiring negligible maintenance cost. © Many of the large-scale fifth-generation systems have hot plug feature that enables a failed component to replaced these systems with a new one without the need to shutdown the system. Hence, the uptime of is very high. 7 They have faster and larger primary and secondary storage as compared to their. predecessors 8. They are general-purpose machines i ir-conditionin, mmputers require proper air-conk riggs homally gute for olebooh c 12. Newer and more powerful applications, including multimedia applications, make te systems more useful imevery occupation. 13. Explosion in the size of the Intemet coupled with Internet. ‘Systems influence the life of even common People. 14. These systems also use the concept of unbundled Software and add-on hardware allowing the users to invest only in the hardware configuration and software of their need and value, 15. With so many types of computers in all price elem 2” N° HAVE a Computer for almost any type of user whether the user is a child or a world-fame scienti. based tools and applications have made these -fyewuins y ~ suojes0u8 seyndusod “St Suni Tauaaiuy om stursso20ud tpqresd to pave szarndossades *souumaymru (ny32580 yesed 30} SEG! IAG jou pur sa ssaaindios Yoou>! swoindwwoasadns wud “000 om An pt | eens “yooqn Wal mpouny 42\ oh arout02 aonpasl oy tse sounpeut asodand je 23 pu yrysamod asout Sai AIWIX-AVED SPAWAD"T-AVHD "0006 VA 08'StL. "IE a1 MMtop sit pur 5d Wal | 28% 01 X8e9 pur IaH sarees 24 samndus fesors Ksmpucr2s adn pur sysip an2uirut ase] otuatu 2109 aroueur 198 :saHfojouypan [SHY PUT ISS HN SOL ‘wdc "0L/098 Wal Dav TOVAINa ateu01s “Foo! Dao ‘oroL sepuooes sysip pur sade snauseu Wal ‘o0r 1ENAUOH ‘Ruouugu 2409 2euuTeu 'S1OISSUCL F toe wal ‘TOVAINA ‘O¥SGa ‘Svaaa OVINE suross sopioqouron sojdojouya aapenasoaday su0§ autos 931 azempaey S29, a SuOREIOUTD FaINdWOD 10. Points to Remember John Von Neumann introduced the “stored ) 2S Concept that considerably influenced the .somnuter isa fast calculating device. i abo prawn 48 8 das procesor Beenie Grint Process, and retrieve data whenever desinad development of modern digital this feawre, computers. Due ty wwe offen tefer to modem : igitay ‘computer a stored program digital computers, Generation” in computer talk provides frame input to data processing 7 puter industry base a obtained as output for the growth of comput st east 8 Key fetnoogies developed. Originally. it was weg’) Key characteristics of ines iuis, between hardware technologies but > Speed, accuracy, diligens recede 0 include both hardware and softs OF intelligence, and tack technologies. cigs Babbage is conidered te fier eek Wdeaeees five compuier generations — fr, Gigial programmable computes, second, third, fourth, and fh Mam OF the well-known carly computers are: = ewe 15 summaries he key hardware ang MARK 1 (1937-44), ABC (1939-42), ENIAC (1943. * hor technologies sad key characteristics nt 2. Wane EBSAC 1947-49), ‘computers of five computer generations, rosy AC E0951), 1BMH-701 (1935h sg IBM-650, (1953 Questions hat is a computer? Why itis algo known as a Hi” ist key hardware technologies used in building data processor? SOMPULTS OF each ofthe Five generations, junat is data processing? itferentiate between 12” Uist hey sofware technologies used in buil data and information. Which is Useful to OmpUIETS Of each of the five generation, le and why? People and why 13. What are the advantages of transistors over vacuum {Gt and explain some important characterise ofa tubes? computer, ie What is garbage-in-garbage-ou? Who lis known as the father of modern digital 15, Programmable computers and why? join, invented the concept of stored rogram? Why 16 is this concept so important? Why are modern digital computers often refered to as stored program digital computers? 17.” Why were first and second-generation computers Which (Was the first commercially Produced than su Tealt and costir to modi ‘commercially computer? When and where was it first installed? {han computers of Subsequent generations? ons used in 18. Name the technotogies wed for constructing main Write full form of following abbres Epputer terminology: IBM, ENIAC, EDWAC, EDSAC, UNIVAC. What is “generation” in computer terminology? Lit various computer “generations along with key characteristics of computers of each generation, 19, + third, and fourth. Name the secondary Storage media popularly used in fits, second, thine fourth-, and fifth- Beneration computers, 20. a. 2. In what ways did the concept of unbundling of software from hardware affect computer manufacturers and users of computers? ‘What new types of computer applications emerged during third, fourth, and fifth computer generations ‘and what were the main driving technologies behind each? ‘What is meant by backward compatible family of ‘computers? How is this concept useful for computer users? B. 24, 26. Questions [747 What is a microprocessor? How it revolutionized the computer industry? ‘Name some applications that emerged due 10 ‘emergence of computer networks. Name some applications that emerged due to ‘emergence of the Internet, Name some representative computer systems of each of the five computer generations. Chapter 2 Gren Basic Computer Organization Hf shape, performance, reliability, and cost of Computers have been changing over the last hag ro, S85, the basic logical structure (based on he \\ 1 Imputting. tts the process of entering data and instructions into a ‘comy 2. Storing. It is the proce additional Processing as Processing. Performing arithmetic o | (comparisons like equal to, less th known as processing, i 4. Outputting. tt is the H or visual display. Puter system, of saving data and instructions to make them Teadily available for initial or nd when required, erations (add, subtract, multiply, divide, ee, am. Breater than, et.) on data to conver them ing ), oF logical operations '0 useful information is Drocess of producing useful information or results fora ser, such as printed report } 5 Controlling, Directing the manner and sequence in which the above operations are performed is known y as controlling. The goal ofthis chapter i to familiarize you with the units ofa Provides an overview of computer sysiems as computer system hie rn a that perform these Functions, I rchitects view them, _ __Anput Unit FRG) figure, solid lines indicate flow of instruction and data, and dotted lines represent control exercised by control unit. It displays the five major building blocks (functional units) of a digital computer system. These five units correspond to the five basic operations performed by all computer systems. Functions of each of these units are described below. Storage uni Secondary: soon Program and data oe > Information (Results my | T t 1 \ Control — Indicates flow of (2° Hv inact ghee ~ Artienetic: — Indicates the conto! Logic Unit ‘exercised by the — control unit Central Processing Unit (CPU) Figure 2.1. Basie organization of a computer system. * INPUT UNIT ata and instructions must enter a computer system before the Computer can perform any computation on the Supplied data. jThe input unit that finks a computer with its external environment performs this task. Data and instructions efter a computer through an inp ut unit in-a form that depends upon the input device used, For example, data can be entered using a keyboard in a manner similar to typing and this differs from the way in ‘Which data is entered through a scanner, another type of input device. However. a computer's ‘memory is designed ae De newt in binary code and hence, all input devices must transform input signals to binary codes. Units called wnput interfaces accomplish this transformation, Input interfaces match the unique physical or electrical characteristics of input devices to the requirements of a computer system. In short, an input unit performs following functions: 1. Teaceepts (or reads) instructions and data from outside world. 2 It converts these instructions and data in computer acceptable form. Units called inpu interfaces accomplish this task. 3. Itsupplies the converted instructions and data to the storage unit for storage and further processing. OUTPUT UNIT —Ww An output unit performs the reverse operation of that ofan input nit. It supplies information obtained from data Processing to outside world. Hence, it links a computer with its external environment. As computers work with binary code, results produced are also in binary form. Therefore, before supplying the results to outside world, the *hapter 2: Basic Computer Organization uput \ccomplish th, orm: Unis called oupu interfaces accomplish yi, tsk Ourpat mea ce une a (or choral char of output devices (termingle "es match the task. Output interface ator de Printers tc) tothe requirements ofan external environment Jn shor. an output unit performs following functions which are in coded form. We cannot understand the coded results easily Maceepts the produced results, . Ms to human acceptable (readable) form. Units called output interfaces 2 It converts these coded result ‘accomplish this task, Tesupplies the converted results to outside world STORAGE UNIT In short a storage unit holds (stores): 1. The data and instructions required for Drocessing (received from input unis) 2 Intermediate results of processing. 3. Final results of processing, before the system releases them to an output unit, 1. Primary storage. Primary storage of a ae let system, also known as main memory, stores Pieces of Pt ay asituctions and data, intermediate results ot Lines Mink: and recently produced results of those J0b(8) on which the computer system ig currently working Te Central processing unit can access these Pieces of information directly at a very fac speed because they are represented electronically in the main Be IY Ship's circuitry. “However, primary Stofage is volatile, and it loses the information i i as soon as the Computer system switches off or rece Moreover, primary storage normally has limited storage semi cease it iS very expensive. Primary Sorage of modem computer systems is made up of semiconductor devices, 2. Secondary storage, Secondary storage of Computer system, also kno. OF the limitations of primary storage, supplements the limite characteristic of primary storage. Ths s because secondary stora and it can retain information even when the computer system swite uses secondary storage to Store program instruc ions, data, and inf compel system is curently not working but me 10 hold the commonly used secondary, Storage medium is Magnetic disk. » a RITHMETIC LOGIC UNIT (ALU) ‘A computer performs all calculation and comparison (decision-making) operations in the ALU. During processing of a job, the computer transfers data and instructions stored in its primary storage to ALU as and when needed ALU does the processing and the computer temporarily transfers the intermediate results generated there back to primary storage until needed later. Hence, data may move back and forth several times between primary storage ‘and ALU before processing of the job is over. The engincering design of a computer's ALU determines the type and number of arithmetic and logic operations that a computer can perform. However, almost all ALUs are designed to perform the four basic arithmetic ‘operations (add, subtract, multiply, and divide) and logic operations or comparisons such as, less than, equal to, and greater than, CONTROL UNIT (CU) How does an input device of a computer system know that itis time for it to feed data to storage unit? How does its ALU know what should be done with the data once it receives them. Moreover, how it is that the computer sends only the results for output to an output device and not the intermediate results? All this is possible due to the control unit of the computer system, ‘A computer's control unit does not perform any actual processing of jobs, but acts as the central nervous system for other components of the computer system. It manages and coordinates the operations of all other components. It obtains instructions from a program stored in main memory, interprets the instructions, and issues signals ‘causing other units of the system to execute them. /CENTRAL PROCESSING UNIT (i) Control unit (CU) and arithmetic logic unit (ALU) of a computer system are together known as the Centfal Processing Unit (CPU). Its the brain of a computer system. In a human body, the brain takes all major decisions ‘and other parts of the body function as directed by the b rain. Similarly, in a computer system, the CPU performs all major calculations and comparisons, and also activates and controls the operations of other units of the computer system, / THE SYSTEM CONCEPT ‘You might have observed that we have been referring to a computer as a system (computer system). This is because a system is a group of integrated parts having a common purpose of achieving some objective(s). Hence, a system has following three characteristics: 1. Ithas more than one element. 2 Allits x ments are related logically. All its elements are controlled in a manner to achieve the system goal, jasie Computer Organization , i it, and CPU), Since a computer has integrated components (input unit, output unit, storage tit which work together © perform the steps called for in an executing program, itis a syst its cannot function un em, Input and output unit : i esi om the C U simil ly, stonge unit or CPU alone is of no use. Usefulness of each uni, similarly, they receive signals from the CPU. depends on other units and is reatiza ‘computer as a system (computer system). i . Hence, ble only when we integrate all units to form a system, Hence, We refer to a | Points to Remember Ail computer systems perform the following five basic functions for converting raw input date ine Santi information ~ inputting, storing, processing, ‘outputting, and controling, Figure 2.1 shows the main componéis of computer output results of processing. Two types of storage ate pinay and seconday soage, As comme Primary ‘storage, secondary storage is slower in ‘operation, lager in capacity, cheaper in price, and can retain information even when computer system witches off oF resets, "om, 8 During data processing, actual execution of > Inpus unis enables feeding of data and insrvtons to instructions takes place in the Arithmietic Logic Unit scomputer system from ouside word in compute (ALU) of a computer system, ‘eceptable form, 8 Comtot Unit (CU) of x computer system manages 4 hott interfaces transform input daa and insretons and coordinates the operations of all othes {fed te @ computer through its input devices) is ‘Components ofthe computer system, binary codes that are acceptable to the comps 10, Control unit and arithmetic logic unit of a computer $+ Qupur unit enables a computer system to supply System together form the Central Processing Unit information (l\ained_tiom data’ processing (CPU, which serves as the brain of the computer ‘outside World in human acceptable (readable) fee, Geen and is responsible for controling. the & Quipur imerfoces ansform information (obtained Apestons ofl oer unis ofthe system, { from data processing) from binary form ts hed Ne often refer 2 compute as @ computer system ‘acceptable (readable) form, Recause i consists of integrated components inpor . {cutput unit, storage unit, and CPU) that work 7 Slorage unit of « computer system holds data and romeo au. storage uni, instructions 10 be processed and intermediate and ‘orate pefom he eps ald for ina program Questions 1. What are the five base functions performed bya 5 Dilerentiae between the characteristics of Primary computer system? and secondary storage ofa computer system 2 Praw a block diagram 10. israte basic & What are the two main components of CPU of a giBanization of a computer system and explain the coment syster? List the main tunetions of exch functions of various units, component, % What isan input interface? How i ifers from an 7. Write the to output imerface? along with the + How many types of storage a computer system ree aston normally uses? Justify the need! for each storage for presentation type. 5 What is a system? Why do. ye often refer to a Computer as a computer system? Chapter 3 Number Systems ‘We saw in the previous chapter that a computer stores data internally in a format that human beings cannot read easily. This is the reason why computer systems require input and output (W/O) interfaces, Every computer stores numbers, letters, and other special characters in coded form. Before going into the details of these codes, it is essential to have a basic understanding of number system, Hence, this chapter familiarizes you with the fundamentals of number system. It also introduces some commonly used number systems by computer professionals and relationship among them. NON-POSITIONAL NUMBER SYSTEMS ‘Number systems are of two types — non-positional and positional. In early days, human beings counted on finger When counting beyond ten fingers, they used stones, pebbles, or sticks to indicate values. This method ‘counting uses an additive approach or non-positional number system, In this system, we have symbols such at for 1, I for 2, Il for 3, Il for 4, TIM for 5, etc. Each symbol represents the same value regardless of its positi in a number, and to find the value of a number, one has to count the number of symbols present in the numb Since it is very difficult to perform arithmetic with such a number system, positional number systems wi developed. POSITIONAL NUMBER SYSTEMS Values, depending on the position the occupy in a number. The following thee considerations determine tne \. value of each digit in such a number 1 The digit itself, lable in the number OF the number system, Base is efined as the tot number of digits avai re first digit is ee r0.’Hence. the maximum value of a Single digit is always equal to one valu of tne se, 3 NCR > 2é.an illustration, let ws consider deci sunber system that we use in our day-to-day lif, In this system; bave is dana {© 10 because there are aliogeiter ten {smbols or digits (0, 1.2. 3,4, 5,6, 7, 8, and 9). You kno that in Gecimal number system, succensee Ps a gl” ie left of the decimal point represem units, tens, hundreds, z Maat Power of the base (10). Far example; decimal number 2586 s: Position 8 in tens position, 5 in hundreds postion, and 2 in thousands value can be writen as; 4h 258600 the digit 6 signifies 6 x 10 tn 256810 the digit 6 signifies «10! < 0 In 265810 the digit 6 signif In 62580 the digit 6 signities 6 x 19 6000 Hence, we can represent any number by using the available digits and Arranging them in various positions, 1. The value of the base determines the (otal number of diffe; System. The first of these choices is always zero, ind by computer professionals, Binary Number System In binary number system, the value of base is 2, end, it has on} single digit being 1 (one less than the base). Bach poe ina bin Hence, in ths system, the rightmost position ig wie ) positi yy NO symbols oF digis (0 and 1), the largest ne et PTS 2 power ofthe bce Q) ‘on, the second pasition from the right is 2's (2!) position, and proceeding in this way, we have 4’s (2°) position, 8°s (2°) posit Therefore, decimal equivalent of binary number 10101 (written 2s 101013) is: n, 16°s (2°) position, and so on. (1x2!) + Ox2) 4 (1x2) +Ox2 + (1x2%=16+0+44041=21 In order to be specific about which system we are referring to, itis a common practice to indicate the base as a subscript. Hence, we write: 10101, = 2119 Bit is the short form of “binary digit”. Hence, a “bi number is a binary number consisting of ‘n” bits. equivalent. Remember that we have only (wo di in computer terminology means either a 0 or 1. Ann-bit we 3.1 lists all 3-bit numbers along with their decimal its, 0 and 1, in binary number system and hence, binary equivalent of decimal number 2 has to be stated as 10 (read as one, zero). Another important point to note is that with 3 bits (positions), only 8 (2°) different patterns of Os and Is are possible, and it may be seen from Figure 3.1 that a 3-bit number can have one of the 8 values in the ran; ige 0 t0 7. In fact, any decimal number in the range 0 to 1 can be represented in binary form as an n-bit number. Every computer stores numbers, letters, and other special characters in binary form. Computer professionals need to know raw data Contents of a computer's memory on several occasions. A commonly used way of doing this is to prinvdisplay raw memory contents, which is called memory dump. Memory dumps in binary form would 010 have many pages of 0s and Is. Working with memory dumps in mm binary form would be very difficult and error prone for computer professionals. Hence, computer professionals often use octal and hhexadecimal number systems, as shortcut notations for binary, They are described below. . ecimal values. Octal Number System {mn octal number system, the base is 8. Hence, there are only eight symbols or digits: 0, 1, 2, 3, 4, 5,6, and 7 (8 and 9 do not exist in this system). The largest single digit is 7 (one less than the base 8). Each position in an octal ‘umber represents a power of the base (8). Therefore, decimal equivalent of octal number 205) (written as 20575) is: Qx8!)+ 0x8) #58!) + (7x8) = 1024 +0+40+7=1071 Hence, 2057s = 10710 Observe that since there are only & digits in octal number system, 3 bits (2? = 8) are sufficient to represent any octal number in binary (see Figure 3.1). Hexadecimal Number System In hexadecimal number system, the base is 16, Hence, there are 16 symbols or digits. The first 10 digits are the same digits of decimal number system ~ 0, 1.2, 3, 4,5, 6,7, 8, and 9. The remaining six digits are the symbols A. B,C, D, E, and F, representing decimal values 10,11, 12, 13, 14, and 15, respectively. Hence, the largest single I sy Chapter 3: Number Systems digit is F or 15 (one less than the base 16). Each position in hexadecimal sitet Gea mei base (16). Therefor, decimal equivalent of hexadecimal number LAF (writen as LAF.) is: (1x 16%) + (Ax 16!) + (Bx 169) = (1 x 256) + (10 x 16) #(15 x 1) =256 +160 + 15 =431 Hence, 1AF\s = 4319 Observe that since there are only 16 digits in hexadecimal number system, 4 bits (2 = 16) are sufficient to represent any hexadecimal number in binary. CONVERTING FROM ONE NUMBER SYSTEM TO ANOTHER Jnput data fed to computers and final ouput values are to be in decimal because decimal numbers are much more raineful to us than are numbers expressed in any other number system. Hence, computer professionals are Converting from Another Base to Decimal ‘We use the following steps to convert a number in anyother base to a hase 10 (decimal) number: Step 1: Determine the column (positional) value of each ‘igit (his depends on the position ofthe digit and the base of the number system), Step 2: Multiply the obtained column values (in Step 1) by the digits in the corresponding columns, Step 3: Sum up the products calculated in Step 2. The toal is the equivalent value in decimal, Example 3:2) 4106 Solution: Solution: ‘Step 1: Determine column values Step 1: Determine column values Column Number Column Value Column Number Column Value (from right) (from right) 1 BI 2 Bag 3 B= 64 4 8512 (Continued on next page...) es Converting from One Number System to Another [727 Step 2: Multiply column values by the corresponding column digits 6 8 4 2 1 xl xl x0 x0 xl 6 8 0 0 1 Step 3: Sum up the products 16+8+0+0+1=25 Hence, 110012 = 2510 Step 2; Multiply column values by the corresponding column digits 512 64 8 1 x4 x7 x0 x6 2048 448 «0 6 Step 3: Sum up the products 2048 + 448 + 0+ 6 =2502 Hence, 47063 = 2502i0 Example 3.3. ae ae IAC = 10 , conte til Solution: IAC\,=1 x 167+ Ax 16'+ Cx 16° 4052,=4x 72 +Ox7 4 5x7 +2x7P x 256+ 10x 16+ 12x1 x343-+0x494+5x742x1 56 + 160+ 12 372 +0435 +2 = 4281) 4090 Example 3.5. Comparing the result of Example 3.5 with the 40525= 10 result of Example 3.4, we find that although the Solution: 40526= 4x6 40x65 x6! +2x6" x 216 +0x36+5x6+2x1 digits’ (4052) are same for both the numbers, their decimal equivalents are different, This is because the number in Example 3.4 is in base 7 number system, whereas the number in Example =864+0430+2 3.5 isin base 6 number system = 8% 9 Example 3.6. 11001.= 0 Solution: NODLg= Tadlt LxdOxdl XIS+Ax13'+Cx 13" * + + = 14256 +1644 0x 16+ se HORIS#a2K Ox4+ixt “Bet etores Compare the result with. the result =32v0 Compare the result with the result obtained in Example 3.1. obtained in Example 3.3. Chapter 3: Number Sy Converting from Decimal to Another Base (Division-Remainde, Technique) ) number to a number in another | base: Divide the decimal ‘number by the value of the new base. Step 2: Record the remai id remainder | = 6 and remainder = 3 and remainder 0 Steps3and4: 3/9 - } ‘and remainder | Steps3and4: 1/2 = 9 and remainder 1 As mentioned in Steps 2 and 4, Odes. making the first remand the kant “Smalnder the most signtican digit (MSD) Hence, 2510 = 110015 ‘Compare the result with the result Obtained in Example 3,1 Converting from One Number System to Another [729 Example 39, 42jp=% Solution: 2 | 42 Remainders 8 | 952 Remainders [a 0 ry 0 [10 1 [4 7 [os 0 [1 «6 [> 1 [0 1 1 9 Hence, 952j9 = 1670 [oo 1 Example3.12, [ois 5 i Solution: Solution: Remainders in 16 | 428 hexadecimal 5 | 100 Remainders 2% 2s 20 0 1 10=A — 4 0 0 =I — 0 4 Hence, 428;5= TAC, ‘Compare the result with the result Hence, 100, = 400s obtained in Example 3.3. - 30 | _Chapter 3: Number Systems : ——— ‘Example 3.14. I7Si0= 2x i Solution: Settion Remainders in 4 | 100 Remainders 12 | iis base 12 \ 25 0 142 M=B 4 c 6 1 ul 10=A & -— } } J .@ 0 N=B \ 0 1 | Hence, 1715y)= BAB): | Hence, 100). 1210, | Compare the result with the | result obtained in Example 3.12, Exaniple 3.16. 101110;=9, Solution: Step 1: Convert from base'6 to base 10 Step I: Convert 101110; to base 10 SAS =526°+ 4x 6445560 101110; = 1x25 +02! =5x36+4%645x1 2OKD Has Ix2+ 1x2! 40x20 = 180+ 2445 =32+0+8 444249 = 2099 = 46 (Continued on next page,..) (Continued on nest page...) Converting from One Number System to Another [31 209;0= 31014 Step 2: Convert 20949 0 base 4 Step 2: Convert 46,9 to base 8 4 | 209° Remainders 8 | 46 Remainders | so 1 1 > 6 [3 oO 0 Ss [3 1 lo 3 4610 = 565 Therefore, 545, = 209,= 3101, Hence, 545, =3101y ‘Therefore, 1011102 = 46;o= 56, Hence, 101110; = 56, Example 3.16 illustrates the shows how to convert a binary number to a hexadecimal number. However, can use shortcut methods when we desire such conversions, These shortcut methods are described below. method of converting a binary number to an octal number. Similarly, Example 3.17 these are lengthy procedures and we Example 3.17, T10100113= 6 Solution: Step l: Convert 1101001 Step 2: Convert 16 11010011, to base 10 Ia = 1x24 1x 240024 1x24 0x2 40x2 +124 1x2 X128 + Lx64+0x32+1x16+0x8+0x4+1x2+ 141 28 + 6450+ 16+0+0+2+1 Ho 211g to base 16 2u Remainders 13 3=3 in Hexadecimal Therefore, Hence, 11010011; = D3i, 0 13=D in Hexadecimal 1010011; = 211yo= D3;, i version Shortcut Method for Binary to Octal Con’ We use the following steps in this method: i ight). ‘Step 1: Divide the binary digits into groups of three (starting from the righ git. Since there are only 8 digits (0 49 7 y digits to one octal digit. Since sre ee im oe eae rnd 3.1), 3 bits (23 = 8) are sufficient to eee any 00 num in inay. Moreover since deci digits 010 7 are equal to the octal digit i decimal conversion method inthis step. Use binary Divide the binary. digits into groups of 3, Starting from right (LSD), Jol 0 . Convert each group into one digit of octal (use bi 1Ols=1x2°+0x2'4 1x20 MO)=1x2?+1x2'+9x29 40041 44240 = =65 inary-to-decimal conversion method), Hence, 101110, = 56, Compare the result withthe result obtained in Example 3.16, 1101010, ae Solution: 1101010; = 001 101 910 (Group of 3 digits from right) = 152s (Convert each Hence, 1101010, = 152, rOup to an octal digit) Shortcut Method for Octal to Binary Conversion We use the following ‘steps in this method: Step 1: Convert cach octal digit 10 4 3 digit binary number (the octal digi + treme ‘numbers for this conversion), "eits may be treated as deci Solution: Step 1: Convert each octal digit to 3 binary digits. 675l,= 110 Li 101 O01 p= 101, 6 7 5 1 65= 110, = 110111101001; 25= 010; Hence, 6751, 10111101001 Step 2: Combine the binary groups. 362s=101 110 010 z 6 2 Hence, 5625= 101110010; Shortcut Method for Binary to Hexadecimal Conversion We use the following steps in this method: Step I: Divide the binary digits into groups of four (starting from the Fight). Step 2: Convert each group of four binary digits to one hexadecimal digit. Remember that hexadecimal digits Oto 9 are equal to decimal digits 0 to 9 and hexadecimal digits A to F are equal to decimal values 10 to 15. Hence, for this step, we use binary to decimal conversion procedure and represent decimal values 10 to 15 as hexadecimal A to F. Solution: Step 1: Divide the binary digits into groups of 4, starting from the right (LSD). 01 0011 Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit. 1x24 1x2 +Ox2' 4142" +4404 30 Mence, HOIOOLI; = D3j5* OOM: =Ox2+Ox2+ 1x2 4 1er? =070+2+1 =3y Compare the result with the result of Example 3.17. ker $pNumber Systems Solution: / 10110101100,= 0101 1010 L100 (Group 4 digits from right) =5AC (Convert each group to a hexadecimal digit) Hence, 10110101100, = SAC, Solutioy Step 1: Convert the decimal equivalent of Groh hexadecimal digit 04 binary di Cc = 101010111100; Henee, ABC), 101010111100, Step 2; ‘Combine the binary, ‘groups. 2ABie=0010 1010 1014 2 A B Hence, 2AB= 001010101011, Figure 3.2 summarizes the relationship among Decimal | Hexadecimal | Binary | Octal decimal, hexadecimal, binary, and octal number a . Ta systems. Note that the maximum value of a t T oa single digit of octal (7) is equal to the maximum 2 r 0-2 value of three digits of binary. Hence, the value 3 3 its range of one digit of octal is equivalent to the 4 + 100 + value range of three digits of binary. Therefore, 3 3 101_{ 5 octal shortcut notation is a one-to-three 6 6 Ho 6 reduction in space and time required for 7 7 im | 7 memory dump. Similarly, hexadecimal shortcut 8 8 1000 [10] notation is a one-to-four reduction in space and 9 9 1001 [it time required for memory dump because the 10 A 1010 | 12 ‘maximum value of one digit in hexadecimal (F) [eu B to | 13 is equal to the maximum value of four digits in | 2 c 100 | 14 binary. | 1B D Hor [15] 14 E 110 16 1s {oi VW 16 10 10000. 20 a Figure 3; In binary number system, fractional numbers are for example, in decimal number system, 0.235 = (2 x 10") 4(3 x 10) + (5 x 105) and 68.53 = (6 x 10!) + (8 x 10°) +(x 10") +x 10%) Similarly, in binary‘number system, 101 =(1x2"} + 0x27)4 (1x29) and 10.01 = (1x2!) + (0x25 + x2 +(1 x24 Hence, binary point serves the same purpose as decimal point. Some Positional values in binary number system are given below. Binary point hl | Position 43 2 1 +0 YY 4 3. 4 ‘Position value 2 PF ge y > Quantity 7. represented '© 8 4 2 tlhe {In general, a number in a number system with base b is written as: Byers Bye BAZ os Dy ‘and is interpreted to mean ore MAXON a KOT. + ay KD ay XBT Hag xe... +g XD The symbols ay, ayy ‘number system, Hence, as per the above mentioned general rule, M6324 = (4 x 8')+ (6 x8") + (3x8 ‘te used in the above representation should be one of the b symbols allowed in the V+ Qx8%) and 5A.3C4=(Sx 16") + (Ax 16) + 3x 16 + (Cx 164 Example 3.27, Find decimal equivalent of the octal number 127.54 oy Solution: MO.1012 =1x2?+1x2'4 0x29 127.54, = 1x8 +2x 8147x894 1x2" 40x27 41x29 5x8" 44x87 =44+2+0+05+0+ +16+7+ 518 + 4/64 0.125 +05 +0125 6.625 > 7 + 0.625 + 0.0625 87.6875 Example 338, | Sotation: 2B.C4ig = 2x 16'+ Bx 16°+Cx 1614 4x 162 =32+B+ C6 + 4/256 =32+ 11+ 12/16 + 47256 = 43 + 0.75 + 0.015625 =43.765652i. Points to Remember 1 Number systems are of two types ~ non-posiionl ‘and positional, 2. In a nompositional number system, fabresents the same value regaviless of its poston the number and to find the valu- ofa number one an {o count the number ef symbols present ie number. I is very diftieuk to perform arithmetic wih such a number system In 3 positional number system, there ae only & few symbols called digits. These symbols repeaen diferent values depending on the position they Find decimal equivalent ofthe hexadecimal umber 23.04 it in such a (@) The digit itseir, (©) The position ofthe digit inthe number, and (© The base ofthe number system (where base is defined asthe total number of digits Available inthe number system), Jn our day tony fife, we use the decimal number thon Jn this system, base is equal 10 10 because there are altogether ten’ symbols ordi 4.5.6,7, 8, and 9), 6. Some positional number systems that are used in computer design and by computer professionals are binary (having base 2), octal (having base 8), and hexadecimal (having base 16) Figure 3.2 shows the relationship among decimal, hhexadeeimal, binary, and octal number systems. Readers must know the techniques for following types of conversions to convert numbers from one base to another: (a) Converting from another base to decimal (©) Converting from decimal to another base (6) Converting from a base other than 10 to another base other than 10 (@) Shorteut method for binary to octal (6) Shortcut method for octal to binary conversion Questions Differentiate between positional and non-positional umber systems. Write examples of both types of number systems, What is base of a number system? Write examples to illustrate the role of base in positional number systems, What is the value of base for decimal, hexadecimal, binary, and octal number systems? Write an example for octal number system to show that the same digit may signify different values depending on the position it occupies in the number, ‘What will be the total number of different symbols or digits and the maximum value of a single digit for the following number systems: (a) Number system with base § (b)_ Number system with base 20 (©) Number system with base 9 (d)_ Number system with base 12 What is a “bit” in computer terminology? How many different patterns of bits are possible with (a) Gbits (by Thits—(e) Bits Explain the meaning of the term “memory dump”. Why do we use octal and/or hexadecimal number systems as shortcut notations? Find ecimal equivalent of following binary numbers: (@) 01011 ) 11010 (©) 10110011 (@) Hono Questions (Shortcut method for binary to hexadecimal (2) Shorteut method for hexadecimal to binary 8. Fractional numbers are formed in the same way as in decimal number system. In general, a number in a number system with base b is written as: Ball toes Boe By 2 ‘and is interpreted to mean ag XD" + dy XD +. tay X b+ ar xd + agxb? +... tay xb™ The? symbOlS dp. yi, ove Ay used in the. above representation should be one of the b symbols allowed in the number system, (© 1110101 (hy 110001 (9 1000 , @ 1010101100 (e) 10110001100" qj 111 10. Find octal equivalent“of the binary numbers of Question 9, Find hexadecimal equivalent of the binary numbers of Question 9, Convert the following numbers to decimal numbers: (a) 110110, (©) 2A3By, (b) 2573, (d) 12345, Convert the following decimal numbers to binary ‘numbers: (a) 4350 (©) 32 (b) 169440 (@) 1380 Convert the decimal numbers of Question 13 10 octal numbers. Convert the decimal numbers of Question 13 to hexadecimal numbers. Carry out the following conversions: (a) 1256=% (b) 24)= 5c) ABCs = Convert the following numbers to their binary equivalent: (a) 2AC 0) 2614, (b) FAB i, 44) 562, Find decimal equivalent of following numbers: (@ 11101; (©) 247.65, (b) 1001.0113 (d) 2B.D4y,

You might also like