Computer Science and IT PDF - Amity University

Document Details

GlisteningCloisonnism2804

Uploaded by GlisteningCloisonnism2804

Amity University

Tags

computer science information technology computer systems programming

Summary

This document is a textbook from Amity University, covering topics in Computer Science and Information Technology. The content includes modules on computer systems, number systems, IT fundamentals, operating systems, and programming concepts. The document provides learning objectives and covers a wide range of topics to introduce students to the field.

Full Transcript

Computer Science and Information Technology Programs Offered n e...

Computer Science and Information Technology Programs Offered n e i Post Graduate Programmes (PG) l Master of Business Administration Master of Computer Applications Computer Science and n Master of Commerce (Financial Management / Financial Technology) O Master of Arts (Journalism and Mass Communication) Master of Arts (Economics) Master of Arts (Public Policy and Governance) Information Technology Master of Social Work Master of Arts (English) Master of Science (Information Technology) (ODL) Master of Science (Environmental Science) (ODL) i ty Diploma Programmes Post Graduate Diploma (Management) r s e Post Graduate Diploma (Logistics) Post Graduate Diploma (Machine Learning and Artificial Intelligence) Post Graduate Diploma (Data Science) i v Undergraduate Programmes (UG) Bachelor of Business Administration Bachelor of Computer Applications Bachelor of Commerce Bachelor of Arts (Journalism and Mass Communication) U n i Bachelor of Social Worky Bachelor of Arts (General / Political Science / Economics / English / Sociology) t Bachelor of Science (Information Technology) (ODL) A m c ) Product code ( AMITY Amity Helpline: (Toll free) 18001023434 For Student Support: +91 - 8826334455 Support Email id: [email protected] | https://amityonline.com e in nl O ty Computer Science and Information Technology r si ve ni U ity m )A (c e in © Amity University Press All Rights Reserved nl No parts of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior permission of the publisher. O SLM & Learning Resources Committee ty Chairman : Prof. Abhinash Kumar si Members : Dr. Ranjit Varma Dr. Maitree Dr. Divya Bansal Dr. Arun Som r ve Dr. Sunil Kumar Dr. Reema Sharma Dr. Winnie Sharma ni Member Secretary : Ms. Rita Naskar U ity m )A (c Published by Amity University Press for exclusive use of Amity Directorate of Distance and Online Education, Amity University, Noida-201313 Contents e Page No. Module - I: Introduction to Computers 01 in 1.1 Fundamentals of Computer Systems 1.1.1 Introduction to Computers nl 1.1.2 History and Evolution 1.1.3 Generation of Computers 1.1.4 Classification of Computers O 1.1.5 Applications of Computers 1.1.6 Capabilities and Limitations of Computers 1.1.7 Components of Computer System ty 1.1.8 CPU: Control Unit and ALU 1.1.9 I/O Devices si 1.1.10 Memory Unit: RAM, ROM, EPROM and PROM 1.1.11 Flash Memory and Other Types of Memory Module - II: Introduction to Number Systems r 58 ve 2.1 Number Systems and Boolean Algebra 2.1.1 Number System 2.1.2 Hexadecimal and Octal Number System 2.1.3 Conversion Between Number Systems ni 2.1.4 One’s Complement 2.1.5 Two’s Complement U 2.1.6 Boolean Algebra and Laws Module - III: Introduction to IT 84 3.1 Fundamentals of Information Technology ity 3.1.1 Introduction to IT 3.1.2 Need of IT 3.1.3 Applications of IT m 3.1.4 Introduction to Information Storage and Processing 3.1.5 Internet: WWW 3.1.6 Types of Software )A 3.1.7 Information Systems 3.1.8 Business Data Processing Module - IV: Operating System 130 (c 4.1 Functions of Operating Systems 4.1.1 Introduction to Operating System 4.1.2 Functions of Operating System 4.1.3 Types of Operating System e 4.1.4 Batch Processing in 4.1.5 Multiprogramming Operating System 4.1.6 Multitasking Operating System 4.1.7 Multi Processor nl 4.1.8 Data Communication Module - V: Introduction to Programming Concepts 176 O 5.1 Fundamentals of Programming and Its Languages 5.1.1 Introduction to Programming 5.1.2 Brief History of C/C++ ty 5.1.3 C++: An Object Oriented Programming Language 5.1.4 Types of Programming Languages si 5.1.5 Algorithm and Flowchart 5.1.6 Advantages and Limitations of Flow Charts 5.1.7 Pseudocodes 5.1.8 Sequence Logic r ve 5.1.9 Selection Logic 5.1.10 Iteration Logic 5.1.11 Advantage and Disadvantages ni U ity m )A (c Computer Science and Information Technology 1 Module - I: Introduction to Computers Notes e Learning Objectives in At the end of this module, you will be able to: Describe the history and evolution of computers nl Comprehend the application of computers Differentiate the types of computers Explain the capabilities and limitations of computers O Define the various components of computers Introduction ty r si ve (https://images.app.goo.gl/xQczYaPX2nLjicXn9) ni In the fabric of our daily lives, computers have woven themselves into nearly every aspect, playing an irreplaceable role that is both direct and indirect. Whether we find U ourselves at home, in the office, on the road, engrossed in a movie, or nestled in a hotel room, the influence of computers is palpable. Their impact resonates in the storage, transmission and processing of data and information, forming the backbone of our experiences in this information age. The primary objective of this chapter is to provide a ity comprehensive introduction to the vast and intricate world of computers. In the contemporary landscape of society, computers have transcended the realm of convenience to become truly indispensable. They serve as the backbone for various crucial functions that define our modern way of life. From facilitating seamless ticket reservations m for air and rail travel to enabling the effortless payment of utility bills such as telephone and electricity, computers have seamlessly integrated into our daily routines. In the realm of finance, they are the silent architects of banking transactions, effortlessly handling tasks like deposit and withdrawal of funds. )A The versatility of computers extends beyond the mundane, as they intricately contribute to diverse domains. In the sphere of business, they are the backbone of data processing, ensuring the smooth flow of information that fuels decision-making processes. Moreover, their role in weather forecasting is paramount, aiding in predicting and understanding the (c ever-changing patterns of the elements. In the field of healthcare, computers play a pivotal role in disease diagnosis, leveraging advanced algorithms and vast datasets to assist medical professionals in providing accurate and timely assessments. Amity University Online 2 Computer Science and Information Technology Education, too, has undergone a transformation, with computers finding extensive use in institutions and universities. Their influence ripples through various industries, leaving Notes e an indelible mark on music, movies, scientific research, law firms and the fashion industry. They are the silent architects of efficiency, aiding in tasks that range from complex scientific in research to the seamless organisation of legal documents. 1.1 Fundamentals of Computer Systems nl The ubiquitous presence of computers in our lives is a testament to their transformative power. They are not just tools; they are enablers, shaping the way we interact, transact and navigate the complexities of the modern world. As we delve into the intricacies of this O technological landscape, the profound impact and multifaceted utility of computers become increasingly apparent. 1.1.1 Introduction to Computers ty The term “computer” originates from the word “compute,” which means to calculate. A computer is an electronic device that receives data from users, processes it through calculations and operations and produces the desired output. Computers execute both si simple and complex tasks with speed and precision. This section explores the history and development of computers, the input-process- r output concept and computer characteristics. It also delves into the categorisation of digital computers based on size and type, along with their applications in various domains. ve Digital and Analogue Computers A digital computer employs distinct values, specifically 0s and 1s, to represent internal data. The computers commonly used in homes and offices are digital. ni Analogue computers, on the other hand, represent data across a continuous range of values. The earliest computers were analogue and are utilised for real-time measurement of continuously varying parameters like temperature, pressure and voltage. Although U analogue computers offer flexibility, they are generally less precise than digital ones. An example of an analogue computer is the slide rule. This book exclusively focuses on digital computers, referred to simply as “computers.” ity Characteristics of Computer Key characteristics of a computer include speed, accuracy, diligence, storage capability and versatility: m Speed: Computers can process data rapidly, performing millions of instructions per second. Complex calculations that would take hours or days can be completed within seconds. )A Accuracy: Computers provide high precision, offering results with accuracy up to 10 decimal places in tasks like division. Diligence: Computers operate consistently without getting tired, maintaining the same speed and accuracy over extended periods. (c Storage Capability: Computers can store and retrieve large volumes of data. Primary memory temporarily holds data, while secondary storage devices, such as floppy disks and compact disks, store data permanently. Amity University Online Computer Science and Information Technology 3 Versatility: Computers can effortlessly perform diverse tasks, from document preparation to playing music, demonstrating their versatile nature. Notes e While computers possess various strengths, they also have limitations. They can only execute tasks based on user-programmed instructions and lack the ability to make in independent decisions. 1.1.2 History and Evolution nl Until the advent of first-generation computers relying on vacuum tubes, various advancements had occurred in mechanical computing devices. The notable developments leading up to the creation of the first computer are outlined below: O Calculating Machines: The ABACUS, the initial mechanical calculating device, was designed for counting large numbers. An ABACUS, signifying a calculating board, featured horizontal bars with sets of beads representing units, tens, hundreds, etc. ty r si ve ( https://images.app.goo.gl/Xikr261yjGgXDKZU7 ) Napier’s Bones: In 1617 AD, English mathematician John Napier created this mechanical device specifically for multiplication. ni Slide Rule: Developed by English mathematician Edmund Gunter in the 16th century, the slide rule facilitated operations like addition, subtraction, multiplication and division. Its usage persisted until the late 1970s. U ity m )A (https://images.app.goo.gl/AD7R1VY5BPBrsJFV8 ) Pascal’s Adding and Subtraction Machine: Built by Blaise Pascal, this device could perform addition and subtraction through the use of wheels, gears and cylinders. (c Leibniz’s Multiplication and Dividing Machine: Constructed around 1673 by German philosopher and mathematician Gottfried Leibniz, this mechanical device had the capability to both multiply and divide. Amity University Online 4 Computer Science and Information Technology Punch Card System: Invented by Jacquard in 1801 to control power looms, this system employed punched cards, laying the foundation for the binary system (0s and 1s) crucial Notes e to modern digital computers. in nl O (https://images.app.goo.gl/dC7LpC8rXTCpiMDC7 ) ty Babbage’s Analytical Engine: In 1823, Englishman Charles Babbage created a mechanical machine for complex mathematical calculations, known as the difference engine. Later, Babbage and Lady Ada Lovelace developed the analytical engine, earning si Babbage the title of the father of the computer. Hollerith’s Punched Card Tabulating Machine: Invented by Herman Hollerith, this machine electronically processed information from punched cards. r These developments, along with others, culminated in the creation of the first computer ve in the 1940s. 1.1.3 Generation of Computers The computer industry has experienced amazing growth in recent years. Computers ni have advanced significantly in the last 35 years or so. The speed of computers has improved 200 times in the last ten years. Nevertheless, the reliability curve has advanced sharply as well. There has been a 500-fold reduction in the price per calculational unit. U Everything seems to be possible to store now that the storage capacity is growing so quickly. Very little gadgets can store large amounts of data. To differentiate between various hardware innovations, the word “generations” was first coined. As the entire system is made up of both hardware and software, the focus gradually ity changed to them both. Depending on the technologies utilised, computers can be split into five different generations. The five computer generations are: m 1st Generation The 1940s and the early 1950s saw the development of the first generation of computers. The following are the primary traits and advancements of this era: )A Vacuum Tubes: The circuitry of these computers was based on vacuum tube technology. The big, brittle glass tubes known as vacuum tubes were used to regulate the electricity flow in computer circuits. They were employed in switching and amplification duties. (c Large Size and High-Power Consumption: The first computers were huge devices that frequently took up whole rooms. They produced a great deal of heat while using a large quantity of electricity to run. Amity University Online Computer Science and Information Technology 5 Limited Programmability: Due to their unique purpose, these early computers had little ability to be programmed. Programmes were inflexible since they were frequently Notes e punch card loaded or hardwired. Pioneering Machines: The UNIVAC I (Universal Automatic Computer), the first in commercial computer made in the United States, and the ENIAC (Electronic Numerical Integrator and Computer), one of the first general-purpose electronic computers, are two notable examples of first-generation computers. nl Punch Cards: Punch cards were commonly used for input and output. These cards had holes punched in them at precise locations to represent data or instructions. These cards would be entered by operators into the computer to run programmes and O get output. Low Memory: In comparison to modern standards, the memory of computers from the first generation was extremely little. For short-term storage, they usually employed ty delay line memory or magnetic drums. First-generation computers, in spite of their shortcomings, set the stage for further developments in computing technology. They played a significant role in a number of si areas, such as business data processing, military applications, and scientific research. 2nd Generation The late 1950s saw the introduction of the second generation of computers, which r persisted throughout the 1960s. Significant improvements over the first generation were ve made during this time. The following are the primary traits and advancements of the second generation: Transistors: The primary development of the second generation was the substitution of transistors for vacuum tubes. Compared to vacuum tubes, transistors were ni significantly more compact, dependable, and power-efficient. Computer sizes were significantly reduced as a result, and their production became more economical. U Smaller Size and Lower Power Consumption: Compared to their first-generation predecessors, computers are now more compact, energy-efficient, and smaller thanks to the invention of transistors. This made use and accessibility more widely available. Programming in Assembly Language: Assembly language is a low-level programming ity language that was used to programme second-generation computers. It represents machine instructions with mnemonic codes. Compared to machine code, which was employed in early computers, assembly language offered greater programming freedom and convenience. m Magnetic Core Memory: In computers of the first generation, magnetic drum memory was superseded by magnetic core memory. Higher capacity, faster, and more dependable core memory was available. It was made up of a grid of small magnetised )A cores, one core for each data bit. High-Level Programming Languages: During the second generation, high-level programming languages like FORTRAN (FORmula TRANslation) and COBOL (COmmon Business-Oriented Language) started to gain traction, even if assembly language was still often utilised. These languages made programming more (c approachable for a wider variety of users by enabling programmers to write code with a syntax more akin to that of English. Amity University Online 6 Computer Science and Information Technology Batch Processing: The idea of grouping several jobs or tasks together and executing them consecutively without human involvement was first introduced by second- Notes e generation computers. This increased productivity and made it possible to use computer resources more wisely. in For the most part, technology, dependability, and usefulness all advanced significantly with the release of the second generation of computers. These innovations paved the way for even more breakthroughs in later generations. nl 3rd Generation The 1960s saw the introduction of the third generation of computers, which persisted throughout the 1970s. Significant technological advances during this time led O to the development of more potent, adaptable, and easily available computers. The third generation’s primary traits and advancements are as follows: Integrated Circuits (ICs): Among the major breakthroughs of the third generation, ty integrated circuits (ICs) were invented and widely used. Several transistors, resistors, and capacitors were merged into a single semiconductor chip to create integrated circuits, which increased reliability and performance. Computer design was transformed by this miniaturisation, which produced devices that were more compact, si potent, and energy-efficient. Miniaturisation: Computers are now much smaller and more portable than they were r in earlier generations because to the development of integrated circuits. This made computers more adaptable in terms of design and better suited for a range of uses, ve such as business, scientific research, and private use. Faster Processing: Compared to previous generations, computers are now able to do computations at substantially faster speeds because to integrated circuits. Performance was enhanced overall and more sophisticated calculations were made ni possible by this boost in processing capability. The principles of time-sharing and multiprogramming were first introduced by third- generation computers, enabling simultaneous user interaction with the computer. U While time-sharing allowed users to share the computer’s resources by splitting the CPU time among many jobs or users, multiprogramming allowed the computer to run multiple programmes simultaneously. ity High-Level Language Programming: During the third generation, high-level programming languages like BASIC (Beginner’s All-purpose Symbolic Instruction Code), FORTRAN (FORmula TRANslation), and COBOL (COmmon Business- Oriented Language) grew more popular. Assembler language was more difficult to learn and use than these languages, which opened up programming to a wider user m base. Mainframe Computers: The majority of third-generation computers were mainframes, which are robust devices made to manage massive data loads and accommodate )A numerous users at once. During this time, mainframes were essential to government, business, and scientific computing. Networking: Early networking technologies, such ARPANET (Advanced Research Projects Agency Network), were developed in the latter half of the third generation and served as the basis for the current internet. (c All things considered, the third generation of computers was a major technological breakthrough that opened the door for the creation of contemporary computing systems. Amity University Online Computer Science and Information Technology 7 Improved software capabilities, quicker processing rates, and integrated circuits all helped computers become widely used in a variety of industries. Notes e 4th Generation in The 1970s saw the introduction of a new generation of computers produced by leading companies like IBM, ICL, NCR and Burrough. From a design standpoint, the new generation offered a larger input-output capacity, longer component life and improved system reliability. nl The creation of new, powerful languages to increase the usage of multiprogramming and multiprocessing from a functional perspective resulted in a considerable shift from batch processing to online processing and remote interactive processing. O Because to the development of the microprocessor chip, which contains an entire Central Processing Unit (CPU) on a single silicon chip, low-cost computers became widely available. Microprocessors are not computers in and of themselves, despite the fact that they may carry out all of the arithmetic logic and control functions of the CPU. When these microprocessors ty are connected to memory and input-output devices, they are transformed into microcomputers. Moreover, semiconductor memory is incredibly affordable and small. There are numerous types of memory chips. These are the top three: si Data can be read or written into Random Access Memory (RAM), which is similar to the primary memory of a traditional computer. ROMs (Read-Only Memory) Programmable ROMs (PROM) r ve The information is “burned” onto ROM chips before they are created. It cannot be changed after that. These chips are used in systems where data modification is not required. If the power source fails, the data is still in the memory. A user can program and, if required, even correct the data on a PROM. The term “microcomputer generation” could ni be used to describe the fourth computer generation. The fourth generation of computers use highly developed input-output devices. Fourth-generation computers use a variety of cutting-edge input-output devices, including optical readers, which let users feed entire U documents into the system, audio response terminals, which let users speak data or instructions and graphic display terminals, which let users feed images into the system. Due to the use of Very Large Integrated Circuits, fourth generation (micro)computers are much more portable, significantly less expensive, faster, more dependable and have a ity lot greater capacity for data processing than equivalent third generation computers (VLIC). Machines from the fourth generation include the DEC-10, STAR-1000, PDP11 and Apple Series Personal Computers, to name just a few. 5th Generation m Up until the fourth generation of computers, the focus was mostly on enhancing the hardware, which caused computers to become smaller and faster. Hardware was improved by moving from valves to transistors and then to integrated circuits. Nonetheless, its limited )A processing capability compelled scientists to continue their work on the fifth generation of computers. These computers use the idea of “Artificial Intelligence,” and the Japanese refer to them as “Knowledge Processors.” Automated programming, computational thinking, pattern recognition and robotics are a few examples of artificial intelligence. These are all highly complex processes. When these computers are constructed, they will have (c unfathomable storage capacities and the ability to process billions of instructions every second. On these machines, the current high-level languages will be rendered obsolete, necessitating the development of new computer languages and related applications. Amity University Online 8 Computer Science and Information Technology The fifth generation places the highest value on creating intuitive and simple solutions. Notes Additional goals concern the many forms of technology assistance the fifth-generation e committee believes “issue solving systems” require. The Committee continues, “In these systems, intelligence will be significantly enhanced to resemble that of a human being. The in man-machine interface will resemble human behaviour more closely than current systems.” Three functional specifications apply to the fifth generation: High-intelligence computers with a human-like input and output mechanism that are nl easy to use the creation of trustworthy and effective software utilising modern computer architectures, systems and programming languages and O Thanks to enhanced general functionality and performance, computers are getting smaller, lighter, faster, more powerful, adaptable and dependable. Whichever methods are employed to accomplish them, these goals provide the ty fundamental concepts for computing’s future. 1.1.4 Classification of Computers si There are different types of computers available these days. The function of each type of computer is to process the data and provide some output to the users. However, the methods or techniques used by these computers to process and handle the data may be r different. We can classify the computers according to the following three criteria: ve ™™ Based on operating principles ™™ Based on applications ™™ Based on size and capability ni Based on Operating Principles On the basis of operations performed and methods used to store and process the data and information, computers can be classified into the following categories: U ™™ Analog computers ™™ Digital computers ™™ Hybrid computers ity Analog Computers The analog computers represent data in the form of continuous electrical signals having a specific magnitude. These computers are very fast in their operation and allow several other operations to be carried out at the same time. However, the results produced by m these computers are not very accurate. Therefore, the analog computers are widely used in applications in which the accuracy of results is not a major concern. They are powerful tools to solve differential equations. )A The electronic circuit employed in modern analog computers is generally an Operational Amplifier (Op-Amp). It is made up of semiconductor integrated circuits. The three different characteristic features of Op-Amps are as follows: They have large voltage gain. The voltage gain of an amplifier is defined as the ratio of (c the output voltage to the input voltage. They have infinite input resistance. The input resistance is defi ned as the ratio of change in the input voltage to the change in input current. Amity University Online Computer Science and Information Technology 9 They have zero output resistance. The output resistance is the nominal resistance measured with no load. Notes e Figure below shows the basic circuit used in analog computers. In Figure below the triangle represents an amplifier that is used to invert the incoming signal. If the incoming in signal is a positive signal, then it will be inverted into a negative output signal. Similarly, if the incoming signal is a negative signal, then it will be inverted into a positive output signal. Rf and Rin are used to represent the feedback resistor and the input resistor respectively. nl O ty Figure: Integrated circuit of an operational amplifier si Digital Computers The digital computer, also known as the digital information processing system, is a type of computer that stores and processes data in the digital form. Therefore, each type of data r is usually stored in these computers in terms of 0s and 1s. The output produced by these computers is also in the digital form. The digital computers are also capable of processing ve the analog data. However, the analog data should be first converted to the digital form, before being processed by these computers. Similarly, if we want the output in the analog form, then the digital information produced by these computers should be first converted to an analog form. These conversions are generally carried out by the in-built components of ni digital computers. Digital computers are generally faster and more reliable than the analog computer systems and provide more accurate results. The computer used by a home user is a U typical example of digital computer. The digital computers are also employed in colleges, universities and small and medium sized businesses. The different hardware components of a digital computer are an Arithmetic-Logic Unit ity (ALU), a Control Unit (CU), a memory unit and I/O units. The ALU of a digital computer is used to perform various arithmetic operations, such as addition, subtraction, multiplication and division and various logic operations such as AND, OR, NOT, etc. CU helps in directing the operations of ALU. The memory unit is used to store the data on temporary or permanent basis. The input units are used to enter the data into the computer and the m output units is used to display the information generated by the computer to the user. Hybrid Computers )A The hybrid computer is a combination of analog computer and digital computer because it encompasses the best features of both these computers. Therefore, the hardware components of hybrid computers are usually the mixture of analog and digital components. These features make the hybrid computers very fast, efficient and reliable. In these computers, data is generally measured and processed in the form of electrical signals (c and is stored with the help of digital components. However, these computers can also be used to perform various types of logical operations. Amity University Online 10 Computer Science and Information Technology The input accepted by the hybrid computers is a continuously varying input signal. This input signal is then converted by them into a set of discrete values for performing Notes e different operations. These computers prove to be very cost-effective in performing complex simulations. The hybrid computers are also less expensive than the digital in computers. The computer used in hospitals to measure the heartbeat of the patient is a very good example of a hybrid computer. Apart from this, the hybrid computers are also used in scientific applications, various engineering fields and in controlling business nl processes. Based on Applications O Different computers are designed for different purposes so that they can perform their tasks according to their capabilities. On the basis of different applications or purposes, computers can be classified into the following categories: ™™ General purpose computers ty ™™ Special purpose computers General Purpose Computers si They are designed in such a manner that they can work in all environments. The general-purpose computers are versatile and can store a number of programs meant for performing distinct tasks. However, the general-purpose computers are not efficient and r consume a large amount of time in generating the result. ve Special Purpose Computers They are designed in such a manner that they can perform only a specified task. The special purpose computers are not versatile and their speed and memory size depend ni on the task that is to be performed. These computers are less expensive as they do not contain any redundant information. The special purpose computers are efficient and consume less amount of time in generating the result. U Based on Size and Capability Computers differ from each other in terms of their shape, size and weights. Each type of computer performs some unique functions and can be employed in the fields suited ity for them. These computers also differ in terms of processing speed. Some of them are of moderate speed, whereas some others operate at a very fast speed. On the basis of size and capability, computers can be classified into the following categories: ™™ Microcomputers m ™™ Mini computers ™™ Mainframe computers ™™ Super computers )A Microcomputers A microcomputer is a small and cheap digital computer that is designed to be used by individuals. It is built around a microprocessor, a storage unit and an I/O channel. Apart from these components, the other parts that a microcomputer includes are power supply, connecting cables, keyboard, mouse, printer and scanner. These computers also include several software programs such as operating system, (c system software and utility software. The micro computers are generally available in the form of PCs, workstations and notebook computers. Figure below shows the block diagram of a microcomputer. Amity University Online Computer Science and Information Technology 11 Notes e in nl O Figure: The block diagram of a microcomputer ty Microprocessor It is the heart of the microcomputer. It incorporates all the functions of a CPU onto si a single IC in a microcomputer. The basic units of microprocessor are ALU, register unit and CU. ALU is used to perform various arithmetic and logic operations. The register unit is used to store the data and instructions temporarily needed by the ALU. The various r registers used by a microcomputer are Accumulator (AC), program control register, I/O register, instruction register, Memory Address Register (MAR) and Memory Buffer Register ve (MBR). CU is used to manage and direct the operations performed by the microcomputer. Memory It is used to store the data and instructions on temporary or permanent basis. A ni microcomputer generally employs two types of memories, i.e., primary memory and secondary memory. Primary memory, also called main memory, is used to store the data and instructions temporarily. It stores only those instructions and data that are needed by U the microprocessor of the computer for processing. The secondary memory, also called auxiliary memory, is used to store the data and instructions permanently. Magnetic disks and magnetic tapes are some of the examples of secondary storage. ity Peripheral Devices They are generally the input and output devices attached to the computer. The various input devices—such as keyboard and mouse—are used to enter program and data into the computer before performing any kind of operation. They are used to transfer data and m instructions from the external environment into the computer. The various output devices— such as monitor and printer—are used to display the results computed by the computer to the user. The major function performed by the output devices is to convert the binary result computed by the computer into a form that can be easily understood by the users. )A System Bus It is also referred to as the frontside bus, memory bus, local bus or host bus. The system bus in the microcomputer is used to connect microprocessor, memory and peripheral devices into a single unit. The system bus is a collective name given to address, (c data and control bus. The address bus is a unidirectional bus that is used to identify a peripheral device or a memory location. The data bus is a bidirectional bus that is used to transfer data among microprocessor, memory and peripheral devices of the computer. The Amity University Online 12 Computer Science and Information Technology control bus is used by the microprocessor to send control signals to the various devices within the computer. Notes e Depending on the size, the microcomputer can be further classified into the following types: in Desktop Computer It is also known as PC. The desktop computer systems are designed to be used by an nl individual at a single location. The typical components of a desktop computer are keyboard, mouse, monitor, hard disk storage, peripheral devices and a system unit. These computers are very cheap and an individual can easily purchase them for home or business use. The O different manufacturers of desktop computers are Apple, IBM, Dell and Hewlett-Packard (HP). Laptop Computer ty It is a portable computer that can be taken from one place to another at any time very easily. It is also known as notebook computer, notepad or mobile computer. The laptop computer is a small size computer that incorporates all the features of a typical desktop computer. These computers are provided with a rechargeable battery that removes the si need of continuous external power supply. However, these computer systems are more expensive than desktop computers. The different manufacturers of laptop computers are Acer, Apple, Panasonic, Sony and HP. r ve Hand-held Computer It is also known as Personal Digital Assistant (PDA), converged device, palmtop or mobile device. The hand-held computer is a very small size computer that can be kept in pocket. It generally has a very small display screen and the input device for these ni computers is a pen or an electronic stylus. The storage capacity of hand-held computers is not very large. They generally use small cards to store data and programs instead of disk drives. Therefore, they are less powerful as compared to the desktop and laptop computers. The different examples of hand-held computers are Apple Newton, Casio Cassiopeia, U Franklin eBookMan, etc. Mini Computers ity A minicomputer was first introduced in the year 1960 by Digital Equipment Corporation (DEC). They were called mini computers because of their smaller size than the other computers of those times. They can handle more data and more input and output than microcomputers. Mini computers are less powerful than mainframe computers but more powerful than microcomputers. Therefore, they are also referred to as the midrange m computers. They are able to cater to the needs of multiple users at a single instant of time. The number of users supported by mini computers may range between 4 and 200. These computers are generally designed for small and medium sized business environments. )A Mini computers are generally used in business environments as the centralised computer or the network server. After implementing the minicomputer as the network server, hundreds of desktop computers can be connected to it. Mini computers can also be used as the web servers that can handle thousands of transactions in a day. These computers are less expensive than mainframe computers and hence suitable for those organisations that (c cannot afford high priced servers. The different examples of mini computers are PDP 11, IBM (8000 series), VAX 7500, etc. Amity University Online Computer Science and Information Technology 13 Mainframe Computers A mainframe computer is a very large computer that is employed by large business Notes e organisations for handling major applications, such as financial transaction processing, Enterprise Resource Planning (ERP), industry and consumer statistics and census. They in are capable of handling almost millions of records in a day. The mainframe computers can also be used as the centralised computers with several user terminals connected to it. The mainframe computers are actually considered as the predecessor of servers. These nl computers are bigger and more expensive than other computers. The implementation of mainframe computers also requires large space with a closely monitored humidity and temperature levels. These computers are termed as mainframe because all the hardware units are arranged into a frame. The different manufacturers of mainframe computers are O IBM, Amdahl, Hitachi, etc. Examples of mainframe computers are IBM 3000, VAX 8000 and CDC 6600. The mainframe computers can maintain large databases that can be accessed ty by remote users with a simple terminal. Therefore, the mainframe computers are also known as super servers or database servers. The processing speed of these computers is generally optimised by employing more than one microprocessor to execute millions of instructions per second. The mainframe computers also have large capacity of primary and si secondary storage as compared with other types of computers. Some of the characteristic features of mainframe computers are as follows: r A typical mainframe computer generally has a maximum of 16 microprocessors. ve However, some modern mainframe computers can have more than 16 microprocessors. The RAM capacity of these computers lies between 128 MB and 8 GB. They are able to run multiple operating systems and therefore, termed ‘virtual ni machines. They have different cabinets for primary storage, secondary storage and I/O units. U They can handle huge amount of I/O operations at the same time. Super Computers A super computer is the fastest type of computer that can perform complex operations ity at a very high speed. The super computers were first presented in the year 1960 by Seymour Cray at Control Data Corporation (CDC). They are more expensive than the other categories of computers and are specially designed for the applications in which large number of complex calculations have to be carried out to get the desired output. m The main reason behind the fast speed of super computers is that they are designed only to execute small number of programs at a time rather than many programs simultaneously. Some of the manufacturers of super computers are IBM, Silicon Graphics, Fujitsu, Intel, etc. Examples of Super Computers are CRAY 3, Cyber 205, NEC SX-3 and )A PARAM from India. The various application areas of super computers are as follows: ™™ Weather forecasting (c ™™ Animated graphics ™™ Fluid mechanics Amity University Online 14 Computer Science and Information Technology ™™ Nuclear energy research Notes ™™ Petroleum exploration e Super computers are manufactured with no special hardware. Like the typical computer, they have CPU and memory as their major components. However, the CPU in of super computer operates at faster speed, as compared to the other categories of computers. Super computers are the fastest computers because they employ thousands of processors, hundreds of gigabytes of RAM and thousands of gigabytes of secondary nl storage. The designers of supercomputers use two different methods for optimising their performance. These methods are pipelining and parallelism. Pipelining is a technique O that allows the microprocessors to execute the second instruction before the execution of the first instruction is completed, whereas parallelism allows the microprocessors to execute several instructions at the same time. In this type of computing, a large and complex problem is first divided into smaller problems that are solved concurrently by the ty microprocessor of the computer. 1.1.5 Applications of Computers si Computers have permeated various facets of our daily existence, serving as indispensable tools that furnish desired information on demand. Whether checking ticket reservations for railways, airplanes, or cinema halls, accessing library book catalogues, r reviewing a person’s medical history, locating a place on a map, or determining the ve dictionary definition of a word, computers offer information in diverse formats such as text, images and video clips. Education: Computers are essential tools and resources for education. Teachers use computers to make training packages, lecture notes and presentations. They ni also use them to administer online tests and provide remote learning via e-learning programmes. Computers help researchers by providing convenient access to conference and publication details as well as international research materials. U Entertainment: Computers have significantly impacted the entertainment industry, enabling users to download and watch movies, play games, chat, book cinema tickets, use multimedia for movie production and incorporate visual and sound effects. Additionally, users can listen to and share music, as well as create music using ity computers. Sports: Computers find applications in watching games, viewing scores, improving gameplay, playing games like chess and creating new games. They are also instrumental in training players. m Advertising: As a potent advertising medium, computers display advertisements on various websites, facilitate electronic-mail campaigns and allow customers to post product reviews. Advertisers use computers to create visually and acoustically )A enhanced advertisements, reaching a global audience. Web advertising, integral to Google’s business model, holds significant importance in the marketing plans of many companies. Medicine: In the medical field, computers assist researchers and practitioners in accessing information on medical research advancements, obtaining opinions from (c doctors globally and storing patients’ medical histories. Computers are integral to sophisticated medical equipment and aid surgeons during critical operations. Amity University Online Computer Science and Information Technology 15 Notes e in nl O Science and Engineering: Computers are used by scientists and engineers for complex scientific computations, design and drawing (CAD/CAM applications) and ty design simulation and testing. Computers are necessary for sophisticated scientific applications such as space exploration and rocket launch because they can store large amounts of complex data, carry out calculations and visualise three-dimensional si things. Government: Governments employ computers for internal operations and e-governance, offering information through department websites. Citizens use r computers for tasks such as filing income tax returns, paying taxes, submitting bills ve online and accessing land record details. The police department relies on computers for criminal searches using fingerprint matching. Home: Computers are becoming essential pieces of technology for homes; they are used for education, learning, gaming, account management, online chat with ni friends and family and bill paying. Home theatre systems, food processors, washing machines, TVs and security equipment all have microprocessors built in. Computers are used in a wide range of fields, including banking, investing, stock U trading, accounting, ticket reservations, military operations, weather forecasting, social networking, business organisations, law enforcement, video conferencing, telepresence, publishing books, online newspapers and information sharing. The list is too long to go into here. ity 1.1.6 Capabilities and Limitations of Computers Capabilities Speed: Speed refers to the time a computer system takes to fulfil a task or complete m an activity and it is widely recognised that computers outperform humans in terms of time efficiency. While humans typically consider seconds or minutes as units of time, computer systems operate at such high speeds that their time units are measured in )A fractions of a second. Presently, computers can execute 100 million calculations per second, leading to the establishment of Million Instructions per Second (MIPS) as the industry standard for classifying computers based on their speed. Accuracy: Accuracy refers to the degree of precision in calculations and task performance. Detecting errors in computer calculations or rectifying inaccurate records can consume (c years of one’s life. A significant portion of errors in Computer-Based Information Systems (CBIS) arises from issues such as poor programming, erroneous data and deviations from established rules, primarily caused by human factors. Amity University Online 16 Computer Science and Information Technology Errors stemming from hardware issues are typically identified and corrected by the computer system autonomously. Computers exhibit rare instances of error, showcasing Notes e their ability to execute tasks with a high level of precision. Reliability: Reliability is the attribute that instils trust in users, making the computer in a dependable tool. Computer systems excel in performing repetitive tasks without succumbing to fatigue, boredom, or exhaustion, rendering them more reliable than humans. However, despite their inherent reliability, computer systems may encounter nl failures stemming from internal or external factors. In highly automated industries, any computer system failure can be catastrophic. To mitigate such risks, these industries often implement backup facilities that seamlessly O take over tasks, minimising downtime and ensuring continuity of operations. Storage: Storage denotes a computer’s capacity to retain data for future retrieval. In contemporary times, computers not only offer immediate data access but also possess extensive data storage capabilities within a compact physical footprint. A typical ty computer system can store and make available online millions of characters and thousands of images. It is evident from the discourse that computer capabilities surpass those of humans. Consequently, when employed judiciously, a computer can amplify an organisation’s effectiveness tenfold. si Limitations of Computers Limitations encompass the areas where computer systems fall short compared to human capabilities. r ve Lack of Common Sense: Absence of common sense stands out as a significant limitation for computer systems. Despite their efficiency, speed and reliability, computers lack common sense because no fool proof algorithm has been devised to imbue them with logical reasoning. Operating solely on stored programs, computers ni inherently lack the nuanced understanding associated with human common sense. Zero IQ: Another limitation of computer system is their lack of Intelligence Quotient (IQ), effectively amounting to a zero IQ. Computers cannot perceive or autonomously U deduce actions to take in a given situation unless that specific scenario has been pre-programmed into them. While computers excel at executing programmed tasks, regardless of their complexity, they lack the innate intelligence to adapt and respond spontaneously to unforeseen circumstances. ity Lack of Decision Making: The absence of decision-making capabilities is another notable limitation of computer system. Decision-making is a multifaceted process that requires elements such as information, knowledge, intelligence, wisdom and judgment. Computer systems lack the inherent ability to independently make decisions as they do not encompass all the essential components of the decision-making process. m While computers can be programmed to make decisions that follow predetermined procedures, they are unable to make nuanced, context-specific decisions in the absence of explicit programming. This limitation stems from their lack of inherent wisdom and )A evaluative faculties. In contrast, human beings possess the remarkable power of decision- making, drawing upon a complex interplay of cognitive abilities. 1.1.7 Components of Computer System (c A computer, an electronic device, receives input data, performs mathematical and logical operations to process the data and produces the desired output. The computer system comprises four integral components: (1) Hardware, (2) Software, (3) Data and (4) Users. Amity University Online Computer Science and Information Technology 17 Hardware Hardware refers to the actual components of the computer. The physical components Notes e input, store, process and show the results to the users after they have been entered. A general-purpose computer’s keyboard, mouse, memory, CPU, display and printer are its in fundamental hardware components. Among these physical components are the keyboard and mouse, which are used to enter data into the computer; memory, which stores the data entered; CPU, which processes the data entered; and monitor and printer, which show the nl processed data to users. The central processing unit (CPU) is the major part of the computer that handles input and output device management in addition to executing different activities. The Control Unit O (CU) and Arithmetic Logic Unit (ALU) are two of its essential parts. The data that is retrieved from memory is subjected to arithmetic operations (like addition, subtraction, etc.) and logic operations (like AND, OR, etc.) using an ALU. The operations pertaining to the input and output devices are managed by the CU. In order to provide output to the users, it retrieves ty the instructions from memory, decodes them and then executes them. Software si A collection of instructions and programmes that assist computers in processing data are referred to as software. Software is essential to a computer’s correct operation. The two primary categories of software are viz. System software and application software: r System software: Applications created specifically to carry out a certain duty for the user are referred to as application software. Because the features of application software ve are utilised by the user to achieve the intended outcomes, it is also known as end-user programmes. Spreadsheets, word processors, database applications and presentation programmes are some instances of application software. ni Application software: application software is the category of programmes that are made to manage the various functions of a computer. It primarily controls the operations of the computer hardware and communicates with the application software to carry out certain functions. Application software includes things like operating systems, compilers, U assemblers, interpreters and device drivers. Data The term “data” refers to the unprocessed facts and information that users often ity submit into computer systems in order to produce the intended results. The computer system presents the data in a comprehensible format and the users receive the outcome in an understandable format. A computer system’s programme, which consists of various instructions, manipulates data. Data can be presented in two ways, namely quantitative and m qualitative, depending on the needs. Qualitative data: Qualitative data are those that are expressed verbally or in written form. The audio, video and image files utilised for the graphical display might also be )A included in this category of data. Quantitative Data: Data that are numerically expressed are referred to as quantitative data. distinct numbers and symbols are used in this type of data to indicate distinct quantities. A user may enter data into the computer system in the form of text, numbers, or (c graphics. Bits and bytes make up the data that is kept in the computer system’s memory. The smallest unit of information used in a computer system is called a bit and eight bits make up a byte. Amity University Online 18 Computer Science and Information Technology People Notes People create computer systems and people design them for people. Thus, people e comprise both those who actually use computer systems for their applications (known as users) and those who design and develop hardware and software (known as systems people). in Programmers, hardware engineers, software engineers and other professionals work in systems. A diverse range of individuals operating in various application domains, including education, business, entertainment, training, etc., may be considered users. Depending nl on their needs, users can create their own software or use the standard software that is already available. O The Input-Process-Output Concept A computer follows an input-process-output concept, involving (1) accepting data, (2) processing data, (3) generating output and (4) storing data. This concept underscores the transformation of input data into meaningful output information. ty si (https://images.app.goo.gl/cjrh2FUoc23LT49RA) r The input-process-output concept involves: ve Input: The computer receives data input from the user in the form of characters, words, text, sound, images, or documents via input devices such as the keyboard. Process: The computer follows instructions or programmes supplied by the user ni to process incoming data. This covers document editing and modification as well as arithmetic or logic calculations. The computer’s main memory is used to temporarily store data, instructions and output while processing is underway. U Output: The end product of data processing can be written words, music, pictures, or written papers. The output can be played, sent to a printer for printing, or shown on a monitor by the computer. Storage: For future retrieval, input, instructions and output are permanently saved on ity secondary storage media like discs or tapes. Components of Computer Hardware There are three primary parts that make up the computer hardware: m Input/Output (I/O) Unit: This unit, which includes the input and output units, makes it easier for users to interface with computers. User-provided data is transformed by the input unit into a computer-comprehensible format and processed data is presented )A in an understandable way by the output unit. Keyboard, trackball and mouse are examples of input devices; monitors and printers are examples of popular output devices. CPU, or central processing unit: The CPU is in charge of organising and directing computer functions and handles incoming data. The CPU processes arithmetic and (c logic operations on input data through the use of the Control Unit (CU) and Arithmetic Logic Unit (ALU). Coordinating unit functions and verifying instruction execution sequences, the CU is in charge of overseeing all aspects of computer operations. Amity University Online Computer Science and Information Technology 19 Memory Unit: Also referred to as the main memory or primary memory, the memory unit enables CPU activities by temporarily storing data, instructions, intermediate Notes e results and output throughout data processing. Before processing, input data is brought into the main memory, where instructions and interim results are also stored. in Programmes, data and output are permanently stored in the secondary memory, another type of storage device. Magnetic tapes, magnetic discs and optical discs are a few examples. nl 1.1.8 CPU: Control Unit and ALU To define a computer system, one must understand computer organisation and O computer architecture, two distinct but connected, crucial ideas. In order to achieve specific performance and function goals, computer architecture defines the fundamental properties of hardware components and how they are connected. The data representation, I/O protocols, instruction set and other elements are a few examples of the qualities. The logical ty structure of a computer system is essentially defined by its architecture. In order to accomplish the objectives specified in the architecture, different hardware pieces must be designed and physically arranged in an ordered manner. This is known as si computer organisation. Various models representing various organisational types could exist for a given architecture, contingent on factors such as cost, physical dimensions and technology employed. Central Processing Unit r ve The essential component that drives the operation of any computer system is the central processor unit (CPU). Processing of the data within the computer system is done by the CPU, also known as the “brain” of the machine. It is also in charge of managing every other system component. A typical block diagram of a computer system is depicted in the ni figure below, which also shows how the memory and CPU are arranged in relation to the input and output devices. U ity m )A Figure: The block diagram of a computer system The CPU goes through four phases for its primary functions: (c Fetching instructions from the memory. Decoding the instructions to decide what operations to be performed. Amity University Online 20 Computer Science and Information Technology Executing the instructions. Notes Storing the results back in the memory e The CPU cycle, which consists of four phases, is depicted in the figure below. The following subsystems make up the central processing unit, as depicted in the above figure: in ™™ Arithmetic Unit (AU) ™™ Logic Unit (LU) nl ™™ Control Unit (CU) The memory subsystems listed below are utilised by the CPU to perform processing tasks: O ™™ Main Memory ™™ Unit Cache ™™ Memory Registers ty r si ve ni Figure: The CPU Cycle U Arithmetic Unit The CPU’s Arithmetic Unit (AU) is responsible for carrying out arithmetic operations on the data. Addition, subtraction, multiplication and division are examples of arithmetic ity operations. Typically, the AU performs the multiplication and division operations as repetitive addition and subtraction processes, respectively. For integer or fixed-point operations (integers) and real or floating-point operations (real/decimal), certain CPUs have different AUs. m An instruction including an opcode, operands and the format code is what AU receives as input. The data on which the operation is to be done is specified by the operands, while the opcode specifies the operation to be carried out. The operand format, such as fixed- )A point or floating-point, is suggested by the format code. The operation’s outcome and its state, including whether the result is final or not, are contained in the output of the AU. The AU stores the output in a storage register. Data may be retrieved from the CPU’s register, a tiny storage region, more quickly than from any other storage area. Logic Unit (c The CPU’s Logic Unit (LU) is responsible for carrying out logical operations on the data. It can carry out sixteen distinct kinds of logical processes. Greater than (>), less than Amity University Online Computer Science and Information Technology 21 ( ARR[MID]) LOW = MID + 1 else si HIGH = MID - 1 Quick Sort Pseudocode: