Dipak Pudasaini Him Koirala Manoj Kumar Karn Ramesh Rimal Approved by Government of Nepal, Ministry of Education, Science & Technology, Curriculum Development Centre, Bhaktapur, as an Additional Material from 2077 to 2079 Computer Science-I GRADE XI COMPUTER SCIENCE -I GRADE XI COMPUTER SCIENCE -I GRADE XI
Edition 2020 Copyright © 2020, by the Buddha Publications. All rights reserved. Printed in the Nepal. Except as permitted under the Nepal Copyright Act of 2059, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. Publishers: Buddha Publications Pvt. Ltd. Anamnagar, Kathmandu - 29, Nepal Tel. 00977-1- 5705165, 5705210, 5705177 e-mail: [email protected] www.buddhapublication.com Language edited by: Ghanashyam Raj Kafle Design by: Dipendra Shrestha Rajani Shrestha Price: Rs.539.00 ISBN: 978-9937-30-356-9 Printed in Nepal Computer Science-I COMPUTER SCIENCE -I GRADE XI
Quality education ensures the overall development of an individual. Quality education demands quality textbooks that shape and develop inner potentiality of a reader. The traditional reading materials have failed to fulfil the present competitive requirement of the learners who have the urgency to strengthen themselves in diverse fields and expose or apply their competency in the global environment. Considering this reality, we have come up with COMPUTER SCIENCE–I for Grade XI students and thus, feel immense pleasure for our invaluable attempt to meet the pressing and changing need of the present day learners. It is, in fact, an ideal product with distinct concepts and features in the field of Computer Science–I. So we have developed this book to cover all the topics prescribed by NEB. This book is designed in such a way that it includes Computer system, Number System and their Conversion, Logic Function and Boolean algebra, Computer Software and Operating System, Application Package, Programming Concept and Logics, Web Technology (HTML and CSS), Multimedia and Information security and cyber law. The book contains the following distinct features: LEARNING OBJECTIVES Every chapter of the book begins with learning objectives, which the readers should be able to achieve after they have completely studied it. The illustrative examples, figures, theoretical questions as well as keywords and exercises designed to help them achieve the objectives. TEACHING INSTRUCTIONS Every chapter of the book begins with teaching instructions along with learning objectives and meaningful pictures, which the teachers should be able to achieve guidelines of different topics. The teachers should be able to know about the teaching hours and course contents in detail both theory and practical. POINTS TO REMEMBER (PTR) Important points and concepts have been emphasized that help to overview quickly the main points of the sections as well as additional information required to the readers. It also helps to remind the main conclusion of the text as well as main points of the topic. KEYWORDS At the end of every chapter, a list of key terms has been provided for a quick review and linking purpose of the relevant terms. Those terms help to clarify the meaning of the related terms used in the chapters. EXERCISE At the end of every chapter, a section relating to ‘Exercise is provided which helps the readers to develop their theoretical understanding of the concerned chapters. It is divided into 3 parts. First part is very short question, second part is short question and third part is long question. Such theoretical questions are also useful from the point of view of final examinations. BIOGRAPHY At the end of every chapter, a section relating to ‘Biography’ provided which helps the readers to develop their practical understanding of the concerned topics. Such biography is helpful for extra knowledge for the readers. CASE STUDY At the end of every sub-unit, case study is given to enhance the capacity of students. ASSIGNMENTS This book has provided a large number of assignments at the end of each session. These assignments help the readers to get mastery in the chapters. These assignments are arranged in order of simple to complex. The solved problems are to be practised in the classroom with the help of the teacher. Every effort has been made to make this book student friendly. Still some errors and comments may exist on the book. So, we welcome any suggestions, ideas, comments and thoughts that would help to make the book more students friendly. We wish our readers all the very best in their careers. Authors Preface COMPUTER SCIENCE -I GRADE XI
This book is an outcome of a long inspiration and moral support of many people, especially, our +2 graduate students in Nepal, and we are always grateful to all of them. It is hardly possible to list the names of all our well-wishers here but we sincerely acknowledge the precious encouragement they offered us. We take this opportunity to express our sincerest gratitude to all those who have inspired to write this book. We are indebted to all those authors whose works have directly or indirectly influenced in this textbook. We have also taken a number of references, which have been listed, at the end of the text. We sincerely acknowledge the references used in this book. We would like to express to extend our sincere thanks to Prof. Dr. Shashidhar Ram Joshi, Dr. Subarna Shakya, Mr. Saroj Shakya, Mr. Rom Kant Pandey for their encouragement to develop this book. We are proud to acknowledge Dr. Shiba Datta Gnawali, Mr. Prem Raj Rimal, Mr. Maroof Ahmad Khan, Mr. Nirmal Adhikari, Mr. Rabindra Jung Thapa, Mr. Nara Bahadur Bista, Mr. I.B. Gurung, Mr. Yuba Raj Sharma, Mr. Pranaya Singh, Mr. Birendra Narayan Sah, Mr. Santosh Maskey, Mr. Prajwal Baniya, Dr. Manoj Jha, Mr. Govinda Karki whose philosophy and guidance has inspired us to write the text book in this form. We are also grateful to our friends: Akhilesh Yadav, Amit Ramdam, Anil Amatya, Anil Dutta, Arun Sharma, Asim Ghishing, Bal Krishna Shrestha, Basanta Kumar Yadav, Bhoj Raj Subba, Bikash Balami, Bikash Paudel, Binod Adhikari, Binod Bidari, Binod Sharma, Binod Sitaula, Bishwo Prakash Pokharel, Chandra Kandel, Deepak Kumar Adhikari, Deepak Thakur, Deepesh Sthapit, Dhirendra Yadav, Dibya Kant Pant, Dilip Thakur, Dilip Kumar Thapa, Dinesh Khadka, Hari Bhakta Acharya, Hem Raj Ojha, Heramba Raj Panta, Hikmat Rokaya, Hiranya Prasad Bastokoti, Indra Chaudhary, Jeevan K.C., Krishna Prasad Poudel, Lachhima Adhikary, Lal Krishna Mallik, Lalita Sthapit, Laxmi Maharjan, Maheshwor Devkota, Mohan Chandra Adhikari, Mukunda Khadka, Narayan Baral, Narayan Dahal, Navin Karna, Prachandra Ram Shrestha, Pramesh Bikram Nembang Ramesh Kunwar, Prakash Adhikari, Pralad Basnet, Pran Kunwar, Prayaschit Bhandari, Purusottam Karn, Rajan K.C., Rajan Khadka,Rakesh Thakur, Ramesh Sah, Ratna Maharjan , Ravi Kumar Singh, Ravi Lama, Ridip Khanal, Roshan Bhusal, Sabina Bhatta, Sagar Bhatta, Sailendra Khadka, Sanjesh Rimal, Saroj Bajracharya, Saurav Kumar Chaudhary, Shankar Ghimire, Subash Siwa, Surendra Yadav, Suresh Khatiwada, Suresh Pd. Shrestha, Umesh Sharma, Vivek Moktan, Vivek Pandit for their supports and innovative ideas for this book. We are also grateful to the members of CFAN (Computer Faculty Association of Nepal) Prachadra Ram Shrestha, Satya Ram Suwal, Gopal Prasad Shah, Krishna Kumar Shrestha, Madhav Aryal, Bir Bahadur Kshetri, Ananta Pandey, Ananta Raj Shah, Bhoj Raj Joshi and Hari Prasad Sapkota. We are grateful to Nabaraj Bajgain, Managing Director of Buddha Publications Pvt. Ltd. and Mr. Dipendra Shrestha of Buddha Publication for his holy contribution to prepare this book. We are equally grateful to Mr. Bharat Giri, Mr. Ramakanta Mishra, Mr. Babu Ram Timsina, Mr. Arun Kumar KC, Mr. Dipendra Dahal, Mr. Surendra Paneru, Mr. Rajan Khatiwada, Mr. Nandu Prasad Kushwaha, Mr. Hem Bahadur KC, Mr. Suman Basnet, Mr. Yam Karki, Mr. Dipendra Dahal, Mr. Binod Joshi, Mr. Abhaya Srivastav, Mr. A. K. Chaudhary, Mr. Chiranjibi Ghimire, Mr. Subhash Baral, Mr. Ramesh Niraula, Mr. Ashim Sitaula for taking a good care and inspiration. Authors Acknowledgement COMPUTER SCIENCE -I GRADE XI
Syllabus Computer Science (Grade 11) S.N. Content Area Elaboration of Contents Working Hour 1 Computer system 1.1 Introduction of computer 1.1.1 Definition, characteristics and application of computer 1.1.2 Evolution of computer technology 1.1.3 Measurement unit of processing speed and storage unit 1.1.4 Super, Mainframe, Mini and Microcomputers 1.1.5 Mobile Computing and its Application 1.2 Computer system and I/O devices 1.2.1 Concept of computer architecture and organization 1.2.2 Components of computer system: input unit, output unit, processing unit, memory unit and storage 1.2.3 Microprocessor: basic concepts, clock speed, word length, components and functions 1.2.4 Bus System: data bus, address bus and control bus 1.2.5 Primary memory: Definition, RAM, ROM, Cache, Buffer, types of RAM and ROM 1.2.6 Secondary Memory: Definition, Magnetic Disk, Flash Memory, Optical Disk, External Storage Device and memo stick 1.2.7 Input Devices – Keyboard, Mouse, Scanner, Light Pen, OMR, OCR, BCR, MICR, Scanner, Touch Screen, Microphone and Digital Camera. 1.2.8 Output Devices: Monitor (LCD, LED), Printer (Dot Matrix, Inkjet, Laser), Speaker 1.2.9 Hardware Interfaces: Parallel Port, Serial Port, USB Ports, HDMI and Expansion Slots 20 2 Number system and conservation Boolean Logic 2.1 Number System and conversion 2.1.1 Decimal, Binary, Octal, Hexadecimal Number System & conversion 2.1.2 Calculation in binary addition, subtraction 2.1.3 One’s and Two’s complement methods of binary subtraction 2.2 Logic Function and Boolean Algebra 2.2.1 Introduction to Boolean algebra 2.2.2 Introduction to Boolean values, truth table, Boolean expression and Boolean function. 2.2.3 Logic Gates –AND, OR, NOT, NAND, NOR, XOR and XNOR – its definition, truth table, logic symbol, logic function 2.2.4 Laws of Boolean algebra – Boolean identities, Complement Laws, Identity, Commutative, Associative and Distributive 2.2.5 Statement and verification of Laws of Boolean algebra using truth table 11 3 Computer Software and Operating System 3.1 Concept of Software 3.1.1 Definition of software 3.1.2 Categories of software: System, Utility, Application, Web Based, Mobile Apps 3.2 Concept of Operating System 3.2.1 Introduction to Operating System 3.2.2 Role of Operating System 3.2.3 Functions of an Operating System 3.2.4 Operating system terminology: multiprogramming, multitasking, multiprocessing and distributed 12 COMPUTER SCIENCE -I GRADE XI
S.N. Content Area Elaboration of Contents Working Hour 3.3 Windows Operating System 3.3.1 Introduction to GUI based Operating system and its features 3.3.2 Working in Desktop Application and Window Environment 3.3.3 Manage Files and Folders with File Explorer 3.3.4 Customize the start screen and desktop 3.3.5 Installing and removing devices 3.3.6 Manage passwords and privacy levels 3.3.7 Use of control panel, system tools and accessories 3.4 Open sources and Mobile Operating System 3.4.1 Concept of Open Sources Operating System 3.4.2 Introduction to Linux and UNIX 3.4.3 Linux Distributions 3.4.4 Concept of Mobile Operating System 3.4.5 Types of Mobile Operating System 4 Application Package 4.1 Introduction to Office Package - Word processor, Presentation tool, spreadsheet package, database management system; 4.2 Introduction to domain-specific tools - school management system, inventory management system, payroll system, financial accounting, hotel management, weather forecasting system. 5 5 Programming Concepts & Logics 5.1 Programming Concept 5.1.1 Introduction to programming languages 5.1.2 Low level, High level, 4 GL programming languages 5.1.3 Compiler, Interpreter and Assembler 5.1.4 Syntax, Semantic and Runtime errors 5.1.5 Control Structures: Sequence, Selection and Iteration 5.1.6 Program Design tools – Algorithm, Flowchart and Pseudocode 5.1.7 Absolute binary, BCD, ASCII and Unicode 5.2 C Programming Languages 5.2.1 Introduction and features of C Language 5.2.2 Structure of C program 5.2.3 C Preprocessor and Header Files 5.2.4 Character Set used in C 5.2.5 Use of Comments 5.2.6 Identifiers, Keywords and Tokens 5.2.7 Basic Data Types in C 5.2.8 Constants and Variables 5.2.9 Type of Specifier 5.2.10 Simple and Compound Statements 5.2.11 Operators and Expressions: arithmetic, relational, logical, assignment, unary and conditional operators 5.2.12 Input/output (I/O) Functions 5.2.13 Selection Control Statement: Decisions (if, if-else, if-else-if, nested and, switch) 5.2.14 Iteration Control Statement: Looping (while, do while, for nested) 5.2.15 Array: definition, types(1D and 2D), matrix addition and subtraction 5.2.16 String: definition and string function : strlen(), strcat(), strcmp(), strrev(), strcpy(), strlwr(), strupr() 8
S.N. Content Area Elaboration of Contents Working Hour 6 Web Technology I 6.1 Introduction: Web development introduction 6.2 Web browsers and search Engines 6.3 Overview of various internet & web technologies 6.4 Content Management System (CMS) 6.4. HTML: The Language of the Web 6.4.1 Objectives 6.4.2 Structure of HTML 6.4.3 Published and Hosting 6.4.4 HTML Tags vs. Attributes 6.4.5. Basic Tags of HTML: HTML, HEAD, TITLE, BODY (Setting the Fore color and Background color, Background Image, Background Sound) 6.4.6 Heading tag (H1 to H6) and attributes(ALIGN), 6.4.7 FONT tag and Attributes (Size: 1 to 7 Levels, BASEFONT, SMALL, BIG,COLOR) 6.4.8 Paragraph Formatting (P) 6.4.9 Break Line BR 6.4.10. Comment in HTML (<! >) 6.4.11. Formatting Text (B, I, U, Mark, Sup, Sub, EM, BLOCKQUOTE, PREFORMATTED) 6.4.12. Ordered List- OL (LI, Type- 1, I, A, a; START,VALUE) 6.4.13. Unordered List - UL (Bullet Type-Disc, Circle, Square, DL, DT, DD) 6.4.14 ADDRESS Tag - Creating Links: Link to other HTML documents or data objects - Links to other places in the same HTML documents - Links to places in other HTML documents - Anchor Tag and Hyperlink 6.4.15. Tables: Creating Tables using TH, TR and TD tags 6.4.16 Forms: Creating form using Textbox, radio, checkbox, text area, button 6.4.17 Introduction to HTML 5 Elements including audio, embed, source, track and video attributes 6.4.18 HTML 5 Graphics using canvas and svg tags 6.4.19 Concept of domain name and web hosting 6.5 Cascading Style Sheets 6.5.1 Introduction to Cascading Style Sheet (CSS) 6.5.2 Inline CSS 6.5.3 Embedded CSS 6.5.4 External CSS 8 7 Multimedia 7.1 Introduction to Multimedia 7.2 Component of Multimedia: Text, Graphics, Audio, Video and Animation 7.3 Application of Multimedia 6 8. Information Security and Cyber Law 8.1 Digital society and computer ethics 8.2 Concept of Information security 8.3 Concept of Cybercrime 8.4 Malicious software and Spam 8.5 Protection from cybercrime 8.6 Intellectual Property Right 8.7 Concept of Digital Signature 8.8 Concept of Cyber Law in Nepal 8.9 ICT Policy in Nepal 10 Total 80
Contents CHAPTER 1 Computer System CHAPTER 2 Number System and Conservation Boolean Logic CHAPTER 3 Computer Software and Operating System 1.1 Introduction of Computer 2 1.1.1 Definition, Characteristics and Application of Computer 2 1.1.2 Evolution of Computer Technology 15 1.1.3 Measurement Unit of Processing Speed and Storage Unit 20 1.1.4 Super, Mainframe, Mini and Microcomputers 22 1.1.5 Mobile Computing and its Application 27 1.2 Computer system and I/O devices 30 1.2.1 Concept of Computer Architecture and Computer Organization 30 2.1 Number System and Conversion 67 2.1.1 Decimal/Binary/Octal/Hexadecimal Number System & Conversion 67 2.1.2Binary Calculations 78 2.1.3 One’s and Two’s Complement Method for Binary Subtraction 79 2.2 Logic Function & Boolean Algebra 82 2.2.1 Introduction to Boolean Algebra 82 3.1 Concept of Software 103 3.1.1 Definition of Software 103 3.1.2 Categories of Software 103 3.2 Concept of Operating System 108 1.2.2 Components of Computer System 31 1.2.3 Microprocessor 34 1.2.4 Bus System 36 1.2.5 Primary Memory 37 1.2.6 Secondary Memory 41 1.2.7 Input Devices 47 1.2.8 Output Devices 52 1.2.9 Hardware Interfaces 57 Keywords 60 Exercise 1 63 Case Study 1 64 2.2.2 Introduction to Boolean Values, Truth Table, Boolean Expression and Boolean Function 83 2.2.3 Logic Gate 85 2.2.4 Laws of Boolean Algebra 91 2.2.5 Statement and Verification of Laws of Boolean Algebra using Truth Table 92 Keywords 98 Exercise 2 99 Case Study 101 3.2.1 Introduction to Operating System 108 3.2.2 Role of Operating System 109 3.2.3 Functions of an Operating System 110 3.2.4 Operating System Terminology 113 COMPUTER SCIENCE -I GRADE XI
3.3 Windows Operating System 115 3.3.1 Introduction to GUI based Operating System and its Features 115 3.3.2 Working in Desktop Application and Windows Environment 115 3.3.3 Manage Files and Folders with File Explorer 125 3.3.4 Customizing the Start Screen (Taskbar) and Desktop 128 3.3.5 Installing and Removing Devices 134 3.3.6 Manage Passwords and Privacy Levels 138 3.3.7 Use of Control Panel, System Tools and Accessories 148 3.4 Open Sources and Mobile Operating System 156 3.4.1 Concept of Open Sources Operating System 156 3.4.2 Introduction to UNIX, Linux 157 3.4.3 Linux Distributions 159 3.4.4 Concept of Mobile Operating System 163 3.4.5 Type of Mobile Operating System 164 Keywords 167 Exercise 3 167 Case Study 168 CHAPTER 4 Application Package CHAPTER 5 Programming Concepts and Logics 4.1 Introduction of Office Package 171 Concept of Word Processor 171 Presentation Tool 195 Spread Sheet Package 209 Database Management System 224 4.2 Introduction to Domain-specific Tools 227 School Management System 227 5.1 Programming Concept 238 5.1.1 Introduction to Programming Language 238 5.1.2 Low level, High level, 4 GL programming Languages (Types of Programming Languages) 238 5.1.3 Compiler, Interpreter and Assembler (Language Translator) 244 5.1.4 Syntax, Semantic and Runtime Errors 246 5.1.5 Program Design Tools – Algorithm, Flowchart and Pseudocode 247 5.1.6 Control Structures: Sequence, Selection and Iteration 250 5.1.7 Absolute Binary, BCD, ASCII and Unicode (Codes) 254 5.2 C Programming Language 255 Inventory Management 228 Payroll Management System 229 Financial Accounting 230 Hotel Management System 231 Weather Forecasting System 232 Keywords 233 Exercise 4 235 Case Study 236 5.2.1 Introduction and Features of C Language 255 5.2.2 Structure of C program 256 5.2.3 C Pre-processor and Header Files 257 5.2.4 Character Set used in C 258 5.2.5 Use of Comments 258 5.2.6 Identifiers, Keywords and Tokens 258 5.2.7 Basic Data Types in C 260 5.2.8 Constants and Variables 261 5.2.9 Type of Specifier 263 5.2.10 Simple and Compound Statements 264 5.2.11 Operators and Expressions 264 5.2.12 Input/output (I/O) Functions 269 5.2.13 Selection Control Statement: Decisions (if, if-else, if-else-if, nested and, switch) 275
5.2.14 Iteration Control Statement: Looping (while, do while, for nested) 281 5.2.15 Array: definition, types (1D and 2D), matrix addition and subtraction 291 5.2.16 String: Definition and String Function: strlen(), strcat(), strcmp(), strrev(), strcpy(), strlwr(), strupr() 299 Keywords 306 Exercise 5 308 Case Study 313 CHAPTER 6 Web Technology I CHAPTER 7 Multimedia 6.1 Introduction to Web Development 315 6.2 Web Browsers and Search Engines 316 6.3 Overview of Various Internet & Web Technologies 317 6.4 Content Management System (CMS) 321 6.5 HTML the Language of the Web 322 6.5.1 Objectives 322 6.5.2 Structure of HTML 323 6.5.3 Published and Hosting 324 6.5.4 HTML Tags vs. Attributes 325 6.5.5 Basic Tags of HTML 325 6.5.6 Heading Tag and Attributes 327 6.5.7 Font Tag and Attributes 328 6.5.8 Paragraph Formatting (P) 328 6.4.9 Break Line BR 328 6.5.10. Comment in HTML (<! >) 329 6.5.11 Formatting Text 330 6.5.12 Ordered List- OL 332 6.5.13 Unordered List - UL 333 6.5.14 ADDRESS Tag 334 7.1 Introduction to Multimedia 365 7.2 Components of Multimedia 365 7.3 Application of Multimedia 367 6.5.15 Tables: Creating Tables using TH, TR and TD tags 339 6.4.16 Forms: Creating form using Textbox, Radio, Checkbox, Text Area, Button 343 6.5.17 Introduction to HTML 5 Elements including Audio, Embed, Source, Track and Video Attributes 352 6.5.18 HTML 5 Graphics using canvas and svg Tags 352 6.5.19 Concept of Domain Name and Web Hosting 355 6.6 Cascading Style Sheet 355 6.6.1 Introduction to Cascading Style Sheet (CSS) 355 6.6.2 Inline CSS 356 6.6.3 Embedded CSS (Internal Style) 357 6.6.4 External CSS 358 Keywords 361 Exercise 6 362 Case Study 363 Keywords 368 Exercise 7 369 Project Work on Graphics (Case Study) 369 CHAPTER 8 Information Security and Cyber Law 8.1 Digital Society and Computer Ethics 390 8.2 Concept of Information Security 393 8.3 Concept of Cybercrime 397 8.4 Malicious Software and Spam 400 8.5 Protection from Cybercrime 404 8.6 Intellectual Properties Right 406 8.7 Digital Signature 409 8.8 Concept of Cyber Law in Nepal 412 8.9 ICT Policy in Nepal 414 Keywords 416 Exercise 8 417 Case Study 418