Você está na página 1de 49

9th Class 1

http://www.mumtazgill.com/chapter-1.html

Chap 1 Introduction to Computers


Q1. Describe Charles Babage work in the history of computers? Answer Babbage's contribution in the development of computer In the I823. Charles Babbage a British mathematician worked on the constructor of huge mechanical machine based on the principles of difference of squares of numbers. In 1833 he designed a prototype computer. He called it an 'ANALYTICAL ENGINE1. He can not convert his dreams into reality because the standard of engineering and technology was not so high at that time.

Parts of Analytical engine Analytical engine consisted of five units, which are given as follows Store Unit This part was to store the numbers fed to the machine and also those numbers dial * generated during the process of problem solving, along with the instructions. Mill Unit This was the arithmetic unit, which had to perform all the arithmetic operations automatically by rotation of gears and wheels. Control Unit This unit was to supervise all the other units and direct their working. The other task assigned to this unit was to transfer the numbers and instructions from the store to the mill and vice versa, by rotation of gears and wheels. Input Unit The input unit of the analytical engine had to supply data and instructions to the store. The input media was in the form of punched cards. Output Unit The output unit of the analytical engine had to display the results of calculations. STORE INPUT UNIT CONTROL MILL Schematic diagram of Analytical Engine Why Babbage is called fatlier of computer In fact Babbage machine gave birth to research in the field of computer and that is why the modern comrjuter is largely based on Ihe principle developed by the Babbage. That's why he is considered as the father of computer. Q2. Describe the advancements in the computers during the 1950's and 1960's? Answer Advancement in 1950's and 1960's In early I950's, two important engineering discoveries changed the image of the computer I field. These discoveries were the magnetic core memories and .the Transistor Circuit F.lements. This quickly found its way into new models of digital computers. These machines were very expensive and were afso complicated to operate. Such computer? were mostly found in large computer centers, government, and research and development laboratories. Those computers mostly worked on a single problem at a time. During this period, the major computer manufacturers began to offer a range of computer equipment with different prices, as well as accessories such as: > Card Readers "f Printers > Cathode-Ray-Tube > These were widely used in business for such things as: > Accounting . > Payroll > Inventory control > Ordering Supplies > Billing Central Processing Unites (CPUs) for these usages did not have to be very last and were usually used to access large arnount of records on a computer file. The computer systems were sold for applications, such as hospitals, banks, defense etc. Q3. Write a note on a different computer generations briefly explaining their features. Answer Generation of Computers "Generation" in computer talk is a step in technology. It provides a framework for the growth of the computer industry. a) First Generation Computers These computers was introduced during 1946 to 1959, EDVAC (Electronic Discrete Variable Automatic Computer), ENIAC (Electronic Numerical Integrator and Calculator), EpSAC (Electronic Delayed Storage Automatic Computer), UNIVAC-I (Universal Automatic Computer) and Mark-I computers are example of 1 st generation computers. Characteristics of 1st Generation Computers 1. 1st generation of computers used Vacuum Tubes. 2. These computers were the fastest calculating devices of their time. They could perform computations in milliseconds. 3. These computers were larger in size and slow in speed. 4. Maintenance of 1 st generation computer's was difficult. 5. Memory size of these computers was limited. 6. They were costly and unreliable. b) Second Generation Computers Iransistors replaced vacuum tubes and gave birlh lo the second general ion of computer These computers were introduced during 1959 to 1965. UNIVAC-ll. IBM 700, 1400 an; OUTPUT UNIT

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 2
!600 series. Honey Well 800 series. ICL 1300 series. General Hleelric Corporation's GE2D). 635 and 645 scries examples of second generation computers. Characteristics of 2nd Generation Computers 1. 2nd general ion of computers replaced Vacuum Tubes with Transistor. 2. These computers were smaller in size, faster and more reliable as compared to generation of computers. 3. These computers were able to reduce computational time from millisecond i microsecond. 4. Maintenance of 2nd generation computer's was easy. c) Third Generation Computers I IK- third generation uas based on 1C technology and tlie computes that were designc the use of integrated circuits (IC's) were called third generation computers. These compito ucre introduced during 1965 lo 1972. IBM 360 series, PDF series and ICL 1900 series example;, of third generation computers. Characteristics of 3rd Generation Computers 1. The electronic technology of solid slate was introduced. 2. This generation of computers was even more reliable, faster and smaller than il previous ones. .5. These computers were able to reduce computational times from microseconds i nanoseconds. 4. Maintenance cost of these computers is low because hardware failures are rare 5. These computers require less power than previous generation computers (I) Fourth Generation Computers In 19-70's the integrated technology was developed sufficiently to integrate all main time of a computer on a single chip called a microprocessor. The introduction of.microprui' brought the computer age into fourth generation computers. These compiners introduced since 1972 to onward. IBM 3033 and 4300, Burroughs B6900, Hoiieywcll v series, NCR 8500 scries, CYBER 205. Radio Shack TRS-80 and the hand licit! conipuL Sharp PC-1211 are examples of fourth generation of computers. Characteristics of 4th Generation Computers 1. Integrated circuit technology was developed to integrate all main function-computer on single chip called "microprocessor". 2. This generation of computers were very reliable, faster and smaller than the pi ones. 3. Much taster in computation than the previous generations. 4. Fourth generation of computers brought computer down from the organization level to persona! level. 5These computers arc totally general purpose and cheapest among all generation. Computer Model HIM 3033. IBM 4300. Burroughs B6900. Honeywell scries, 60 NCR 8500 series. CYBER 205 series. Radio Shack TRS-80. Q4. What is the difference between a digital and an analog computer? Answer Difference between an analog computer and a digital computer. Analog Computers 1. Accept data in continuous or physical form. 2. Represent it in a suitable form on an indicator and perform scientific operations. 3. Analog represent physical quantities like speed, weight, temperature etc. 4. Analog computers are fast in processing but not very accurate. 5. They can be used in industries to control various processes. Digital Computers !. Accepts data in the form of digits. 2. Represent it in terms of discrete numbers and processes numbers using various arithmetic and 3. Digital computer quantities are counted rather than measured. 4. Digital computers arc capable to do computation at a fast rate and can store large data or information. 5. They are easy to program and are general purpose in use. Q5. Write short notes on the following: a. Pocket Computers b. Laptop Computers c. Micro Computers Answer Micro or Personal computers are often called PCs. It is at the lowest end of the computer range in terms of speed and storage capacity. Microcomputers are the types of computers we are using in your classes. They range in price from a few thousand rupees while providing more computing power than computers of the 1970s that tilled entire rooms. They are excellent when used in small business, homes, and school classroom-;. They can only be used by one person at a time. They are much slower than the large computers. Microcomputers are usually divided inlo desktop computers, pocket computers and laptop computers.

logic operations.

Chap 1
Introduction to Computers
Desktop Computers A PC usually comes with a tower that holds the main circuit boards and disk drives of the computer, and a collection of peripherals, such as a keyboard, mouse, and monitor. In the new millennium there are two main kinds of PCs: the Apple Macintosh line, and "all of the others". The term "PC" or "IBM" refers to "all of the others", which is a historical artifact back to the days when IBM and Apple were the two main competitors in the market and IBM called its machine a "personal computer". So, although a Macintosh is a personal computer, the term "PC" often means a machine other than a Macintosh.

Fig: Desktop Computers Laptop Computers Another classification of microcomputer is the notebook computer. A notebook computer can fit into a briefcase and weigh fewer than two pounds, yet it can compete with the microcomputer. A larger, heavier version is called a laptop computer. Notebooks generally cost more than microcomputers but can run most of the microcomputer software and are more versatile. Like other, computers, notebook computers are getting faster, lighter, and more functional.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 3

Fig: Laptop Computer Pocket Computers The smallest computer is the handheld computer called a personal digital assistant (PDA) or a Pocket Computer. PDAs are used to track appointments and shipments as well as names and addresses. PDAs are called penrbased computers because they

Fig: Palmtop Computer utilixe a pen-like stylus that accepts hand-written input directly on a touch-sensitive screen. Q6. Describe the impact of computers and Internet on society. Answer The computer lias changed society today as much as the industrial revolution changed society in the eighteenth and nineteenth centuries. Computers arc everywhere-at home, ill work. and at school. Society has benefited greatly from computers. Nearly every discipline used computers. The use of computers in fields such as education, business, government, hanking, health care, science, publishing, and travel has had tremendous impael on society. Education Educalion is the process of developing knowledge through instruction. Traditionally, this instruction came from people such as parents, teachers, and employers, and from printed materials such as books, journals, and guides. Today, educators are turning to computers to assist with the learning process. As the costs of personal computers drop, man) schools and businesses can afford to equip labs and classrooms with computers. In labs, students use software packages to complete assignments. Some educators also use computer-based training and Web-based training along with or as a replacement lor their lecture presentations. Business Computer is mm being widely used in business and industr). Computer information s\Mcms are used to keep track of huge transactions. They also allow transactions lo Iv made livm am where in the world. These are also used to control machines which iiuinuf.KUire products, keep track of customer's bills, analyze sales of various products in different localities on monthly and yearly basis: calculating and recording employ pays and performs various other tasks. These are also widely used in business community to reduce the administrative paperwork and cost. Banking and Finance Many people today use computers to help them manage their finances. Some use personal finance software to balance their checkbook, pay bills, track personal income and expenses, track investments, and evaluate financial plans. Most of these packages offer a variety of online services. For example you can track investments online, compare insurance rates from leading insurance companies, and do online banking. With online banking, you transfer money electronically from your account to a payee's account or download monthly transactions from the Web right into your computer. Many financial institutions offer Web-based online banking. The difference between these Web sites and personal finance software is all your account information is stored on the bank's computer. The advantage is you can access your information from anywhere in the world. Application in Retailing Applications Modern stores arc quickly incorporating computer system for a number of reasons. Firstly these systems allow the billing of items to be done at great speed. The accept credit cards, allowing customer to purchase goods without cash. The items at store are marked with "Bar Code". This is called as "Universal Production Code". This is a sequence of lines, which is read by a "Bar Code Reader". The price of the item is stored in this code and these are automatically added to the bill. The computer generated the receipt and the customer pays the bills. The computer along with generating the bills aKo updates the inventory list, This allows the store manager to see that which items arc short and in mere demand, Marketing experts can also use this information. Virtual Reality' Virtual reality (VR) is the use of computers to simulate a real or imagined environment that appears as a three-dimensional (3-D) space. VR allows you to explore and manipulate controls to expedience the 3-D space fully. On the Web, VR involves the display of 3-D images you can explore and manipulate interactively. Using special VR software, a Web developer creates an entire 3-D site that contains infinite space and depth, called a VR world. Many of these worlds provide 360-degree tours of locations such as automobiles, buildings, colleges, sites of interest, and cities. When many people think of virtual reality, they focus on the thrilling aspects of VR games. Virtual reality, however, does have numerous practical applications. Training, engineering, e-commerce, science, and medicine use virtual reality. Many companies use VR simulations to train people that operate expensive and complicated equipment such as airplanes and ships. In recent years, developers also have created VR simulations for less expensive, simpler equipment such as trucks and construction machinery. Architects use VR to show clients previews of buildings and landscapes. Automobile dealers use VR to create a virtual showroom in which customers can view the exterior and interior of available vehicles. Medical schools also use VR for training-most often to simulate surgery. Entertainment In the past, you played board games with friends and family members, viewed fine art in an art gallery, listened to music on you stereo, watched a movie at a theater or on television, and inserted pictures into sleeves of photo albums. Today, you can have a much more fulfilling experience in each of these areas of entertainment. In addition to playing exciting, action-packed, 3-D multiplayer games, you can find hours of entertainment on the computer. For example, you can make a family tree, read a book or magazine online, listen to music on the computer, watch a video or movie on the computer, compose a video, edit photographs, plan a vacation, and countless other activities. These forms of entertainment are available on CD-ROM, DVD-ROM, and also on the Web. On the Web, you can view images of fine art in online museums, galleries, and centers. Some artists sell their work online. Others display them for your viewing pleasure. Other Areas Today computers are being used in many other areas to save lime and cost. These include publishing where documents can be written and saved on a computer. This is accomplished by a word-processing application such as Microsoft Word. These applications allow the writers to correct and print the document in very short time. These documents can also be sent from one place to another via Internet.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 4
Computers are also being used in libraries to maintain track record of books and library members. Any information regarding the book, its author or date of issue can be searched from the computer in seconds. They can also be issued warning when the books issued to them are over-due and must be relumed immediately. Thus computer has allows people to work fast, saving time and money. Also it has helped in spreading information and knowledge via Internet. The future will allow many additional opportunities Jbr the applications of automation to many areas Q7. Define Computer. Briefly describe classification of computers. Answer Definition of Computer The word "computer" comes from the word "compute" wliich means to calculate. So ;i computer is normally considered to be a calculating device that can perform arithmetic operations at enormous speed. A computer is an electronic device that stores, retrieves and processes information. It helps us 10 solve wide and varied problems accurately and quickly. These problems maj relate to the fields such as industry, commerce, engineering and education. Computer is extremely an efficient and reliable machine. It has the advantage over human mind lhat it does not get bored of repetitions, and performs a function each lime with the same speed and accuracy. OR A computer is a fast accurate electronic machine that is designed, to accept and store input data, process idem and produce output result under the direction of a stored program of instructions.

Fig: A Personal Computer Classification of digital computers Based on the size, i.e. data processing capacity, the computer systems are classified as: 1. Mainframe Computers 2. Mini Frame Computers 3. Micro computers 4, Supercomputers This classification is, based on the processing of the functional capabilities and size of memory. 1. Mainframe Computers Mainframe computers are* large-scale computers together with their supporting equipment cost millions of dollars. Computer systems of this srze require very large rooms and a special physical environment (e.g. Air conditioning). Large systems can accommodate a large number and variety of supporting equipments. Mainframes are fast and sophisticated with very large memory. These are used by government large organizations such as banks, airlines and universities where they support multiple users and can handle multiple processing tasks concurrently. This means that a mainframe is able to do different jobs for different users at the same time. Examples of mainframe computers are Amdahl 580,IBM 4341.

Fig: mainframe computer Areas of applications Major areas of application of mainframe computers are as follows. i. Large organizations ii. Banks iii. Airline reservations iv. Universities v. Government organizations 2. Mini Frame Computers These low cost computers use integrated circuits. These computers are used in business, education and government organizations. Digital Equipment Corporation introduced minicomputers in the mid 1960s. Other companies such as Data General Corporation, Hewlett Packard, IBM Corporation and Prime Computer also manufacturers of minicomputers.

Fig: Mini Frame Computer Areas of applications Major areas of application of mini frame computers are as follows. i. Process control in industries ii. Engineering and scientific research iii. Time sharing services iv. Front End processor (FEP) for larger computers. 3. Microcomputers A Micro- computer is the smallest in range having very small memory and processing capabilities. It is the Micro- computer that has brought computers into schools, colleges, small businesses and homes. Micro- computer are also known as personal computers. A Microcomputer consists of several components, each containing mechanical and electronic equipments. -There are three basic components of a microcomputer: Input Unit, Central Processing Unit (CPU) and Output Unit. A Microcomputer is a relatively inexpensive computer that is rapidly being used in all application areas. Microcomputers were Introduced in 1970s as a result of the development of microprocessor. A Microprocessor is a semiconductor large scale integrated (LSI) or very large integrated (VLSI) circuits having processing capabilities. Microprocessors are inexpensive and very small in size and thus have reduced the size and weight of microcomputers. Areas of applications Major areas of application of micro-computers are as follows. i. Accounting and financial analysis of small companies ii. Engineering and scientific applications iii. Word processing iv. Computer graphics .

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 5
v. Entertainment (Video-games) vi. Education vii. Household accounts 4. Supercomputers Supercomputers are the largest fastenl and most expensive computers developed in 1980s lo handle complicated problems. These have extract Jinary amounts of computing power required by large organi/-iitio?is. scientific labc.aiories, aerospace centers, larjic industrial units, research laboraioiics. etc. These computers arc used in weather forecasting, aircraft design, and nuclear researches. They are also used in a time-sharing mode in which thousands of users can be attached to the computer system ai the same lime, l:\amples of supercomputers are CRAY-1 and CKAY-? computers and control data fYBl-R 205 supercomputers.

Fig: Super computer Areas of applications Major areas of application of super computers are as follows. i. Weather prediction ii. Crystallographic analysis iii. Design of"complicated machines such as supersonic jets elc. iv. Space research Q8. Modern computers are based on stored program concept. Who introduces the concept? Discuss his/her contribution ir> the history of computers. Answer Iii 1944. John von Neumann added his talents to the HN1AC' team, l:\en befo;v IiNIAC was completed, scientists recoyni/ed its limitations and set out to design a machine that was easier to program, more powerful, and compact al the same time. Von Neumann,developed the concept of storing a program in the computer's memoi-}. called the stored program concept. Before this,.all computers, including Mahaagc's Analytical Engine, stored only the numbers with which they worked. The program tu process these numbers was part of the eircuitr>. Each new program around required that the computer be rewired. Von Neumann's theory converted each program instruction into a numeric code. These codes, which were binary digits, could be stored directly in the computer's memory as if they were data. Von Neumann also recognized the hardware of computer. Rather lhan being a single, powerful unit, was Neumann's computer was broken into components. Each of these components performed a specific tasks and could be called upon repeatedly to perform its function. Von Neumann's theoretical computer had six components, modern computes bear a remarkable resemblance to the basic components found in Von Neumann's computer. The components were: !. An iirithniL'lic unit for basic compulation. 2 .A lniiic unit where decisions and comparisons could be performed. 3 An in/'ii! tk'vit't; designed to accept coded instructions and numeric dala. 4 A iiii'iinin unit for storing instructions and data. 5 A ciiiuntl unit tor interpreting the coded instructions and controlling the flow of U;il;i. 6 An i 'in/nit unit to communicate the results. Vim Neumann's theories, presented in lectures, and papers, were well received. A number of slurcd-program computers were built around Ills design. EOSAC Alter attending von Neumann's lectures at the Moore School, Maurice Wilkes and his associated completed EDSAC (Electronic Delay Storage Automatic Calculator) at C'a in bridge University in England in 1949. This was the first computer to incorporate the storcd-prugram idea. EDSAC used letters as input and converted them to binan digits. In addition, the l:DSAC group created a library of small program that could he used b> me machine when problem solving. KDVAC Vhilc the British were working on EDSAC, von Neumann and Moore School engineers \\ere developing EDVAC (Electronic Delay Variable Automatic Computer). It was a storedprogram machine that used a unique code of zeros and ones developed for il by Von Neumann. EDVAC's hardware directly reflected the distinct components he described. I lie money-making potential of these early computers was not lost on their jiuemoi v Computers quickly moved out of the laboratories and into big business. UNIVACI In 1951. UNIVAC computer was developed. It was delivered to ihe U.S. Census Bureau to assist in compiling the 1950 census data. UNIVAC I, containing only 5000 \acuum tubes, was compact. It was a stored-program machine and revolutionary in its used ol a magneli/ablc tape, similar to audio tape, for input and output. It could read 7200 digits per second. The UNIVAC was the first computer designed and marketed for business computing rather than military-or research use. In 1952. CBS News used ;i UNIVAC I to predict the election ofDwight liisenhower over Adlai Stevenson and ushered the computer age into America's living rooms. IBM 650 In late 1954. IBM began selling a computer designed specifically lor the business community. Like the UNIVAC I. il was a stored-program. vacuum tubes machine. IliM executives expected to produce 50 of Ihese IBM 650"s. Much 10 their surprise, they sold more than 1000. Q9. Briefly name and describe some of the applications of computers. Answer Computer has changed lodav's lifestyle of every person. Here are some area where computers involved. Applications of computer in science Computer is verv useful machine. Computers are used almost in ever; sphere- of life. Computer finds vast applications in tlio field of science and research sucli as in physics, cliemistrv. mathematics, biological sciences, medical science, agriculture science, nuclear In fact today it is impossible to carry out scientific researches \\iihoui computers. It is also applied in the field of computer science itself. Computer manufacturers support extensive basic research in physics, chemistry, mathematics and related sciences. They employ scientists and engineers who conduct applied research to develop better techniques, matciials and equipment for computers, and design and development engineers who work on these ideas into specific products. Computer scientists are engaged in developing software for the users to fulfill their ever-increasing demands. Uses of computers in entertainment and recreation Computers can be found throughout the eniertaimiie-nt induslrv. 1 hev are behind much ol the glit/ and excitement that we encounter every time we turn on the television, attend a professional basketball game, or risk our money in the slot machines of Las Vegas. Computers are used to create the special effects used in television advertisements, the colorful displays on the scoreboards at sports arenas, and the cards that are displa>eil on the spleen if we plav a game of video poker. Computer games are becoming more and more lile like as the computer's capability to portray graphics is constantly improved. Computer games uiii lake IK into the excitement of compel il ion by presenting color images interactnely. fhey can turn present color, animation, sound, and even live video in this interactively. In the motion picture industry, the time required to create animation-has been greatly reduced through the use of computers and special graphics software. The movie industry also uses conijiulers routinely ti.n a variety of special effects and specialized computer programs have e\en m.ide it possibre to eolorize old black and white films. Musicians arc also taking advantage of advances in lechnoiogv b> using conipuicri/cd electronic syiuhusi/.cs to siorc. modify, and access a wide uuiel} of sounds. Special word processing software has been created for scoring music, and other applications give musicians a way to actually cut and paste stored sounds to create compositions. Applications of computers in Libraries I he eonipuler has long been a powerful tool for libraries. providing patrons access to bibliographic information on all of the materials Ihal are available lor their use. Now the giealer storage capacities of (. I)-KOM disks are being used to give library users full-page access to >.udi materials, a-, journals, catalogs, and encyclopedias. Online catalogs provide constantly iipd.iled information about which hooks and their library resources are available and uheliier or not ihey are currently checked out.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 6
Uses of computers in publishing I or many years, publishers received typewritten manuscripts from \snlei* .ind ediidl ilium li\ marking up the mamiscnpt with a red pencil. When il came time to prim llie document. typesetters had to key in the text, potentially introducing new errors, loday. writers work on word processing programs and send their manuscript files lo ihe publisher on disk. l"i save time, they can even transmit them using a modem via email. In some cases document can be formatted using a desktop publishing programs. When master pages are piinted using a high quality laser printer, they can often be send directly to the printer for repioduetion. This is known as camera-ready copy. Many publishers are now allowing writers to create their own camera-ready copy using desktop publishing programs, especially for short run. low e.ost books. Also, as a result of the development of powerful desktop publishing technologies, many individuals and businesses are beginning to do their own publishing rather than sending it out lo a publishing house. Applications of computers in Art and Graphics design I lie powerful capabilities of today's high resolution color graphics hardware and new types of graphics programs are changing the way many artists do their work. The set of software tools that arc piovided \\ith new graphics programs is constantly expanding, giving computer artists new ways to gain control over the design process. Using powerful graphics workstations, graphic designeis can integrate a variety of complex elements into any one presentation. Aplications of computers in product design and manufacturing Computer's that are in the business of manufacturing products have found new ways to use iuiter> in every aspect of product developnieni. Many companies now use computers in ".. L'Miire product development and production process, from the design stage to the i .iiiiiliieliiriiig stage. Computer aided design (CAD) software provides product designers v.iili a vva> not only to develop a representation of the product, bin ,i'so test llie product design in a variety of simulated environments. Q10. What is the difference between low level and high level languages? Answer High level languages High-level languages are more suitable for human use than machine languages and enable the piiwnimmer to write instructions ' asily using l:nglish words and familiar mathematical .s>mho!v ThL'-c symbolic languages are called high-level languages. I'liesc !iigh-level Low level languages Doth die machine and assemble iangi-ages are called low !e\el languages. An assembly language is one step higher than llie machine language in human readability A machine language consists of totally of numbers and is almost Impossible for humans "to read. In an assembly language, some of these numbers are ivpla,c,! b> human readable symbols called language for humans and almost of the same efficiency as machine language for computer operation-.. An assembly language is a combination of mnemonic operation codes and symbolic codes for address. Assembly language is \ery efficient but it remiiies good skilis for programming. A pri'giam written in an assembly language is translated into a machine language before computer can understand and execute ii. A computer program, which iranslates an assembly language program into its equivalent machine language, is called assembler. A program can be written in a mudi shorter lime and much precisely when a high level language is used. A program writicn in a high level language can be executed in any ccmpuler system, which has a compiler fur that programming language. Q11. Discuss some negatives aspects of the use of the Internet in our society? Answer following are sonic negative aspects of the Internet in our society: The Internet is nol regulated; anyone can luue a web page (e.g.. pomog groups) Privacy issues Internet use by kids and predators/cybcrstalkers . Chat room etiquette credibility of information Q12 What is complier and an interpreter? Answer Compiler A compiler is complex svstem software that automatically converts a program written some high-level language into an equivalent low-level machine language I lie i.ompiiier v llie language processor converts the entire program into machine code he tore execution. , piogram written bv a programmer in a language oilier than machine language is called source piogram. The output from a compiler or an assembler, which consists of machine language instructions, is called llie object program. Interpreter An interpielcr is anoihei Ivpe of translator that converts eacli statement ot a program writtc in a high-level language into machine code and execute it before iratv.laling the nc^ statement of the source program. It differs from a compiler that translates the entire soun. program into object program without undergoing its execution. Q13. Write note on the following: a. Visual Basic b. US!' c. C/C++

Answer Visual Basic Developed bv Microsoft Corporation in the early ll)90s. Visual Basic is a Windows based application that assists programmers in developing other event-driven Windows-based applications. The first step in building a Visual Basic application i-to design the graphical user interlace using Visual Basic objects. Visual Basic objecis. or controls, include items such as command buttons, text boxes, and labels. \c\l. vou write an\ code needed tu define the program events. An event in Visiu liasic might he the result ot an action initiated b\ a user. When a user click an object in , Visual Basic application, the application executes the Click event. You define Visual Mask events using code statements written in Visual Basic's own programming language. I Ins language is verv similar lo UASIC and easy to learn and use. Once yon have completed t sieps. you can generate and tesl the final applications. Beginning programmers can create professional Windows-based applications using Visual llasie because the program is easy lo use.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 7
Chap 2
Computer Hardware And Software
Q1. What is the difference between computer hardware and software? Answer A computer system has two major divisions known as: 1. Computer hardware 2. Computer software. 1. Computer Hardware The hardware part of a computer system consists of physical components installed in a-mattiji computer box and all associated equipments interconnected in an organized \va>. Main uni| which consists of a processing and control console in additions to disk drives is called system unit. The peripheral devices such as keyboard, mouse, optical character (OCR);I magnetic ink character reader (MICR) monitor, printer, etc. are linked with system unitJ Devices send and retrieve information from the system unit. A computer system consists o| three major units: 1. System unit 2. Input unit 3. Output unit

Fig: Computer Hardware 2. Computer Software The techniques or methods which consist of the computer programs procedures and the papei work necessary to get the hardware to work is known as computer software. Computes software is the knowrhow techniques in the form of a set of instructions that tells tftjj computer what to do. It includes an operating system which develops a link between the use and the computer system. It helps the user to communicate with the computer. Compute software can further be divided into system software and application software. 1. System Software A set of program required to implement certain functions in the computing system designed to control the operation of a computer. E.g. Operating system, language translators. 2. Application Software Application software is the procedure written by the user to solve particular problem or to achieve specific results. E.g. Payroll System, Inventory Control system. Q2. Write short notes on the following: a. Central Processing Unit b. Arithmetic and Logic Unit c. Control Unit Answer Central Processing Unit . The CPU is like brain of the computer. In a human body all major decision are taken by the BRAIN and other parts of the body function as directed by the brain. Similarly in computer CPU control aiid supervise all the units in a computer. It take information from the input unit and from the memory and use it according to the instruction already given to the computer. CPU activating and controlling the operation of other units of a computer system. The CPU has two main units Arithmetic And Logic Unit, and Control Unit. Arithmetic and Logic Unit Hie function of this unit is to perform arithmetic and logic operations, arithmetic operations nui\ include addition, subtraction, multiplications and division of numbers. Logic operations are concerned with relational and Boolean operation on data. Relational operation may be comparing two numbers to see if one is larger than the other one, if they are equal. Further it is desired to base some decision. On logic quantities, the same logical quantities, then some operation (AND, OR, NOT) are also implement in ALU. Control Unit Control unit monitors and co-ordinates all the activities of a computer system. It directs other parts of computer to do so: This unit is responsible for initiating some of the operations. In other words it controls the flow of data inside the computer. The 3 major functions qf control unit can be highlight for one machine instruction. They are 1. Fetching 2. Decoding 3. 'Executing Q3. What is Bus System? Differentiate between data bus, address bus, and control bus? Answer Computer Bus In computer, the term bus refers that paths between the components, actually bus is a group of a wire. The bus is the common path way through which the processor send/receive data iind commands to/from primary and secondary storage and all can transport 8 bits ;ii a time whereas a bus with 16 lines can transport 16 bits al a time. There are two main buses in a computer: 1. Data bus 2. Address bus Data Bus The daia bus is an electrical path ihat connects ihe central processing unit (CPU) memon,. and the oilier hardware devices on llie motherboard. Actually, (he bus is a group of parallel wires. The number of wires in t'ie bus affects, the speed at which data can travel between components, just as the number of lanes on a highway effects how long it takes people to get to their destinations. Because each wire can transfer one bit at a time, an eight-wire mis can IIH ve eight bits at a time. A 16-bit bus ean transfer two bytes and a _>2-bit bus can ir.nisfei four b\ics al a time. Address Bus The second bus that is found in e\ery microcomputer is the address bus. The address bus i-, a set of wires similar to the daia bus. but is connects only the CPU and memory, and all it carries are memon addresses. The reason thai the address bus is important is Ihat the number of lines in it determines the imxinmri number of memory address. Kor example, one byie of data is enough lo represent _'' - 2^6 different values. If the address bus could carry only eight bits at a time, the CPU could address only 256 bytes of memory. Most of the earl; PCs had 20 bil address bus. so Hie CPU could address onl>2:" bytes or 1 MB ofdata. The Control Bus

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 8
directs the aUi\jlies of .ill other units. The control unit sends out control commands lo all liie components oi'lhe system through the bus called the cor.irol bus. The control unit directs the transfer ofdata to 'he All' from the internal memory unit for the actual processing \\nhin I lie. AI.U. Under ihe control of conlrol unit, a iwo ways transfer ofdata results and the in-,lrucijons occur eluecii the internal memon, and Ihe secondary memory. Q4. Differentiate between system software and application software? Answer System software A set of programme required to implement certain functions in ihe computing s\sicm designed to control the operation of a computer system defines the \\stem -.oftwaie. I hese programs are essential for a computer to function. Without these programs no intera.iuui is possible with computers. Usually system software is provided K the manufacturers of the computer devices, li.g. device drivers, operating system. Application software Application software is the procedure written by the user to >ol\e pailiculai pioblem ! :<' ;iclne\e specific results. Ready packages containing applications sortwarc's are also av n'l.ihle easily for various purposes. These have specific applications for tlie users who are not familiar with any programming language or do not have the time to write their own program. These programs are developed by the users themselves to solves (heir problems, e.g. Payroll system, huentory control system. Q5. Write a note on main memory and secondary memory? Also give examples. Answer Computer Main Memory Main memory i> Hie computer's primary storage. It is an extension of the central processing unii ((.'PI') ;nid is directly accessible 10 it. Its function is controlled by control unit (CU), which sends read or \vrite signals for the appropriate memory location. Main memory accepts Jaia and instructions from the input unit, exchanges dala with and supplies instructions to oilier parts of llie central processing unit (CPU). This memory unit also stores those inunctions ;m<J data awaiting immediate execution. Its capacity nlusi be sufficient to retain both ihe usable amount of data and instructions needed for processing it. Some operations require more instructions or data than can be held in main memory at one time. In such cases, main memory is supplement with secondary storage. The capacity of a storage device is expressed as number of hues, characters or bits. One byte is a group of eight bits that forms one character. A hit is a binary number used in digit.il computers, which stands for binary digit? One bit contains the minimum information ami is a basic unit that has \alue of 0 or I. Thus if the memory of a computer is 32000 bytes, it means that it can store 32000 characters. Semiconductor storage and magnetic cores are the mos! widely used forms of main sunage. lies ides reduced size and increased speed, semiconductor storage offers the ;id\ amage of non-destructive read. There are various storage types available, which include KAM. KOM, PROM. lil'KOM and IIAROM. The most common kind of semiconductor .image is KAM and ROM. Secondary Memory Secondary storage or secondary memory also referred as backing storage is used to supplement the capacity of main storage. This memory stores a bulk of information. It is also called auxiliary sioiage or mass storage. The information stored in this memory is used by the C'Pl' by ("list bringing it to main memory. Example;, of secondary memory are magnetic disks, magnetic lape and mass cartridge systems. Q6. What are the different kinds of input devices? Answer Main different type of input devices are used uilh computer some of them are keyboard, mouse, joystick, and scanner. Kt) hoard Keyboard is an input de\icc. It is similar to a typewriter. A keyboard is made up of a set of keys for typing, liaeh key has a letter, number, word, punctuation mark, or symbol on it. When you press on the keys, you give the computer input. For example, some keys input letters. A keyboard has approximately 101 to 105 keys. They are letter keys, number ke\ movement keys and special keys. The main layout of a keyboard has letter keys and speci keys.

fig: Keyboard Mouse The mouse is a pointing device that you hold and move by hand. Look at the diagram belo1 On the underside of the mouse is a small ball. As you move the mouse on a flat surface, sin as a desk, table, or soft pad, the ball rolls. This movement sends information through tl mouse cable to your computer. The information makes a mouse pointer move across yo computer screen. You move the mouse in order to place the pointer where you want it on tl screen.

Fig: Mouse . Joystick Another input device is a joystick. A joystick is a tool with a lever and some button Joysticks are most often used to control computer games:

Fig: Joystick Scanner A scanner is used to input a picture of something, such as a photo or newspaper article. A scanner works like a copy machine, but instead of printing a copy, it sends the copy to a computer screen or a file. Normally scanners come in two types: handheld scanner . flatbed scanner

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 9
Fig: Scanner Q7. Define magnetic disk? Answer Two types of magnetic disks: floppy disk arid hard disk are common for data storage: Floppy Disk . The most com'.tan type of storage is a floppy disk. A floppy drive stores information on floppy disks. A floppy disks is a round piece of plastic. To protect the disk, it is kept inside a square jacket. Information is stored by the magnetic materials on the plastic. A disk is called floppy "floppy" because inside the case is a thin, circular plastic sheet. A floppy disk is a good way to store small files or documents you have written. Floppy disks are commonly used for transferring data from one computer to another. This lets you give data to friends and class fellows.

Fig: Floppy Drive Hard Disk Storing information.in a computer means placing it on the hard disk inside your computer. The hard disk is sealed inside the hard drive to protect it from dust. The hard disk is the main place where a computer stores information. A hard disk is generally non-removeable. Because it stays inside the computer. .It is called a fixed disk. It is the main place where you store information. Your hard disk stores or saves programs and files. The hard drive magnetically stores data on a stack of rotating disks, called palters. A hard drive has severalread/write heads that read and record data ort the disks. Q8. Explain Random Access Memory? Answer Random Access Memory (RAM) When you think of RAM memory, think about a classroom chalkboard. The board is used during every class, then erased at the end of class, ready for the next class. That is just how RAM works.

Fig: Random Access Memory (RAM) R/\M or random-access memory, is a temporary area in the memory where niation is stored. It i., also called main memory where information is kepi while the CPU n .jobs. For example, when you write a report, information about the document is sent io M if you shutdown the computer, all the information in RAM can be lost. This is why we - secondary slorage devices like yo.ir computer's hard disk and floppy diskettes. Q9. Fill in the blanks: I. The process of perform ing arithmetic and logic operations with the help of computer is known as _______. 2. Physical parts of the computer system that >ou can touch and feel ; 3. Most important part of the computer hardware is ihe _______. 4. An _______ is a set of program that gives the necessary instructions to the computer, telling it how to operate ". ilh the hardware, other software and the user. 5 The _.______ and ___ __ unit contains the electronic circuitry that executes all arithmetic and logical operations. 6. The devices are connected together by a communications channel called a _______. 7. CPU is called the _______ of the computer 8. _______ is volatile memory. 9. Magnetic Tape is a _______ device. 10. USD stands for____________ Answers No Answer lElectronic Data Processing (EDP) 2. computer hardware 3. Central Processing Unit (CPU) 4. Operating Svstcrn (OS) ' 5. . Arithmetic. Logic 6. Bus 7 Brain 8. RAM 9. . storage 10. Bus Universal Serial Q10. True or False: 1. A computer is a device that accepts information in the form of data and manipulates] for some result based on a sequence of instructions. 2. An RAM is a set of programs that gives the necessary instructions to the computjj telling it how to operate with the hardware, other software and the user. 3. The Central Processing Unit (CPU) is generally referred to as the brain of i| computer. 4. Data bus is an electrical path that connects the Central Processing Unit (CPl| memory, input/output devices and secondary storage devices. 5. Main Memory is sometimes called as secondary memory. 6. The memories, which do not loose their contents of failure of power supply, are kno\\| as non-volatile memories. 7. A serial port allows a serial hardware devices to communicate with the computer b transmitting one bit of information at a time. 8. Address bus connects CPU, RAM and other I/O devices. 9. Registers are high speed memory locations inside CPU. 10. Instructions in ROM are used in booting process. Answers No. Ans' No. Ans No. Ans' No. Ans No. Ans 1. T 2 T 3. T 4. T 5. F

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 10
6. T 7. T 8. F 9. T 10. T Q11. Choose the correct answer: 1. Which of (he following devices is not inside the CPU. a. Random Access Memory (RAM) b. Monitor c. The Hard Disk d. CD-ROM Drives e. The Modem 2. Which of the following is a part of the computer system? a. Central Processing Unit (CPU) b. Memory c. Input/Output Units d. All of the above e. None of the above 3. The arithmetic/logic unit can perform: a. Addition b. Subtraction c. Multiplication d. All of the above e. None of the above ' 4. The bus is used to connect the following unit. a. b. c. d. e. 5. b. c. d. e, Central Processing Unit (CPU) Main Memory (RAM, ROM) Input/Output Devices All of the above None of the above Which of the following is not a type of bus in computer. a. Data Bus Address Bus Power Bus Control Bus . . All of the above . No. 2. Ans d No. 3. Ans d No Ans 4 d No 5. Ans c.

Answers No. Ans 1. b

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 11
Chapter 3 Input Output Devices
Q1. Name the different categories of input devices. Answer Input is of two types l-Data or basic information 2- Algorithm to manipulate this data to get-the required results. The devices used to feed instruction and algorithm into a computer are called input devices. Following are the commonly used list of input devices and their functions. I. Keyboard 2. Pointing device a. Mouse b. Trackball c. Light pen d. Joystick 3. Card reader 4. Paper tape reader 5. Scanner 1. Keyboard It is like typewriter but with several extra keys for specific purpose. We can divide the keyboard in the following parts.

Fig: Keyboard i. Standard Alphanumeric Keys They are similar to a standard type writer and for the input of general information. ii. Numeric Keyboard These keys are used to input numeric data only. These keys can also be used as an alternative screen navigation and editing keys. iii. Screen Navigation Keys These are providing to move curser around in th screen. iv. Functions Keys These keys are. used to perform specific functions 2. Pointing Device i. Mouse It is used to control the motion of.a pointer on the computer Screen. It has 2 or 3 buttons and connected to the computer.

Fig: Mouse ii. Track Ball A track ball consists of a sphere resting on roller with only the top of the sphere exposed outside its case. It works like mouse, it requires less desk space when in operation. Tlje cursor moves in what ever direction the user spins the sphere iii. Light Pen It can detect the photo-electric cell mounted at its front end. It eliminates the need to type the input. For example on moving the pen across a bar code, it can directly feed the data into the computer. iv. Joy stick It has buttons which can be used for carrying out actions. It is useful in computer games. Infect function of joy stick and mouse is similar. It allows faster interaction needed in games where as, the mouse is used mostly in office environment for windows and icons,. 3. Card Reader .It is an electromechanical device that sense holes in cards and produce electronically signals. It read punch card. 5. Paper Tape Reader It works like card reader paper tape is a strip of paper of indefinite length usually one inch wide. Paper tape is subject to vary and is more awkward to handle than the punch card. It is relatively low cost. 6. Scanner It read information via glass platform provided on it. It sends information to the computer. It is primary device when it comes to interfacing a PC with the world of pictures 6.(a) Magnetic Ink Character Recognition It is used by banking industry for the processing of checks. The entire banking communit) follows a single font standard, consisting of 14 characters. Specialized equipment is used in . (he industry to encode, decode, sort and process checks. 6.(b) Optical Character Recognition It refers to a variety of technologies that use special character and codes thai are recognized by optical and grocery industry. In optical character recognition, optical code or bar code is popular. Other name of bar code is universal product code. These are found on super market and many other retail products. Q2. What is the keyboard? Name the different key categories on the keyboard? Answer Keyboard is an input device. It is similar to a typewriter. A keyboard is made up of a set o keys for typing. Each key has a letter, number, word, punctuation mark, or symbol on il When you press on the keys, you give the computer input. For example, some keys inpui letters. A keyboard has approximately 101 to 105 keys. They are letter keys, number keys. movement keys and1 special keys. The main layout of a keyboard has letter keys and specia keys. The keys on computer keyboard are often classified as follows: f Alphanumeric keys: Alphabets and numbers f Number keys: Numbers and mathematical operators 'f Functions keys: Keys for special functions (Fl. F3, F3 ......... F12)

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 12
Cursor Control keys: Keys that move.the cursor (Up, Down, Left. Right)

Fig: Different Keys on Typical Keyboard Q3. Name five important keys on a keyboard along with their functions. Answer The following, explains what some of the important keys do: Alphanumeric Keys These keys are used to enter alphabets, numbers and other special characters into the computer. The keys position is similar to that of a typical typewriter. The keys are used to input the following: These consist of keys A to Z having both upper case and lower case letters. The arrangement of alphabets on keyboard is as shown in figure below. This arrangement is known as QWl-RTY layout.

Fig : Alphabets Layout on keyboard (QWERTY LA YOUT) Numbers Keys This consists of number keys starting from 0 to 9. Special Character Key's This consists of punctuation keys, special characters, and space bar. Numeric Keys These keys are used to input numbers into the computer. This layout of tlies* keys is similar to that of a typewriter. Along with the number keys it also contains keys for mathematical operations i.e. plus, minus, multiply, divide. Function Keys Functions keys are used to perform different functions depending upon the application or program that is executing. These keys provide shortcuts for doing routine tasks on a computer. Mosl computer keyboards have a row of Functions at the top of the keyboard. Theie keys are marked from Fl to FI2. Many program, including most of Microsoft's products. support use of the functions keys. The functions keys are frequently used in combination wilh other keys such as CTRL key, the ALT key, and the SHIFT key. This results in a large number of possible keyboard shortcuts. Cursor Control Keys Cursor is used represent the position where the keyboard's input will be placed. I hcse four arrow keys are used for moving the cursor from its current position to right, left, up. or down. Moving these cursor keys does not change or delete any characters on the screen. These are also used for screen navigation. The function of some of the other important keys is given below: Enler key Lscd lo enter commands or to move the cursor to llie beginning of the next line. Tin-sometimes labeled as Return instead of Enter. Esc key Short for llscape. this key is used to send special codes to devices and to exit lor escape) trr program and tasks. Delete Key Deletes llie character at the current cursor position and the one at riglil of the cursor niisitk Also used to delete the selected object, but it does not move the cursor. Caps Lock Key A toggle kc\ that, when activated, causes all alphabets characters to he uppercase Fnd Key Moves the cursor to the end of llie line, the end of the page, or the end of the file- depend::. where the cursor is located on the page and on which program is running. Ctrl Key Short for Control, this key is used in combination with other keys to produce spa1:. characters. The meaning of each control character depends on which program is runnimi All Key Sluirt for Alternate, this kej is used in combination with other keys to produce s|w, characters. lab This key enables the cursor to jump a couple of spaces lo the right on the screen. To jumpi cqui\alcnt spaces to the left. Shift-Tab keys should be presses together. Backspace Key Deletes the character present a! the left of the cursor and moves the cursor to that position Page Up and Page Down This is used to move the cursor up or down a certain fixed number of lines iisualK one pj. at a time. This is often abbreviated as 1'gbp and PgDn. Home Moves the cursor to the left corner of the line or to the beginning of the page 01 :' depending where the cursor is and on which program is running. Insert In Insert mode, all characters typed are placed at the cursor position (or to the righi of:. insertion point). With each new insertion, characters to the right of the cursor are pushed the right of the insertion point lo make room for the new characters. If insert mode is tinr. off. ijpiii" then overwrites existing characters instead of inserting the new ones be-fore Ik-, ones'This is often called overwrite mode. Most PC keyboards have an INSl-RT key ihail. \oi. .iwilch back .nut forth between insert und overwrite mode. Space Bar This key moves the cursor one spai right every lime you press ihe key.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 13
Q4. What is voice recognition software? Explain. A voice recognition system compares a person's live speech to their stored voice paticrn. Larger organizations sometimes use voice verification systems as time and attendance devices. Many companies also use tliis technology for access to sensitive tiles and networks. Some financial services use voice verification systems to secure telephone-banking transactions. These systems use speaker dependent voice recognition software. This type of software requires the computer to make a profile of your voice.-That is, you train the computer to recognize your inflection patterns. Q5. Define scanners. An optical scanner, usually called a scanner, is a light-sensing input device that reads printed text and graphics and then translates the results into a form the computer can use. One of the more popular types of scanners is a flatbed scanner. A flatbed scanner works similarly to a copy machine except it creates a file of the document in memory instead of a paper copy. Once an object is scanned, you can display it on the screen, store it on a storage medium, print it. fax it, attach it to an e-mail message, include it in another document, or post it to a Web site or photo community for everyone to see. For example, you can scan a picture and then include llie picture when creating a brochure.

Fig: Flatbed Scanner Ihree other types of scanners are pen. sheet-fed, and drum. The quality of scanner is measured by the number of bits it stores in a dot and Ihe number of dots per inch, or resolution. The higher each number, the better quality, but the more expensive the scanner. Most of today's affordable color desktop scanners for the home or small business range from 30 to 48 bit and have an optical resolution ranging from 600 to 3,000 dpi. Commercial scanners designed for power users range from 4,000 to 12,500 dpi. Many scanners also include OCR (optical character recognition) software. OCR software can read and convert many types of text documents. Suppose you need to modify a business report, but do not have the original work processing fife. You could scan the document with a flatbed scanner, but you still would not be able to edit the report. The scanner, which does not differentiate between text and graphics, saves the report as an image. To convert the image into a text file that can be edited, you use .OCR software that works with the scanner. You will be able to edit the resulting text file in a word processing program. The OCR software typically places any graphics in the scanned image into a separate graphics file. Q6. What is monitor? Differentiate between monochrome and color monitors. Answer A monitor is an output device that allows you to view the function's and programs a computer processes on a screen. The monitor is the screen part of the computer. When ybu press any key in letters on the keyboard, you will see them on the monitor. This is called outputting information. The monitor displays text, numbers, photos, and animation. A connects the monitor to the video card. A video card is a circuit board that fits inside the computer. It allows both text and images to be shown on the screen. The first monitors invented were monochrome monitors. They were to show only black-and-white images. But these days, monitors are more commonly in full'colour, they can show all the colours of the rainbow.

Fig: Monitor Q7. Define: a. CRT Monitor b. Flat Panel Monitor Answer There are two types of monitors: > CRT Monitor ' > LCD Monitor CRT Monitor The CRT monitor are a lot like television set, using the same CRT or Cathode Ray.Tube technology. The CRT monitor has two major parts; the screen and the cathode ray tube (CRT). The screen is the front of the monitor and CRT is fitted inside the monitor. LCD or Flat Panel Monitor Another monitor type is LCD or Liquid Crystal Display. LCD monitors are a lot like CRT monitors without the bulkiness but they do not have CRT. LCD monitors use a flat, lightweight surface filled with millions of tiny glass bubbles, each habing a phosphoric covering. These phosphoric coverings glow to create an image. LCD screens provide clarity and tlicker-free viewing. Q8. Write a note on different kind of printers. .Answer A printer is a device that produces hardcopy on the paper. Printers are commonly used in . business to get the documents printed on paper. Depending upon the printing mechanism used, printers fall into two categories i.e. > Impact printers >Non impact printers Impact Printers An impact printer produces images by striking an inked ribbon with a hammer or a set of pins, pressing ink from the ribbon onto a piece of a paper. Impact printers are the oldest print technologies which are still in production. Some of the largest printer companies continue to manufacture, sell, and support impact printers. Impact printers are most useful in specialized environments where low-cost printing is required. The three most common forms of impact printers are: >-Dort-matrix Printer > Daisy-Wheel Printer >Line Printer i. Dot-Matrix Printer It produces characters by striking pins against an ink ribbon to print closely spaced dots in the appropriate shape. The shape forms a number, alphabet or oilier special characters. Dot-mafrix primers are relatively expensive and d not produce high quality output; however, they can print multiple copies of a page at a trim

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 14

Fig: Dot Matrix Printer

Fig: Daisy Wheel Printer

ii. Daisy-wheel Printer It lias characters defied at iho outer edge of a pedaled wheel (hence tlie name daisy wheel) which forms characters in the same way as a typewriter. Daisy-wheel printers are loud and slow. They cannot prim graphics, and cannot change fonts unless the print wheel is physical!) replaced. Wilh the advent of laser primers, daisy-wheel printers are generally not used in modern computing, environments. iii. Line Printer It is somewhat similar to the dais\-wheel is the line printer. Line printers ihat allow multiple characters to be simultaneously printed on the same lin speeds ranging from 300 LI'M (lines per minute) to 2400 LPM. Bcause of (he nature of the print mechanism, line printers are much faster than dot-matrix or dais)-wheel printers; however. the\ tend lo be quite loud, have limited font capability, and often produce lower print quality than recent printing technologies. Ik-cause line printers are used for their speed, they use special paper with pre-punched holes along each side, This arrangements helps tci continue printing at lugh speed till the paper runs

Fig: Line Printer Non-Impact Printer A non-impact printer produces images on paper without striking the page in any way. There are several types of non-impact primers called thermol and electrostatic printers. These printers use a chemically coaled paper on which the characters are exposed by some mean sucli as a laser. This means that these printers can produce a printed image without striking the paper. Because the printing device is simple and lias no mobbing parts, these printers are inexpensive to manufacture and silent. Very last non-impact printers are capable of printing nioif than 24 pages per minute. Different kinds of kon-impact printers re explained below. i. Laser printer These primers use laser (Light Amplified by Stimulated Emission of Radiation) a special beam of light to Iranster images by means of microscopic dots .cheep laser used 300 to 600 dots per inches (DPI) while midrange printers will print 300-1200 DPI. High laser end prints 6 00-2000 DPI at incredible fast speed i-e 30-300 pages per minutes.

Fig: Laser Printer ii. InkJet printer ll is relatively new invention. It prims b\ shooting very liny drops of ink on the paper to fori character. I lie) can print at speed from per minute to 6 pages per minute.

Fig: InkJet Printer

Plotter Different Types Of Plotter


Q9. What is plotter? Answer Plotter Plotter is a special output device which is used to produce high quality, perfectly proportional hard copy output. Plotters are designed to produce large drawings or images such as construction plans for buildings or blue prints for mechanical devices. Plotters have been used in automotive and aircraft Resign, topological surveys, architectural layouts and other similar complex drafting jobs. A plotter is composed of a pen, a moveable carriage, a drum and a holder for chart paper. Both the pen and llie paper can move up and down and back and forth. This permits very detailed drawings. Some plotter having coloured pens can make coloured drawings also.

Fig: Plotter Types of plotters There are two types of plotters, which are as follows a. Drum plotter b.Flatbed plotter

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 15
i. Drum Plotter On the drum plotter, the pens and the drum move concurrently in different axes to produce the image. Drum plotiers are used to produce continuous output, such as plotting earthquake activity, or for long graphic output, such as structural view of a skyscraper. ii. Flatbed Plotter The printing mechanism of flatbed plotters consists of two arms and a rectangular flatbed. I-lathed plotiers use two arms, each of which holds a set of colored ink pens. The two arms operate at right angle as they draw on a stationery piece of paper, l-'lalbed plotters are very slow and even can lake hours to print a complicated drawing. iii. Electrostatic Plotter Llectrostatic Plotter draws on negatively charged paper with positively charged toner. As a rule, plotters are more expensive than printers. They are most frequently use for CAE (Computer-Aided Engineering) applications, such as CAD (Computer-Aided Design) and CAM (Computer-Aided Manufacturing). Q10. What is the difference between soft copy and hard copy? Answer Any output which produces on paper is called hard copy and in contrast any output produces on storage devices is called soft copy. Q11. Fill in the blanks. 1. A _______ is the most commonly used input device that enables you to enter data into a computer. 2. _______ keys are used to enter alphabets, numbers and other special characters into the computer. 3. _______ keys are used to enter numbers into the computer. 4. _______ is an optical disc used lot storing digital data. used to store large quantities of data inexpensively and therefore are often used for baekup. 6. QWERTY is a____________ 7. Color monitor uses colored picture._______________._____________and____________colors to display a colored picture 8. Scanner is a(n) ___________________ 9. LASER stands for _____________________ 10. CD can store more than __________data Answer I. Keyboard2. alphanumeric kevs 3. numeric kevs 4. CD-ROM 5. matiiieiie tape 6. keyboard layout .7. red. green, blue 8. Input 9 light amplification by stimulated ' emission of radiations 10. 700 MB Q12. True or Flase. 1. Mouse device allows the user to controls the movement of cursor or pointer on a display screen. 2. Joystick is an input device used for games, computers aided design or flight simulators. 3. A scanner is an input device which is capable of reading the image present on a piece of paper and transferring the information into a computer where program can store and interpret it. 4. Trackball is an input device. 5. Monochrome monitors can display all the colors. 6. Touch screen is an input as \vell as output device. ?. Hard disk is LI sequential .access lo drive. 8. Magnetic tapo is normally used 10 take backup of data. 9. Impact printers don not touch the surface of paper during prim. 10. Mouse is the primary input device.

Q13. Choose the correct answer. 1. Which of (he following is not an input device. a Magnetic tape units b. Floppy disk drive units c. Monitor d. Keyboard e. Mouse 2. The keys on computer keyboards arc often classified us follows: a. Alphanumeric keys h- Numeric keys c. Function keys d. Cursor control keys e. All of the above 3. Which printer uses laser beams to burn special ink called IOIILT on the pajjc to create a permanent character. a. Dot matrix b. Daisy wheel c. Laser d. Ink Jet e. Plotter 4. Flat panel displays arc usualh used in j. Supercomputer b. Personal computers c. Portable computers / Laptops d. All of the above e. None of the above 5. Hard disk is a________________disk that stores data a. Optical b. Magnetic c. Random Access d. Read Only e. None of the .above Answers No. Ans No. I. C T Ans No.. Ans No. E 3. C . 4. .Ans No. C 5. Ans B

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 16
Chapter 4 Storage Devices
Q1. Describe in detail the purpose and working of the main memory. You can think about the memory on the motherboard as short term. This type of memory is called random access memory, or RAM. You may have heard someone ask, "How much memory is in your computer?" Most likely they are asking how much RAM is in your computer. Data, information, and program instructions are stored temporarily on a RAM chipira set of RAM chips. See Figure.

fig: Random Access Memory (RAM) When the compuier is turned off or if there is a loss of power, whatever is stored in the RAM memory chips disappears. Therefore, it is considered volatile. The computer can read front iiud write 10 this type of memory. RAM is also referred to as main memory and primary memory. To belter understand how RAM works and how the computer process data, think about how you would use a word-processing program to create an address list of your family and friends. Firsl, you start your word-processing program. The computer then loads your word-processing program instructions into RAM. You would input the names, addresses, and telephone numbers (your data). Your data is also stored in RAM. Next you would give your word-processing program a command to process your data by arranging ii in a special formal, I his command and your processed data, or information, is also now stored in RAM. You would then click the Prim button. Instructions to print are transmitted to RAM and your document is sent to your printer. Then, you click the Save button. Instructions to provide you with an opportunity to name and save your file are loaded into RAM. Once you save your file. \ou exit your word-processing program and turn off the computer. All instructions, data, ;ind information are erased from RAM, RAM is usually built by using two different technologies i.e. DRAM (Dynamic RAM) and SKAM (Static RAM). [)RAM is the most commonly used technology lo build RAM chips and consumes ;i lot of power as dala stored in a DRAM needs to be refreshed periodically. SRAM is faster lhaii the DRAM but it more expensive. Unlike DRAM, the contents of SRAM do not need to be refreshed periodically. In most computers SRAM technology is used to buiiJ very fas! memory inside a CPU chip. This memory is known as ihe cache memory. Cache memory usually is very small in size as compared to Ihe total inemorj in the computer but it increases the performance of computer. Tim memory arrangement is shown in the figure below.

Fig: Memory Management Q2. Describe in detail the purpose and working of the following secondary storage devices. a. Floppy Disk b. Hard Disk Answer Floppy Disk A floppy disk, or diskette, is a portable, inexpensive storage medium that consists of a thin, circular, flexible plastic disk with a magne''1. coaling enclosed in a square-shaped plastic shell fl:igure 17-1). In the early 1970s. IBM introduced the floppy disk as a new type of storage. These 8-inch wide disks were known as floppies because they had llexible plastic covers. The next generation of floppies looked much the same, but they were only 5.25-inches wide. Today, the standard floppy disk is 3.5-inches wide and has a rigid plastic outer cover. Although the exterior of the 3.5-inch disk is not floppy, u^.", slill refer to them as floppy disks. A (loppy disk is a portable storage medium. When discussing a storage medium, the term portable means you can remove the medium from one computer and carry it to another computer. For example, most personal computers have a floppy disk drive, in which you insert and remove a floppy disk. Hard Disk When personal computers wore introduced, software programs and iheir related files lit e.-mi ,i single floppy disk. Wilh these programs. you simply inserted the disk lo ur-c program. Mnoughoui time, software became more complex and included graphical lei faces and multimedia. Users no longer could run programs from a floppj disk. liisic. e> installed the program, which consumed many floppy disks, onto ilv hard disk II, sks piu\ide I'ar greater storage capacities and much Taster access limes than floppy disk hard disk, also called a hard disk.drive, consists of several inflexible, circular platters n ires items electronically. Made of aluminum, glass, or ceramic, a platier is coated uni alerial that allow items lo be recorded magnetically 911 its surface. "I lie plalters along \\ .- lead/uritc heads, and the mechanism for rno\ing the heads across the surface of ihe :, .k. are enclosed in an airtight, sealed case lo protect them from pollution. Must desktop personal computers contain at least one hard disk. The hard disk inside i s\s!em unit, sometimes called a fixed disk, is not portable. t ui'rcnt personal computer hard disks can store from 10 to 20UGI1 of da iusii unions, and information. Like flopp> disks, these h.irJ disks store d> iii.ii:iielit.all\ I lard disks also arc read/write storage media That is, \ou can both re I Kini -ind urite on a liard disk any number of times.

fig: Hard Disk Q3. Describe in detail the purpose and working of the following backing storage devices. . a. Compact Disk b. Magnetic Tape Magnetic Tape Magnetic tape is a flexible M\ lar plastic tape, coated on one side with magnetic material. It is widely used when large amount daia are to be process sequentially .An advantage of magnetic tape is thai, it is \ery cheep and economical storage medium. Its major disad\antagc is (hat. it is very slow and ii is only sequential. Q4, Explain, using a labeled diagram, the concept of track and sector when describing magnetic disk storage. Answer Magnetic Disk Storage Modern streaming tape systems divide a tape into segments, each of which magnetically marked by a when we formal the disk. Each of these scymails contains several tracks that run parallel to one another lengthwise on the tape this is shown il figure below. The first eight bits are used to save dala and the last track is used U> store parity bit. This bit

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 17
is used to detect any errors in the dala stores on the l;ipe. If this bit is set lo 1 or zero so that the total number of Is in the frame is even. Tli .method of detecting error is called even parity. We can similarly define odd panu The inter block gaps are needed so that the tape can stop without skipping any data and can be accelerated before reading data.

Fig: Data organization on magnetic tape Data stored on magnetic tape can be accessed onh sequentially This is the main disadvantage of streaming tape systems because moving between different positions on u tape can be very time-consuming. Thus tape systems have much longer data access lime than disk systems in which different sectors can be accessed by shun movements of the read / write head. The tape systems are not popular for on-line dai,i storage. On the other hand these tape devices are very cheap as compared to the magnetic disks a large volumes of data can be stored on the tape for backup purpose* so these are used mainly in off-line, backup storage applications. Q 5: Explain the purpose of the following and draw a diagram showing their relationship, a. Cache memory b. Hard disk c. Magnetic tape Answer Cache Memory Cache memory programs and data are loaded to RAM from secondary storage because iL time required lo access a program instructions or piece of datum fro RAM is significant!) Ics-llian from secondary storage. Thousands of instructions or pieces of data can be access^: from RAM in the time it \\ould take to access a single piece of datum from disk -stora^ RAM is essentially a high-speed holding area for data and programs. In i'act nothing reail;. happens in a computer system until the program instructions and data are moved from RAM tu the processor. This transfer of instructions and data to the processor can he tun; consuming, even at microsecond speeds. To facilitate an even faster transfer of instruction* and data lo Ihe processor, some computers are designed with cache memory. Cache nieiiun is used by computer designers lo increase computer system throughput. Throughput refers i> the rale at which work can be performed by a computer system. Like RAM, cache is a high speed holding area for program instructions and dau However, cache memory uses a technology that is about 10 limes faster than RAM and a tun.: 100 times more expensive. With only a fraction of the capacity of RAM, cache memory hold* only those instructions and data that are likely to be needed next by the processor. Hard Disk Hie increasing complexity of the software requires additional storage space. The user must switch floppies in and out as needed by the software packages. To meet this growing need for large secondary storage, the hard disks are developed. Hard disks or fixed disks, also called Winchester, are permanently installed or fixed within the system unit. All fixed disks rigid are usually made of aluminum with a surface coaling of easily magnetized elements, such as iron, cobalt. A fixed disk or hard disk is a high speed, large capacity disk and is referred as a mass storage magnetic medium that provides computer systems with the ability to read or retrieve large amount of information sequentially or randomly under the direction of a controller board. A hard disk contains several disk plotters slacked on a rotating spindle. Data are stored on all recording surfaces. For a disk with four platters, there are eight recording surfaces on which data can be stored. The disks spin continuously at a high speed (from 3600 rpm to 6000 rpm) with in u sealed enclosure. The enclosure keeps the disk face surface free from contaminations, such as dust and cigarette smoke. This contamination free environment allows hard disks to have greater density of data storage than the interchangeable disks. Magnetic Tape Magnetic tape is a flexible Mylar plastic tape, coaled on one side with magnetic material. It is widely used when large amount daia are to be process sequentially .An advantage of magnetic tape is that, it is very cheep and economical storage medium. Its major disadvantage is that, it is very slow and it is only sequential. Q6. Explain why secondary memory is needed in computer system. Answer Primary memory is directly accessible to the processor and is used to store data and programs that are in current use. The control unit docs not have direct access to data that is stored anywhere outside the processor or main memory. I lowever, this storage is limited in size and volatile. We nee some storage device that is not temporary in nature and that does not have the same restrictions of size as that of main memory. Such a device is called secondary storage device or secondary memory. Secondary memory devices are categorized according to the following:

means by which the data is stored, optically or magnetically the technique used for storage of ihc data, sequential storage or direct access storage Ihe capacity of the medium, how much can be stored on it portability of the medium, can it be moves around easily access times to the data stored

Secondary storage is required to permanently store information that is not needed in memory all of the time and which may be too large to fit into the mumon of llie computer. 0 7: Explain the purpose of the following: a. Low level formatting b. High level formatting c. RAM and ROM Low Level Formatting During the process low-level formatting, a drive marks the tracks and sectors on the disk. Usually ihis is done by the manufacturer of the disk. In this process the starting and ending porni of each sector arc written on the platter. This process prepares the drive to hold data. High Level Formatting OuririLi high-level formatting. The information about file-storage is written onto flic disk called file-allocation table. This process also prepares the drive to hold data. RAM and KOM RAM consists of" blank chips and hence the computer can use il to store and retrieve (writi and read) information during the processing. It is a temporar; memory RAM is active only when computer is on and is also referred as a volatile memorv because the data stored in il disappears whenever the computer is switched oil'. KOM stand.-, for Read Only Memory. The instructions written in ROM can onl\ he read Inn cannot he changed or deleted. The ROM is, therefore, also called non-volatile memorv. l! is not possible li> write new information or instructions into the ROM I his is (lie reason win il is called KeadOnlv Memory.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 18
ROM stores data and insiruciions permanently When the power is turned off. ilie msiructidits stored in ROM are not losl. I'he instructions arc written mlo the ROM chips at tiie rime or'its manmau ming. When the computer is .switched on. the instructions m (he ROM ;ire automatically loaded into llic memory of the computer, 'these instructions prepare llic computer .s) stem tor use and display H't* initial operating system screen. A \ariiiiion of ROM is programmable read only memorv (PROM). PROM is a ROM into which vou cart load read only programs and data. Some microcompuier software packages, such as electronic spreadsheets are available as PROM units as well as on interchangeable disks. ROM and PROM are used in .1 varietv of capabilities within a computer s\stem. Q8. A 9th class student has a home computer system. What storage devices, the student will use on the home computer system. Explain why these devices are needed. Answer At home, a student vsill use the floppv disk and hard disk as storage devices llceatise hard disk is need ol'e\er\ computer svstem to run operating system and store iaige .minimi.') dal.i permanently Hoppv disk rs needed to move or copv data from his her home system to sJiool computer svsrcni to show his'her home assignments to the leather Q9. Fill in the blanks. 1. _______ is a direct access storage device. 2. _______ is a serial access storage device. 3. Access lime = _______ lime + ______ 4. RAM stands for_ 5. 1MB is equal to 6. "I'he contents of_ bytes. _ must be refreshed periodically. 7. The lime required to move the head of the hard disk 10 appropriate track is called 8. The larger the size of the RAM, the _______ efficiency of the computer. 9. liPROM stands for _______. 10. MSB stands for _______. Answers

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 19
Chapter 5 Number System
Q1. Explain the following. a. Binary number system b. Octal number system c. Decimal number system d. Hexadecimal number system e. ASCII codes f. BCD Answer Number use to.count the objects in daily life .we use number with different base or radix. The number system which we use in our daily life is called decimal number system because it contains ten digits from 0 to 9. Following are the popular numbers system 1. Decimal number system 2. Binary number system 3. Hexadecimal number system ' 4. Octal number system 5. ASCII codes . 6. Binary Coded Decimal (BCD) Decimal Number System We are familiar with the ten digits. 0, 1,2, 3, 4, 5, 6, 7, 8, 9 and also know that any value can be represented by using these ten digits only. For example, the value four hundred and fifty three can be written as: 453 = 4xl02 + 5x10' +3x10 We can also write numbers with fractional parts in this system by using only ten digits and the decimal point (,) e.g. 139.78 can be written as. 139.78 = IxlO2 + 3x10' + 9x10 + 7x10"' + 8xlO'2 It is a positional number system that means the posjtion of a digit within a number is very important so that 39 and 93 represent two different values. In this system of numbers each number consists of digits located at different positions with position 0 is the first digit towards the left side of the decimal point, position 1 is the second digit towards the left side of the decimal point and so on. Similarly the first digit towards the right side of the decimal |H>int is tit position -I. second ha> position -2 ami M> on !";idi position has a weight assigned to it e.g. position i lias weight 10 position 2 has weialit ii)aiid so on. This is shown in the table below. Table.demonstrating the position and weights ontigitsjor the number 57231,21 Or. 57231.2! ll is clear from the above discussion that the value of i multiplying the digits with the weight of their position and ad< called the expansion method. The digit at the extreme right Least Significant Digit (l.SD) because it has least weigh of a number is called the Most Significant Digit (MSD) beta example, digit at the it has max lumber 724. 7 is most significant and 4 is least significant. number is dele $ the results, lliis ide of a number is mince! by method is j called Hie ' le left side /eight. I or Binary Number System This number system uses only two digits 0 and 1 to represent any quantity. These digits arc called Binary digit or BIT. Like the decimal number system this is also a position;!! number system and each posiiion has a weight thai is u power of 2. 1-or Hexadecimal Number System You ma> have observed Ihat binary numbers arc not need at least 9 bits i.e. 277(iu, = 0100010101,:) and also converting binary to decimal and decimal to binary needs much calculation. Because of these difficulties computer scientists use another number svsiem frequently. This number system is (base 16 or hexadecimal number s\ stem), Tin's number system uses sixteen difTercnl diyiis. The digits are: 0. 1 . 2. 3. 4. 5, 6. 7. 8. 9 A. B. C D, E, F ASCII Codes ASCII is a 7 hit code used to handle .ilphanumcric data stands for American Standard Code for Information Interchange. This codes allows manufacturers lo siandardi/e input/output devices such as ke>boards, primers, visual display unit. etc. An extension of ASCII code uses 8-bit called as ASCII-8 code uilh an extra bit as a Parity bit to make the total number of 1 "s cither odd or even. Binary Coded Dcdimil (BCD) 1 his coding scheme is used to represent numeric data. We know that decimal number system has ten different digits. To represent these digits we need a 4-bit code BCD the digits are assigned the follow ing codes. Example: Represent 9807 in BCD Solution: We know thai in BCD 9-001, 8 = 1000 0>QOOO and 7 = 0111 Thus 9807 = 1001 1000 0000 0111 Clearly we need 16 hits to represent this 4-digit number- The same number can be represented in binary by using 14 bits. So the BCD codes use more bits hence require more computer memory. When arithmetic is to be performed on the numbers coded in BCD either they are first converted into binary and then arithmetic is performed or special circuits are designed for this purpose. Q2. Explain the following terms using examples. a. Data b. Information Data Data facts are called data. The term we use to describe the signals wilh witch computer^ work is called data. Data is the words, numbers and graphics that describe people, events, things and ideas. A representation of facts, concepts or instructions in a formalized manner suitable for communication, interpretation or processing by humans or machines is called data. In short data means collection of raw facts. E.g. class student result wise. Information Processed data is called information. Data becomes information when you use it as the basis for imitating some action or for making a decision. Information then is defined as the words, numbers and graphics used as the basis for actions and decisions. So the conversion of raw facts into a usable form is known as information. Data > Processing > Information

E.g. Class wise student result. Note: Some times the information of ihe some dala becomes the data for the further information.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 20
Q3. What are the main types of data used in different computer application? Explain the uses of each of the data types and the operations performed on it. Answer All computer programs use one or more of the following type of data, > Numeric Data > Alphabet Dala > Alphanumeric Data Numeric Data Numeric data is used to represent different quantities on which arithmetic is to be performed e.g.marks of different students, sales records of goods at a shop etc. Mostly this data is represented as integers or real numbers e.g. 45, 929, -85.09 etc. There are two types of numeric data. >- Integer > Real Number Integer Integer data consists of positive and or negative whole numbers including zero. For example T-40.-59 etc. Real Number Real data contains numbers which ma> be fraclions or incremental including integer numbers. For examples 4.5, 78.34 and etc. Alphabetic Data Alphabet data only consists of a fixed set of alphabetic characters e.g. data consisling of English alphabets A, B, C.....Z as well as a, b, c....z. We can use these English alphabets to represent names of students in a class. This data is represented as a sequence of characters and no arilhmetic operations can be carried out on ii Alphanumeric Data Alphanumeric data contains alphabets, numbers and other special characters i.e. $, it, % etc. Example of such data can be telephone numbers and addresses such as, 0425758912 and House U 128, Street 4m XYZ Colony, Lahore etc. Q4. Explain the 1's complement method of representing signed numbers. How can you perform subtraction using this method. Answer 1's Complement Method To understand this method of representing signed numbers we first see ihe meaning of the I's complement of a binary number.I's complement of an 8-bit binary number is obtained by subtracting the number from I ] 11 11 11,2) as shown in the example below. Example 1: Take 1 's complement of the binary number 01100110._____ Ps Complement 01100110 Examplc 2: Take !'s complement of the binary number 01100110 directly. Solution: Original Number 01100110 I's Complement

10011001

10011001

Example 3: Represent -54, j,t; ir. t "s eomplemem from using 8 bits. Solution: Number of bits = 8 54(10) = 0110110(2) So 1's complement from 54 =00110110 So I "s complement Representation of negative integers is same as the usual binan number representation and will always have a 0 in MSB. Representation of Negative numbers using I's complement: To represent the ncgali\e numbers in t's complement form, we perform follow HIJ; steps: j-irsi determine liie number of bits lu represent the numrJer. Cornerl the modules of the given number in binary. Place ,i 0 in MSB and binarj conversion ol' the number in remaining bits MSB (Moil Siiinilieaiil Bill lake I's complement of the result.

Q5. Explain the 2's complement method of representing signed numbers How can you perform subtraction using this method. Answer 2's Complement Method We know that mosi computers use Id bits to represent miegeis. When numbers arc represented in fixed number of bits the 2's complement method is a ver> useful \\a\ of representing signed number. Most computers represent integers using this method Many digital calculators also used this method for representing integers. 2"s complement of a binary number can be obtained by first taking I':, complement and men adding 1 in the result. This process is known in the example below: Example 1: Take 2"s complement of the binary number 01100110(2). Solution: Step 1: Taking 1's complement of the given number results in 10011001. Step 2: Adding 1 in ilie result give u 10011001 + ____________ 2's Complement of 01100110 = 10011010 We can obtain 2's complement of a binary number directly without taking 1 's complement. To take 2"s complement directly copy the number without any change up to the first (least significant) I in the number and change remaining to Os to Is and Is lo Os. This process is shown in the example below. Example 2: Take 2's complement of the binary number 01100110(;i directly. Solution: Given number: 01100110 2's Complement: 10011010 Representation of Negative numbers using 2's complement To represent the negative numbers in 2's complement from we perform the following steps: First determine the number of bits to represent the number. Convert the modules of the given number in binary. Place a 0 in MSB and binary of the number in remaining bits. Take 2's complement of the result. This is shown in the example given below. Example 3: Represent -54(10) in 2's complement from using 8 bils. Solution: .Number of bils =8 Modules of-54=54 = 00110110 54 in 2's complement form = 00110110 -54 in 2's complement form = 11001010 Clearly 2's complement representation of a negative integer will always have a 1 in the most significant bit. The smallest integer in 2's complement form using 8 bits is 10000000 = -128 = -27 and the smallest integer in 2's complement form using n bits is 2( n-1)

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 21
Q6. Convert the following decimal numbers into binary, octal and hexadecimal. a. 78 b. 97 c. 129 Answer Convert 78(1(l) into Binary Solution: 78(10) = (?)2

Number ! Remainder 78 39 19 9 4 2 1 Hence 78(10) = 04E(16) Convert 78(l0) into Octal Solution: 78(10)

0 1 1 1 0 0

= (?)8

Number ! Remainder 78 1 1 0 1

Hence 78(10)

0116(8)

Convwrt 78(10) into Hexadecimal Solution: 78(10)


= (?)16

Hence 78(10)

Number ! Remainder 78 0 4 04E(16)

Convert 97(]o) into Binary Solution: 97(10)


= (?)2 Number Remainder 97 48 1 24 0 12 0 6 0 3 0 1 1

Hence 97(10)= 1100001(2) Convert 97(io) into Octal Solution: 97 = (?)(8) Number 8 12 1 0 Hence 97(|0) = 0141(8) Remainder 97 1 4 1

Convert 97(io) into Hexadecimal Solution: 97(10)


=

(?)i16 Number 97 6 0 61(16) Remainder 1 6

Hence 97(io) =

Binary
Convert 129(10) into Binary Solution: 129(10) = (?)2 Number ' Remainder 32 0 16 0 8 0 4 0 2 0 1 0 Hence 129(10) = 10000001,2,

Convert I29(10) into Octal Solution: Number 129 16 Remainder 1

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 22
2 0 Convert 129(10), into Hexadecimal Solution: 129(10) = 081(10) Number 129 8 0 Hence 129,,,,, -= 081(10) Q7. Convert the following hexadecimal numbers into binary, octal and decimal. a. 7A,(16) b. 1C(16) c. 89(16) Answer Convert 7A(16) into Binary Solution: Step 1: Convert each digit into binary separately and write it 2 bits. 7(16) = (?)2 Number 7 3 1 Hence 7(16)= 111(2) A(16) = (?)2 Number 10 5 2 1 Remainder Remainder Remainder 1 8 0 2

1 1

0 1 0

Hence 7(16)= 1010(2) Step 2: Replace the digits of the hexadecimal number with the two bits obtained in step 1. 7A(16)= 1111010(2) . Convert 7A(16) into Octal Solution: Step 1: Convert each digit into binary separately and write it two bits. 7(16) = (?)2 Number 7 3 1 Hence 7(16)= 111(2) A(16) = (?)2 Number 10 5 2 1 Remainder Remainder

1 1

0 1 0

Hence 7(16)= 1010(2) Step 2: Replace the digits of the hexadecimal number with the two bits obtained in step 1 . . 7A(16)= 11 11010(2) . Step 3: Divide your number into groups of 3 bits starting from the right side. So 1 11 1010(2) is divided into the following three groups. 001, 111 and 010 Step 4: Convert each group into octal. . 00l(2) = 0x4 + 0x2 + 1x1 0 + 0+1 = 111(2) = 1x4-1-1x2 = 4+2+1 = 7 Ox02+lx2' + 0x2 = 0x4+ 1x2 + 0x1 = 0+2+0 = 2 Step 5: Replace each group by its octal equivalent. 001 111 010,2) =172,8) Convert 7A(16) into Decimal Solution: 7A(16)= 7x16' + 10x16 = 112+10 = 122 = 122(10)

7A(16)

Convert !C2(i6) into Binary Solution: Step 1: Convert each digit into binary separately and write it four bits. 1(16) = (?)2 Number Remainder 1 0

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 23
Hence I(i6) = 0001(2) C(16) = (?)2 Number 12 6 3 1 Hence 7(16)= 1.100(2) 2(16) = (?)2 Number 2 1 0 Hence lC2(16) = 0010(2) Step 2: Replace the digits of the hexadecimal number with the four bits obtained in step 1. 7 A,(I6) = 0001(2) 1100(2) 0010(2) Convert 1C2( 16) into Octal Solution: Step 1: Convert edch digit into binary separately and write it two bits. 1(16) = (?)a Number 1 0 01(2) Remainder Remainder 0 0 1

Remainder 0 1

Hence (1)16 =

C(16)

(?)2 Number 12 6 3 1 Remainder 0 1 1

Hence 7(16)

= 1110(2) Number 2 1 Remainder 1 0

Hence 1C2(16,) = 101(2) Step 2: Replace the digits of the hexadecimal number with the two bits obtained in step 1. 1C2(|6)= 01 I'll 1001D(2) Step 3: Divide your number into groups of 3 bits starting from the right side. So 0111110010 (2) is divided into the following three groups. 000, 111 ,110and 010 Step 4: Convert each group into octal. 000(2) = Ox22 + 0x2'+0x2 . = 0x4 + 0x2 + 0x1 = 0+0+0 = 0 010(2) = = = = Ox22 + lx2'+0x2 0x4+1x2 + 0x1 0+2+0 2

Step 5: Replace each group by its octal equivalent. 001011 110 010(2) = 0762(8) Convert 1C2(|6) into Decimal Solution: 1C2(16) = Ixl62 +12x16'+2x16 = 256+192 + 2 = 450 1C2(16) =450 Convert 89(16) into Binary Solution: Step 1: Convert each digit into binary separately and write it two bits. , 89(16) = (?)2 Number 8 4 2 1 Hence 89(16)= 1000(2) 9(16) = (?)2 Number 9 4 2 1 Hence 9(16)= 1001(2) Remainder Remainder

0 0 0

1 0 0

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 24
Step 2: Replace the digits of the hexadecimal number with the two bits obtained step 1. 89(16)= 1000(2) 1001(2) Convert 89(i6, into Octal Solution: Step i: Convert each digit into binary separately and write it two bits. 8(16) = (?)2 Remainder 0 0 0

Number 8 4 2 1 Hence 8(|6)= lOOO(2) 9(16) " (?)2 Number 9 4 2 1 Hence 9(i6) = 1001(2)

Remainder 1 0 0

Step 2: Replace the digits of the hexadecimal number with the two bits obtamed i step 1. 7A,(16) = 10001001(2) Step 3: Divide your number into groups of 3 bits starting from the right side So 10001001(1) is divided into the following three groups. 010,001 and 001 Step 4: Convert each group into octal. 010(2, Ox22+lx2'+0x2 0x4+1x2 + 0x1 0 + 2 + 0 2 001,2) 0x2^ + 0x2' + 1x2 = = = 0x4 + 0x2 + 1x1 0 + 0+1 1

Step 5: Replace each .group by its octal equivalent. 010 001 001(2) = 21 1(8) Convert 89(i6) into Decimal Solution: 89(i6) = = 89(16) = 8x16' +9x16 128 + 9 137 = 137(10)

Q10. Convert the following octal numbers into binary, decimal and hexadecimal. a. 125(8) b. 57(8) e. 777(8) Answer Convert 125(g) into Binary Solution: Step 1: Convert each digit independently into binary and write it in three bits. 1 = 001(2) 2 = 010(2) 5 = > 10l(2) Step 2: Replace the digits of the octal number with the four bits obtained in step 1. 125(8) = 001010101(2) Convert 57(8) into Binary Solution: Step I: Convert each digit independently into binary and write it in two bits. 5 101(2) 7 = 111(2) Step 2: Replace the digits of the octal number with the four bits obtained in step 1 . Convert 777(8, into Binary Solution: Step 1: Convert each digit independently into binary and write it in two bits. 7 = ll](2) 7 = IIlri 7 = 111,,, Step 2: Replace the digits of the octal number with the four bits obtained in step 1. 777,8, = 111 111 I] 1(2, Convert I25)S) into Decimal Solution: Convert 57jsj into Decimal Solution: 57ittl = 5x8'+ 7x8" -47,1,,, Convert 777)S, into Decimal Solution: 777(B, - 7x8: -r 7x8' f 7x8 = 85 = 51 !,,> Convert 125,s, into Hexadecimal Solution: Step 1: Convert each digit independently into binary and write it in three bits. Step 2: First divide your number into groups of four bits starting from the right side So OUIU10I01,:, is divided into the following two groups 0101 and 0101 Step 3: Convert each group into hexadecimal. 0101 =5,i6)and 0101 = 5,,61 Step 4: Replace each group by its hexadecimal equivalent. 0101 010112| = 55(|6)

Hexadecimal
Convert 57(g) into Hexadecimal Solution: ; Step 1: Convert each digit independently into binary and write it in three bits. 5(8) 7(8) 57(8) = = = 0101(2) 0111(2) 01010111(2)

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 25
Step 2: First divide your number into groups of four bits starting from the right side.. So 01010111(2) is divided into the following two groups 0101 and 0111. Step 3: Convert each group into hexadecimal. 0101 =5(16) and 0111=7(16) Step 4: Replace each group by its hexadecimal equivalent. 0101 Oil 1(2) = 57(|6)' Convert 777(g) into Hexadecimal Solution: Step 1: Convert each digit independently into binary and write it in three bits. 7,(8) = 0111,(2) 7(8) = 0111(2) 7(8) = 0111(2) 777(8) = 011101110111(2) Step 2: First divide your number into groups of four bits starting from the right side.. [ So 011101110111(2) is divided into the following three groups 0111, 0111 and 0111. Step 3: Convert each group into hexadecimal. 0111=7(16), OHi=7(16)and 0111=7(16) Step 4: Replace each group by its hexadecimal equivalent. 0111 0111 011W Ql 1. Convert the following binary numbers into octal, decimal and hexadecimal, a, 01110101(2) b. 10101001(8) c. 00110011(8) Answer Convert 01110101(2) into Octal Solution: Step 1: First divide your number into groups of three bits starting from the right s| So 01110101 (2) is divided into the following three groups 001,110 and 101. Step 2: Convert each group into octal. 001 = 1(8) 110 = 6(8) 101=5(8) Step 3: Replace each group by its octal equivalent. 001.110 101(2) =165(8) Convert 10101001(2) into Octal Solution: Step 1: First divide your number into groups of three bits starting from the right SM So 10101001(2) is-divided into the following three groups 010, 101 and 001. Step 2: Convert each group into octal. 010 = 2(8) 101=5(8) 001 = 1(8) Step 3: Replace each group by its octal equivalent. 010 101 001(2) = 251(8) Convert 001100ll(2) into Octal Solution: Step 1: First divide your number into groups of three bits starting from the right sic So 00110011(2) is divided into the following three groups 000, 110 and 011. Step 2: Convert each group into octal. 000 = 0(8) 110 = 6(8) Oil =3(8) Step 3: Replace each group by its octal equivalent. 000 110 011(2) = 063(8) Convert 01110101(2) into Decimal Solution: 01110101(2) = Ox27 + Ix26 + Ix25 -Mx24 + Ox23 + Ix22 + 0x2' + 1x2= 117Uo, Convert 10101001,2, into Decimal Solution: 10101001(2) = Ix27.+ Ox26 + Ix25 + Ox24 + Ix23 + Ox22 + 0x2''+ 1x2= 169(i0) Convert 00110011(2) into Decimal Solution: 00110011(2) = Ox27 -f Ox26 + Ix25 + Ix24 + Ox23 + Ox22 + 1x2' + 1x2= Convert 01110101(2) into Hexadecimal Solution: Step 1: First divide your number into groups of four bits starting from the right side. So 01110101(2) is divided into the following two groups 0111 and 0101. Step 2: Convert each group into hexadecimal. 0111=7(i6) and 0101=5(16) Step 3: Replace each group by its octal equivalent. -0111-0101(2) = 75(i6y Convert 10101001,2) into Hexadecimal Solution: Step 1: First divide your number into groups of four bits starting from the right side. So 10101001 (2) is divided into the following two groups 1010 and 1001. Step 2: Convert each group into hexadecimal. 0.111=7(1*). and 0101=5(i6) Step 3: Replace each gr6up by its octal equivalent. 0111 0101(2) = 75(i6) Convert 00110011(2) into Hexadecimal Solution: Step 1: First divide your number into groups of four bits starting from the right side. So 00110011(2) is divided into the following two groups 0011 and 0011. Step ,2: Convert each group into hexadecimal. 0011=3(i6) and 0011 =3(i6) Step 3: Replace each group by its octal equivalent. 00110011(2) = 33(i6) Q12. Convert the following BCD numbers into Decimal, a. 00111001 b. 00000111 c. 00110011 Answer Convert 00111001 into Decimal Solution: Step 1: First divide your number into groups of four bits starting from the right side. So 00111001,2) is divided into the following two groups 0011 and 1001. Step 2: Convert each group into BCD. 0011=3 and 1001 = 9 Slep 3: Replace each group by its BCD equivalent. 0011 1001 =39

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 26
Convert 00000111 into Decimal Solution: Slep 1: First divide your number into groups of four bits starting from the ngiii side. So 00111001(2, is divided into the following two groups OOUU and 0111. Step 2: Convert each group into BCD. 0000=0 and 0111-7 Slep 3: Replace each group b> its BCD equivalent. 00000111 =07 Convert 00110011 into Decimal Solution: Step 1: Firsl divide your number into groups of tour bits starting from the right side So 00111001,2, is divided into the following two groups 0011 and 0011. Step 2: Convert each group into BCD. 0000=3 and 0011 =3 Step 3: Replace each group by its BCD equivalent. 0011 0011 =33 Q13. Represent the following numbers as 8-bit 1's complement and 10-bit; complement numbers. a. 76 b. -98 c. -126 76 as 8-bit 1's complement Solution: *

Complement
Number of bits = 8 Now we convert 76 into binary digits Number 76 38 9 4 2 1 0 So in 1 's complement form 76 = 10110011 Remainder

0 1 1 0 0 1

76 as 10-bit 2's complement Solution: Number of bits = 10 76(10) = 01001100(2) So in 2's complement form 76 = 10110011 -98 as 8-bit 1's complement Solution: Number of bits = 8 Now we convert 98 into binary digits Number . 98 49 24 12 6 3 1 0 = Remainder

0 1 0 0 0 1 1 01100010(2)

98(10)

So in I's complement form -98 = 10011101 98 as 10-bit 2's complement Solution: Number of bits = 8 98(10) = 10 So in 2"s complement form -98 =000110001.0 -126 as 8-bit 1 's complement Solution: Number of bits = 8 Now we convert 126 into binary digits Number 126 63 31 15 7 3 1 0 Remainder

0 1 1 1 1 1 1

-126 as 10-bit 2's complement Solution: Number of bits = 10 126(10) = 00011.M;HO(Z)So in 2\ complement form -126- 1110000010

Q14. Represent the following 8-bit 1's complement numbers into decimal a. 00101011 b. 10001001

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 27
c. 11111111 Answer ; , 00101011 1's complement into Decimal Solution: . Number of bits = 8 So 8-bit 1's complement of 00101 Oil = 11010100 Now convert 1's complement result into decimal. = Ix27 + Ix26 + Ox25 + Ix24 -i-'6x23'+ Ix22 + 0x2' + 0x2= 21 10001001 1's complement into Decimal Solution: Number of bits = 8 So 8-bit 1's complement of 10001001 =01110110 Now convert Ts complement result into decimal. :22+lx2l+Ox2"=ll8(,o> 11111111 l?s complement into Decimal Solution: Number of bits = 8 So 8-bit 1's complement of 11111111 =00000000 Now convert 1's complement result into decimal. . 00000000(2, = Ox27 + Ox26 + Ox25 + Ox24 + Ox23 + Ox22 + 0x2' + 0x2 = 0(!0, Q15. Represent the following 8-bit 2's complement numbers into decimal. a. 00111101 b. 11111111 c. 10101010 Answer 00111101 2's complement into Decimal Solution: Number of bits = 8 Given number = 00111101 2's complement = 11000011 Now convert 2's complement result into decimal 11000011,2,= Ix27+ Ix26 + 0x25 + 0x24 + 0x234 Ox22 + 1x2' + 1x2= 195(|0) Q17. Perform the following subtraction using 8-bits 2's complement method Verify your answer by converting it into decimal. All numbers are into decimal system. a. 127-126 b. 12-106 c. -12-?S Answer 127 - 126 usin 2's complement Solution: We can write 127 12 -- 127 + (-l26) . Step 1: Write mauniludi' of bolh numbers in S-bits Number 127 63 31 15 7 3 1 0 127 = 01111111(2) Number 126 63 31 15 7 3 1 0 126 = 01111110(2) Step 2: Represent negative number in 2's complement. -126= 10000010 Step 3: Add the 2"s complement representation and ignore the llnal carry. 01111111 10000010 Reminder 0 1 1 1 1 1 1 Reminder 1 1 1 1 1 1 1

End Carry
End carry: 1 00000001 So life answer is 00000001 and it is in 2's complement. Step 4: Convert 1 's complement result into decimal. 00000001 = Ox27 + Ox26 + Ox25 + Ox24 + Ox23 + Ox22 = 1(10) 12 - 106 using 2's complement Solution: We can write 12-106 '= 12+ (-106) Step 1: Write magnitude of both numbers in 8-bits. 12 = 00001100(2) Number Remainder 12 . 6 0 3 0. 1 1 0 . 1 Number 106 53. 26 Remainder 0 1

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 28
13 6 3 1 0 106 = 011010010(2) 0 1 0 1 1

Step 2: Represent negative number in 2's complement. -106-10010110 . Step 3: Add the 2's complement representation and ignore the final carry. 00001100 10010110 End carry: 0 10100010 So the answer is 10100010 and it is in 2's complement. Step 4: Convert 1's complement result into decimal. As the MSB is I, so it is a negative number, so I01000IO = -01011110 = - (Ox.''7 + Ix26 + Ox^ + Ix"1"1 + Ix^-1 -i-12 -25 using 2's complement Solution: We can write -12-25 = (-12) + l-IOf Step 1: Wrilc magnitude of both numbers in 8-bits. Number | Remainder 12 6 0 3 0 1 1 0 1 Number Remainder 25 12 1 6 0 1 1 0 1 12 = 00001100(2) Step 2: Represent both numbers in 2's complement. -12=11110100 and -25=11100111 Step 3: Add the 2's complement representation and ignore the final carry. 11110100 11100011 End carry: 0 11011011 So theansuer is 11011011 and it is in 2's complement. Step 4: Convert l"s complement result into decimal. As the MSB is 1. so it is a negative number, so 11011011

-00100101

Ql 8. Perform the following subtraction using 8-bit 1's and 2's complement method. . Verify the results by .converting your answer into decimal.Explain why the results are not correct if there is needed. a. 57-96 b. 120-110 c. 60-68 Answer 57 96 using 1's complement Solution: We can write 57-9657 + (-96) Step 1: Write magnitude of both numbers in 8-bits. Number Remainder 57 28 1 14 0 7 0 3 1 1 1 0 1 57 = 00111001(2) Number 96 48 24 12 6 3 1 0 Remainder 0 0 0 0 1 1 1

96 = 01100000(2) Step 2: Represent negative number in 1's complement form. -96- 10011111 Step 3: Add the 1 "s complement representation. 00111001 lOOIIIll End carry: 0 11011000 So the answer is 11011000 and it is in !"s complement. Step 4: Convert 1 "s complement result into decimal. As the MSB is 1. so it is a negative number, so 11011000 = -(Ox27 + 0x2* + 1 x2! + Ox2J i- Ox2; + = -39,io, 57 -96 using 2's complement Solution: We can write 57-96= 57 +(-96) Step 1: Write magnitude of both numbers in 8-bits. 57 = 00111001,,, Number Remainder 57 28 1 14 0 7 0 3 1 1 1 0 1 -00100111

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 29
57 = 00111001(2) Number 96 48 24 12 6 3 1 0 96-01100000(2) Step 2: Represent negativ number in 2's complement form. -96= 10100000 Remainder 0 0 0 0 0 1 1

Complement Representation
Step 3: Add the 2's complement representation. 001 11001 11100000 End carry: 0 11011001 So the answer is 1 101 1001 and it is in 2's complement. Step 4: Convert the 2's complement result into decimal. As the MSB is 1, so it is a negative number, so 11011001 = -00100111 =- (Ox27 + Ox26 + 1 x25 + Ox24 + Ox23 + 1 x22 +1 x2 ') = -39(10) Hence the results are same in both cases. 120-110 using 1's complement Solution: By 1 's complement method we can write 120-110 120+ (-110) Step 1: Write magnitude of both numbers in 8-bits. 20 = 01111000(2) Number Remainder 120 60 0 . 30 0 15 0 7 1 3 1 1 1 0 1 Number Remainder 110 55 0 27 1 13 1 6 1 3 0 1 1 0 1 110 = 01101110(2) Step 2; Represent negative number in I's complement form. -110=10010001 Step 3: Add the 1's complement representation. 01111000 10010001 00001001 ________1 00001010

End carry Add end carry

So the answer is 0000 1 0 1 0 and it is in I's complement. Step 4: Convert 1 's complement result into decimal. Solution; 2's complement By 2's complement method we can write 12Q-110 =' 120 + (-1.10) Step 1 : Wr\te magnitude of both numbers in 8-bits. Number I Remainder 120 60 30 15 7 3 1 0 120 = 0111000(2) Number 110 55 27 13 6 3 1 0 Remainder 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1

Step 2: Represent negative number in 2's complement form,

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 30
-110=10010010 f Step 3: Add the 2's complement representation and ignore ihe end carry. 01111000 10010010 End carry: 1 00001010 Add end carry: _______1 So the answer is 00001010 and it is in 2's complement. Step 4: Convert 2's complement result into decimal. 00001010- Ox27 + 0x2()-f Ox25 + 0x24+ Ix23 + 0x22+ 1x2' +0x2 60 -68 using 1 's complement Solution: ; By I's complement.method we can write : 60-68- = 60 + (-68) Step 1: Write magnitude of both numbers in 8-bits. Number j Remainder 60 30 15 7 3 1 120=00111100(2) Number 68 34 17 8 4 2 1 0 -68 = 01000100(2) Step 2: Represent negative number in 1 's complement form. -68= 10111011 Step 3: Add the I's complement representation. 00111100 10111100 End carry: 0 11110111 So the answer is 11110111 and it is in 1 's complement. Step 4: Convert 1 's complement result into decimal. As MSB is 1 , so it is negative number, so 11110111 =-00001000 - -(Ox27 -i- Ox26 + Ox2s + Ox24 -r 1 x23 + Ox2: + 0x2' + 0x2") 60 -68 using 2's complement Solution: By 2's complement method we can write 60 -68 = 60 + (-68) Step 1: Write magnitude of both numbers in 8-bits. I Number 60 30 15 7 3 1 Number 68 34 17 8 4 2 1 0 68 = 01000100(2) Remainder 0 0-. 1 1 1 Remainder 0 1 1 0 0 0 1 Remainder 0 0 .1 0 0 0 1

0 0 1 1 1

Represent Nagative
Step 2: .Represent negative number in 2's complement form. -68 = 10111100 Step 3: Add the 2's complement representation and ignore thu end carry. 00111100 10111100 End carry: 0 11111000 So the answer is 1 1 1 1 1000 and it is in 2's complement. Step 4: Convert 2's complement result into decimal. As MSB is 1 , so it is negative number, so 11 -111 000 = -0000.10QO: . = -(Ox27 + Ox26 + Ox25 +' Ox24 + 1 x23 + Ox22 + 0x2 ' + 0x2) Q19. Perform the following substitution using 10-bit 1's and 2's complement metfiod verify the results by converting your answer into decimal. Answer (A) -57 -96 Solution: By 1's complement method we can write -57-96 = (-57) + (-96) i Step 1: Write magnitude of both numbers in 10-bits. Number Remainder 57 28 1 14 0 7 0 3 1 1 1 0 1 57= 0000111001(2) Number 96 Remainder

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 31
48 24 12 6 1 ] 0 96 = 0001100000(2) Step 2: Represent both numbers in 1 's complement form. -57=1111000110 and -96-1110011111 Step 3: Add the l"s eomplement representation. 1111000110 I1I0011I1I 1101100101 Iind earn: 1 Add end earn1: 1101100110 So the answer is 1101100110 and it is in 1's complement. Slcp 4: Convert 1 's complement result into decimal. As MSB is I, so it is negative number, so 1101100110 = -0010011011 = -(0x2'' -r 0x2* -t- 1 x27 -r 0x2" 0x2* + 1 x24 + 1 x2' + 0x2" Solution: By 2's complement method \ve can write -5796 = (-57)+ (-96) Step 1: Write magnitude of both numbers in 10-bits. Number Remainder 57 28 1 14 0 7 0 3 1 1 1 57= 0000111001(2) Number Remainder 96 48 0 24 0 12 1 6 0 3 0 1 1 0 1 96 = 0001100000(2) Step 2: Represent both numbers in 2's complement form. ! . -57 = U1100011'0 and -96=1110100000 Step 3: Add the 2's complement representation. 1111000110 1110100QQQ Endcarry: 1 1101100111 So the answer is 1101 1001 1 1 and it is in 2's complement. Slcp 4: Convert 1 's complement result into decimal. As MSB is I, so it is negative number, so 1101100110 = -0010011011 = -(0x2'' -r 0x2* -t- 1 x27 -r 0x2" 0x2* + 1 x24 + 1 x2' + 0x2" Solution: By 2's complement method \ve can write -57-% (-57)+ (-96) Step 1: Write magnitude of both numbers in 10-bits. Number Remainder 57 28 1 14 0 7 0 3 1 1 1 0 1 57= 0000111001(2) Number 96 48 24 12 6 3 1 0 Remainder 0 0 1 0 0 1 1 0 0 1 0 0 1 1

96 = 0001100000(2) Step 2: Represent both numbers in 2's complement form. ! -57 = U1100011'0 and -96=1110100000 Step 3: Add the 2's complement representation. 1111000110 1110100QQQ Endcarry: 1 1101100111 So the answer is 1101 1001 1 1 and it is in 2's complement. Step 4: Convert 2's complement result into decimal. As MSB is 1, so it is negative number, =- -153(10) (B) -120 -110 Solution: By 1's complement method \We can write -120 - 110 = (-120) + (-110) Step 1: Write magnitude of both numbers in 10-bits Number 120 60 30 15 7 3 1 0 120 00011110000(2) Reminder 0 0 0 1 1 1 1

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 32
Number 110 55 27 13 6 3 1 0 Reminder 1 1 1 0 0 1 1

1 10 = 0001 10! 1 10(2) Step 2: Represent both numbers in 1's complement form: -120 11 100001 11 .and -110=11 tOO 10001

Slcp 3: Add the 1 "s complement representation. 1110000!I 1 End carry: 1 1t10010001 Add carry: : ________1 11OOOl 10001 So the answer is 1100011001 and it is in 1's comlement

MSB
'Step 4: Convert I 's complement result into decimal. As MSB is 1 . so it is negative number, so 11 0001 1001- = -001 11001 10 = -(0x2" + 0x2*r + Ix26 .+ 1 x25 + Qx24 + Ox23 - 230(10) " Solution: By 2's complement method we can write -120-110 = (-120) + (-110) ' Step 1; Write magnitude of both numbers jri 10-biis. Number 120 60 30 15 7 3 1 0 120 = 0001111000(2) Number 110 . 55 27 13 6 3 1 0 Remainder 0 1 1 0 0 1 1 Reminder 0. 0 0 1 1 1 1.

. . . 110 -0001 10IT 10(2) Step 2: Represent both numbers in 2's complement form. -120-lllOOOlOOO and -110-1110010010 Step 3: Add the 2"s complement representation. 1110001000 11Q010010 End carry: 1 1100011010 So the answer is 11000! 1010 and it is in 2's complement. Step 4: Convert 2's complement result into decimal. As MSB is 1, so it is negative number, so 1101100111 =-001.0011001 - -(0x2" + 0x2* + 1 x27 + 1 x2' + 1 x2! + Ox2J + Ox2J + I x22 + 1 x2' + 0x2") = -230(10), (C) -60 -68 Solution: By 1's complement method We can write -60 -68 = (-60) + (-68) Slcp 1: Write magnitude of both numbers in 10-bits. Number Remainder 60 30 0 30 0 15 0 7 1 3 1 1 1 0 1 60 = 0000111100(2)

Number Remainder 68 34 0 17 0 8 1 4 0 2 0 1 0 0 1 68 = 0001000100(2) Step 2: Represent both numbers in 1 's complement form. -60=1111000011 and -68 = 1110111011

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 33
Step 3: Add the Ts complement representation. 1111000011 1110111011 End carry: 1 1101111110 Add end carry: _____ __1 1101111111 So the answer is 1 1 0 1 1 1 11 1 1 and it is in 1 's complement. Step 4: Convert 1 "s complement result into decimal. As MSB is 1, so it is negative number, so 1101111111 =-0010000000 = -(0x2'' + Ox28 + 1 x27 + Ox26 + Ox25 + Ox24 + Ox23'+ Ox22 + 0x2' + Ox2i;) Solution: By 2's complement method we can write -60-68 = (-60) + (-68) Step 1: Write magnitude of both numbers in 10-bits. Number 60 30 30 15 7 3 1 Remainder 0 0 0 1 1 1

60 = 0000111100(2) Number Remainder 68 34 0 17 0 8 1 4 0 2 0 1 0 0 1 68 = 00011)00100(2) Step 2: Represent both numbers in 2"s complement form. -60- miOOUlUO and -68 = 1110111100 Step 3: Add the 2's complement representation and ignore the end carry. 1111000100 111011100 l-nd curry: 1 1110000000 So the answer is 1 1 10000000 and it is in 2's complement. Slep 4: Convert 2"s complement result into decimal. As MSB is 1, so it is negative number, so 1 110000000 = -00 10000000 -((;x2"+0x2->l-r 1 x27 + Ox26 + 0x2" + Ox24 + Ox25 -r Ox22 -Ox2l"Mlx2"l Q20. What are the smallest and largest numbers that could be represented ir 8-bits? Answer The smallest 8-bit number is a negative number whose M.S. II. is ' 1" \\hile ihc lar^ X-bit number is a positi\e number whose M.S.B. is "0*. Q21. What are the smallest and largest numbers that could be represented ir 8-bits 1's complement? Answer I.aruL'M number is - I27i,,. smallest number is -1 27m. using an 8-bit I 's complements representation Q22. What are the smallest and largest numbers that could be representedr 8-bits 2's complement? Answer Largest number is M27|(,. smallest nunibei i> -128m. uswiy an S-bit 1 "s compements representation. Q23. Represent the following numbers using fixed point representation. UK the following format for the conversion. Also verify your results b> converting your results back into decimal. a. b. c. 25.5 244.9 33.6

10 bits for integral part

6 bits tor fractionaI part

Octal
Answer (a) 25.5 . Solution: To convert this real number we independently convert the integral part ',i.e. 25) and the fractional part (i.e. 0.5) into binary by using the process iiiven belou Number Remainder 25 : 12 1 6 0 3 0 1 1 0 1 25(10) = 011001(2) Result Fractional Part Integral Part 2 x 0.5 1.0 0 1 So 0.5 25.5 25.5 = 1 = 01 1001. i = 00000II00 I.I 00000

And in fixed point form 25.5 =0000011001100000 Now coiivert fixed d-point into decimal . Integral part =- 0000011001::, Fractional pan = .100000,; Now 0000011001 = Ox29-t Ox28-^ 6x27-^ Ox26 T ()x251- Ix24 T lx2J.-- Ox2: t Ux2! --: 25 Also . ' .100000 = . 1 xT1 -i- Ox2': + Ox2'3 + 1 x2'4 + 1 x2/5 ^ Ox2'6 ~: . 5' ' ' ' .

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 34
So 000001 K)01100000 = 25.5(io) Ans (b) 233.9 Solution: To convert this real number we independently convert the integral part (i. the fractional part (i.e. 0.9) into binary by using the process given below Number Remainder 233 116 1 58 0 29 0 14 0 7 0 3 1 1 1 0 1 233 = 01110100(2) Result Fractional Part Integral Part 2x0.9 1.8 8 1 2x0.8 1.6 6 1 2x0.6 1.2 2 1 2x0.2 . 0.4 4 0 2x0.4 0.8 8 0 2x0.8 1.6 6 1 0.9 So 233.9 = 011101001.111001 = OOI1IOIOOUI1001 And in fl\ctl-poim form 233.9 - 0011101001111001 Now convert fixed-pomt into decimal Integral part = 0011 101001(2) Fractional part = .11001(2) Now 0011101001 = 0x2* - 0x2* + 1x2' + 1x2* + Ix25 + Ox2J + Ix 1-0x2'+ 1x2'' 233 .111001 . 1 x2'' + 1 x2~2 + 1 x2'3 + Ox2'4 + Ox2"5 + 1 x2"6 0:9 So 0011101001.111001 = 233.9 (c) 33.6 Solution: To convert this real number we independently convert the integral part (i.e. 33) and the fractional part (i.e. 0.6) into binary by using the process given below. Number Remainder 33 16 1 8 0 4 0 2 0 1 0 0 1 33-0100001(2) Result Fractional Part Integral Part 2 x 0.6 1.2 2 1 2x0.2 0.4 4 0 2 x 0.8 1.6 6 1 2 x 0.6 1.2 2 1 2 x 0.2 0.4 4 0 2x0.4 0.8 8 0 0.6 = .101100 33.6 = 0100001.101100 = 0000100001.101100 And in fixed-point form 33.6 = 0000100001101100 Now convert fixed-point into decimal Integral part 0000100001(2) Fractional part = ,101100(2) Now 0000100001 = Ox2y + Ox28 4- Ox27 + Oxi>6 <2' + lx2 . Ix25 + Ox24 + 0x2" t ARo .101100 0.6 Ox2'2x2'3 + 1 x2'4 + Ox2"5 1 Ox2'6 (c) -2333.6 Solution: To convert this real number we independently convert the integral part(i.e. 2333) anu the fractional part (i.e. 0.6) into binary by vising the process given below. Number Remainder 2333 1166 1 583 0 291 1 145 1 36 0 18 0 .9 0 4 1 2 0 1 0 0 1 2333 = 0100100011101(2) Solution is not possible because it has- 13-bits for integral part. Q25. Represent the following numbers using floating point representation. Use the floating point format given in the chapter. a. 1025.5 b. -1233.9 c. -2333.6 Answer (a) 1025.5 = .111001

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 35
Solution: Step T: To convert this real number we independently convert the integral part (i.e. i025) and tin fractional part (i.e. 0.5) into binary by using the process given below. Number Remainder 1025 ' 512 1 256 0 128 0 64 0 32 0 16 0 8 0 4 0 2 0 1 0 0 1 1025 = 010000000001(2) Result Fractional Part Integral Part 2x0.5' 1.0 1 1 0.5 = 0.1(2) 1025.5 = 010000000001.1 = 1.00000000011x2'

Soloution
Step 2: Represent the number in floating point format. Sign = + = 0 Exponent = 10 and in 6-bit 2's complement form 00.1010 Mantisa = 1.00000000011 = 1.000000000 s 6-bit exponent 9-bit Mantista 0 001010 000000000 ' (b) -1233.9 . . Solution: Step 1: To convert this cealnumber we independently convert the integral part (i 1233) and the fractional part (i.e. 0:9) into binary by using the process given below. Number Remainder 1233 616 1 308 0 154 0 77 0 38 1 19 0 9 1 4 1 2 0 1 0 0 1 . 1233-010011010001(2) Solution is not possible because it has 12-bits tor integral part (c) -2333.6 Solution: To convert this real number we independently convert the integral part(i.e. 2333) anu the fractional part (i.e. 0.6) into binary by vising the process given below. Number Remainder 2333 . 1166 1 583 0 291 1 145 1 36 0 18 0 .9 0 4 1 2 0 1 0 0 1 2333 = 0100100011101(2) Result 1-2 0.4 0.8 1.6 Fractional Part 1 4 8 8 Integral Part 1 0 0. 1

2 x 0.6 2 x 0.2 2 x 0.4 2x0.8

0.6 = lOOl(2) -2333.6 = -0100100011101.1001 -].001000111011001x2" Step 2: Represent the number in floating point format. Sign = - - 1 Exponent = 11 und in 6-bil 2's eomplcinent form 001010 Mamisa- 1.001000111011001=-!. 001000111 So the number in floating point format is S 6_-bit exponent 9-bit Mantjsta 1 001011 001000111 Q26. Represent the following messages using the ASCII codes given in the table of ASCII codes. Also verify your coded message by converting it back into English. {Do not forget to convert the space character), a. b. c. d. He is a good student 2 + 2=4 I like Computer Science Binary numbers are GREAT

Answer (a) Message "he- is a good student" into ASCII Code Table of ASC'N codes represent the me Character 1! e Code 72 101 32

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 36
105 115 32 a 97 32 n 103 o 111 o .111 d 100 32 s 115 t 116 u 117 d 100 e 101 n 110 t 116 So the converted message into ASCII Codes is as follow: 72 101 32 105329732 103 111 111 10032 115 116117100101 110 116 If you convert back the above ASCII codes, you will get the message in ENGLISH again. "He is a good student" (b) Message . to ASCII CodeTable of ASCII cedes represent the message Character 2 + 2 = 4 Code 50 43 50 61 52 i s

So the converted message into ASCII Codes is as follow: 50435061 52 If you convert back the above ASCII codes, you will get the message in ENGLISH again. (c) Message "I like Computer Science" into ASCII CodeTable of ASCII codes represent the message Character I 1 i k e C o m p u t e r s c i e n c e Code 73 32 108 105 107 101 32 67 111 109 112 117 116 101 114 32 83 99 105 101 110 99 101

So the converted message into ASCII Codes is as follow: 73 32 108 105 107 101 3267 111 109 112 117 116 101 114328399 105 101 110V) 101 U'you comcrt back the above ASCII codes, you will get the message in ENGLISH ayain. "I like Computer Science"

Binary numbers
(d) Message "Binary numbers are GREAT" into ASCII Code Table of ASCII codes represent the message Character B i n a r y n u m b c r s a r e G R E A T Code 66 105 110 97 114 121 32 110 117 109 98 101 114 115 32 97 114 101 32 71 82 69 65 84

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 37
So the converted message into ASCII Codes is as follow: 66 105 110 97 114 12132 110 117 109 98 101 114115 32 97 114 101 3271 82 69 65 84 . . : If you convert back the above ASCII codes, you will get the message in ENGLISH again. "Binary numbers are GREAT Q27. Fill in the blanks. i._____ is raw facts of knowledge which is ready for processing, ii. Processed data is called ____.__. iii_______ ,_________,and_______are three methods of representing signed numbers. iv. ASCII stands for _______________ v. 1 0000 0100 0010 is equal to ______, . vi. 1 000 1000 010 is equal to ; '_ __ . vii. 2's complement of 0010 0011(2, is ______ viii. Computer manipulates everything in terms of ix. Muse oflwulecimnl numbers is _____ _. x. In end carrv is discarded. Answers No. i. ii. . iii. iv. V. vi. vii. viii. ix. X. Answer Data ' information signed magnitude, 1's complement, 2's complement American Standard Code for Information Interchange 1024 1024 1101 1101 Binarv numbers 16 complement

. ' Q28. Match the following. a. Data b. Processing d. American Standard Code for Information Interchange f 22(10) c Processed Data d. ASCII a. Raw facts to which no meaning is attached and is ready for processing c. 16,1ft, b. Processing means to manipulate, calculate, distribute or arrange f. 12(10) e 22(8) . Q29. Choose the Correct Answer: i. The hexadecimal number 10(I6, is equal to a. 10(10), b. IOO(100) c. 16(10) d. All of abovt ii. The hexadecimal number lOO(10) is equal to a. 0001 00000000(2) b. 256(10) c. 500(8) d. All ol'abou iii. 2's complement of 0101010 is a. 1010110 b. 1010101 c. 0000011 d. None of above iv. 1's complement of a negative binary number can be calculated by a. re\ersing the bits in the number b. reversing the bits in the number and adding one c. cannot be calculated d. both a and b v. (011)4752105 is a. numeric data b. alphanumeric data c. alphabetic data d both b and c Answers No. AHS No. Alls No. -4/I.V No. Am i. c ii. d iii. a IV. b Q30. Mark the following as True/False. i. It is impossible to build a computer (hat used decimal number system ii. 1234,,,,,= 110 II 100 iii. All computers in the world use ASCII. iv. 1 's and 2's complement methods works only for fixed numbers of bits. We cannot represent 256 using 8 bits, vi. There are total of 8 basic digits in octal number system. vii. ASCII is a 7-bil coding scheme. viii. Unicode is used to provide multilingual support in software. ix. BCD stands for Binary Coded Digits x. 'flie value of G represent 16 in hexadecimal number system. Answers No. Answer i F ii F iii F iv F v T vi T vii T viii T ix F x F

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 38
Chap 6

Boolean Algebra
Q1. State and prove the De Morgan's laws for Boolean Algebra. Answer Soloution (i): The complement of addition of two numbers is equal to ilie product of ll implements. If.v and^v are two Boolean variable, then x + y - x.y Proof: X y X y X+ y x+y x.y 0 0 1 1 0 1 1 0 1 1 0 1 0 0 ! 0 0 0 0 0 0 1 1 0 0 1 : 0 0 From the las two columns of the table. it is obvious that x = y = x - y Q4. Calculate the value of the following Boolean functions at the values of x,y and z. a. x.y + .Y, - + .Y, y for .x = 0, r - I and r- 0 b. (x+ v).x + (y + :) for.v--0, ,r = 1 and ; = 1 (b) x + 0 = x Solution Duality of the above expression x. 1 = x (c) x + x.y = x + y Solution Duality of the above expression x.x + y = x.y ''.' (d) Solution Duality of the above expression Q 6: Explain the following Logic gates and show their function by using a truth table. a. AND b. OR c. NOT Answer AND Gate The AND gate has two or more input signals but only one out signal. The functions of AND gate are shown in the truth table given below. Input Output x y x.y 0 0 0 0 0 0 1 0 0 1 1 1 OR Gate The OR. gate has two or more than two input signals. The functions of OR gate are shown in the following, truth table. Input . x y 0 0 0 1 1 0 1 1 Output x.y 0 1 1 1

OR Gate The NOT gate ib an inverter gate with only one input signal and one oul|Mi! signal 11 Input Output . x x 0 ] 1 0 Q8. Simplify the following Boolean functions using K-maps. a. f(x,y)=*x + x.y b. f (x,y,z)-x.y.z + x.y + x.y.z c. f(x,y,z) = x.z = x.z.y

Answer Step 1: .Represented the function in the form of a K-map. This is shown helow. 0 Step 2: Mark any group of two or four adjacent 1 as shown below. 0 0 I Step 3: Write simplified expression jbreach "roup. . The group mill terms are x.y and x as the value of x changes, so we can \srite the following expression for the group of min terms. x.y and x '= v Step 4: Write the final simplified form as a sum of products. f(x.y) = y (b) f(x,y,z) = x.y.z + x.y + x.y.z Solution: Step 1: Represent the function in the form of a K-map. This is shown below. X.y/ y / y / y 7 y * Y 0 1 i 0 x 0 1 . 0 0 Step 2: Mark any group of l*o or (bur adjacent 1 as shown bclo\v. S\->/ X^v. _ _ T 0 c5r^ ^]T> 0 \ 0 \\j i) (i The groups are Group I: x.y.: and x.y.z Group 2: x.y.z and x.y.z . Step 3: Write simplified expression for each group. As there are i\vo groups, so we write i min term corresponding to each I in the map. Group !: x.y.z and x.y.: , so simplified expression is y.z (.\ will vanish) Group 2: x.y.z and x.y.z , so simplified expression is x.z (y will vanish) S(cp 4: form as a sum of products. The iingrouped term will he added as it is. (c) f(x,ytz)=x.? + x.z.y Slcp 1: Represenl the function in the form of a K-map. This is shown below.

Write the final simplified

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 39
Slep 2: Mark any X^v. \ / \ / V,' \ 7. Y 0 0 1 0 X 0 0 1 0 group ot'i *o or four adjacent 1 as sliown elow. >< \"7 v / ^' \ 7 ^ I) 0 M i) \ 0 1) W 0 The group is Group: x.y.z and x.y.z Slep 3: Write simplified expression for group. As there is OIK' group, so urile min term corresponding to e:ich i in the map. Group: x.y.z.and x.y.z, so simplified expression is y.z (x will vanish) Step 4: Write the final simplified form as a sum of products, the ungrouped term will be added as it is. f(x,y,z)~y.: +x.y.z Q9. Fill in the blanks. 1. Commutative laws states that a+b is equal to ____. 2. By distributive law we know that ab-^-ac is equal to 3. A+0 is equal to 4. 0 is called the . 5. Boolean Algebra operates on ______, 6. In Boolean algebra the identity element with respect to dot (.) is 7. .Y + .Y is equal to ______. 8. is a very efficient way of solving Boolean functions. 9. .Y. v is equal to 10. In Boolean algebra standard product is called Answers No. Answer No. Answer 1. b+a 2. " a.(b+c) 3. A 4, additive identity 5. Binary numbers 6. 1 7. X 8. K-map 9. x + y 10. (x) minterm . Q10. Match the following: (a+b) Sum of products Minterms x.0=0 Maxterms Product of Sums .Y+l = l a.b Q11. Choose the correct answer. , 1. K-map is used to a. Evaluate the Boolean expression b. Simplify a Boolean expression c. Both a and b d. None of above 2. De Morgan's Law states that a. a(b + c) = ah + a.c d. none of above . A Boolean function with four variables will have a. 8 maxterms b. 16 maxterms c. 24 rnaxlerms d. 32 niaxterms , The ideinpotcnt law states that for Iwo variables \ and > a. .v + x.y - x + y and x.(x + y) = x b. x = x J. none of the above . The absorption law stales Mini for twu variables \ and y a. .V..V = x and y.y = y b. x.y = y.x c. x -t- .Y. Y = x + y and x.(x + y) = x d. none of llie above (NO. Am No. Aits No. Am No. AIIS No. Alls i. c 2. c 3. b 4. c 5. c

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 40
Chap 7 Computer Software
Q. 1 Describe: (a) System Software and (b) Application Software. Answer There arc two basic types of computer software: system software and application software. system software refers to the operating system and all utility programs that manage computer .ivos at a lou level. Applications software helps you perform a specific task, figuratively king, application software sits on top of system software. Without the s\slem software ,system utilities, the computer cannot run any application program. System Software When you turn im a computer, it goes through several steps to prepare itself for use. hrsi step is a self-lost. The computer identifies the devices that are attached to it. ;iu^ liie amount of memory available, and does a quick check to see \\hether the iiiory is functioning properly. This routine is initiated by a part of the system mare located in read-only memory (ROM),-a chip that contains brief, permanent iruclions for getting the computer started. Next the computer looks in diskette drive and ihen on the hard drive for a special iam called an operating system. The operating system tells the computer how interaet with the user and rum to use devices such as the disk drives, keyboard, and ::iior. When il find tlvj operating system, the compule-r loads that program into memory. Because the operating system is needed to control the computer's most basic .unions, it continues to run until the computer is turned off. After the computer finds and runs the operating system, it is ready to accept comands from an input deviceusually the keyboard or a mouse. At this point, the ..: can issue commands lo the computer. A command might, for example, list the ji.uns stored on the computer's disk or make the computer run one of these r.ims. 1-igure 20-2 shows the process the computer goes through at startup. ! personal computers run one of six popular operating systems written by various :\\are companies: Microsoft Windows 2000, Microsoft Windows XP, the Macintosh OS, MS-DOS. UNIX or LINUX. Aplication Software Apiitalion software is widely referred to as productivity software. Application Software is comprised of programs designed for an end user. Some of the more :nnonly used application programs are word processors, database systems. presentation systems, spreadsheet programs, and desktop publishing programs. Some oilier application categories are as follows: > > > Education, home, and personal softwarereference, entertainment, personal finance, calenders, e-mail, browsers. Multimedia softwareauthoring, animation, music, video and sound capturing and editing, virtual reality, Web site development Workgroup computing softwarecalendars and scheduling, e-mail, browsers, electronic conferencing, project management.

Q 2: What is DOS? How is it different from Windows? Answer Introduction to DOS , DOS stands for "Disk Operating System". It is a program, which acts as an interface between the user and the computer hardware. DOS allows manipulation of tiles and programs hj interpreting and processing the commands typed by the user. The DOS software is automatically copied from a floppy disk or iho hard drive into the computer's memory whenever the computer is turned on or booted (made a computer ready to be used by pulling in its instructions). DOS is not an application package that you star and then exit when done. This is an operating system runs from the moment you (urn the computer on until you turn the machine off. Difference between DOS and Windows DOS provides a command driven interface to the users. In a command driven interface the users can use the keyboard to type the command on the command prompt.. Mostly the DOS prompt shows the present working directory. DOS interprets all commands with reference to the present working direciory until explicitly stated. The DOS prompt on a typical computer is shown below. This prompt shows that the present working directory is C:\TOOLS. In desktop computers Microsoft Windows is the most commonly used operating system and DOS is no more in common use. Following are some features oi" Windows operating system that DOS operating does not provide. 1. Graphical interface 2. Programs run faster than with DOS 3. Includes support for network inn. which allows a group ol'luo more computers 10 he linked 4. Used Plug and Play technology, the goal of which is 10 just plug in a new device and immediately be able to use it, without complicated setup. 5. Support for the Universal Serial Bus that is usH "i easily add and remove devices on the computer One of the most recent update is Windows XP, which provides increased stability and improved device recognition. Even though the Windows versions have changed, some features remain consistent, such as the Start menu, taskbar, and desktop. Q3. How many types of commands are available in DOS? Discuss briefly. Answer When the computer system is booted, only a part of the DOS programs gets loaded onto the memory of the computer. The remaining programs remain stored on the disk and get loaded only when they have to be used. DOS recognizes the number of commands that allow you to cont 'ol the computer and the devices attached to it. A DOS command can only be entered at the DOS prompt. To enter a DOS command, type it in after the prompt. DOS is not case sensitive. You can type commands in lower or upper case. DOS will convert everything to upper case before it executes it, And to put the command into action. we have to press Enter key. There are two types DOS commands, internal and external. Internal Commands Internal commands are a part of the DOS program COMMAND.COM, and are loaded into memory when you boot your computer. These commands are needed to be used most often. Some examples of internal DOS commands are: dir. els, ren. md, rd. cd, del. External Commands External commands are programs, which exist on the DOS disk or the hard disk. They are run when you type their name on the command line. For example, typing FORMAT at the DOS prompt results in a program called FORMAT.COM being executed. External commands are not frequently used and DOS saves valuable memon space by loading them only when required. Q4. What is a language translator? Describe its types briefly. Answer Language translator is another very important category of system software and has played a very important role in the development of general-purpose computers. There are three main types of language translators, assemblers, compilers and interpreters. Assembler Assembler is a program that converts an assembly language program into machine instructions. In the early days of computes, the program had to be written in machine code instructions using binary codes. So writing programs was a very difficult and time-consuming task. It was also prone to errors and removing these errors was another difficult task. Assembly language was developed to make the job easier. Assembly language allowed the use of symbolic codes for machine instructions; these codes are called mnemonics (pronounced as Ne-Monics). Obviously, writing programs in Assembly Language is much easier than writing instructions in binary. An Assembly language provides one instruction for each machine instruction. Compiler A compiler is a program that translates a source program (written in some high-level programming language) into machine code as a whole.

Uses Of Switches
The generated machine code can be later executed. A compiler first reads ihc program before executing it. The errors in the code are pointed out and then the ino language code is generated. This output is known as object program. The

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 41
i program executes very fast as it is directly understandable by the computer. > most of the languages use compiler?. Once a program has been translated into .:u: code it can be loaded into the machine and can be executed. This process of :ion is shown in the figure below.

High Level Language Programe (Source Code)

COMPILER

Machine Language Program (Object Code)

As shown in tlic above figure, the high level prograi \\\ program is called the object code. interpreter interpreter looks at each line of the source program, decides what that line means, check it for possible errors and then executes that line. If one of the lines is executed repeatedly, it must be scanned and analyzed each time greatly slowing down the solution of the problem at hand. Thus interpreter executes code line by line. If an error is encountered, the execution is stopped at that .i.iJ L,;,sr is notified of the line where the error occurred. After the error has been removed. the user has to run the whole program from the beginning. This while .L-S slows down the performance of the interpreter as compared to the compiler most of the languages used for writing uliort scripts of code use interpreters. Q 5: What are switches and wildcards? Discuss their uses in DOS with examples. Answer Use of Switches Switches are used to modify the operation of the command. It provides additional and useful features of a command. The Switches used_\yith the_DlR command are given in the following table Switch /p /w /s /b /I Purpose Displays one screen of directory list at a time. Displays the listing in \vide_format. Lists every occurrence of a file or directory in the specified directory and all of its subdirectories. This switch can be used to search a file. List each directory name or filename, one per tine. This switch displays no heading information and no summary. Displays unsorted directory names and filgnames in lowercase.

Use of Wildcards If you want to carry out a task for a group of files whose names have something in common.You can use wildcard characters to specify groups of files. DOS recognize two wildcard characters: asterisk (*) represents one or more characters that a group of files has in common: and the question mark (?) represents a single character that a group of files I common. You can use wildcards to replace all or part of a file's name or its extension. The following table shows examples of wildcards: Q6. Define operating system. List important functions of operating system. Answer When urn turn on a computer, the machine looks lor an operating system to "boof (pull itself up by Us bootstraps) before it runs any other programs. Once the OS suit up. ii takes charge until you shut down the computer. The operating system perform the following functions: Provides the instructions to display the on screen elements with which you intera) Collectively, these elements are known as the user interface Loads programs (such as word processing, and spreadsheet programs) into ih computer's memory so you can use them. Coordinates how programs work with the CPU (central processing unit), keyboan mouse, printer, and other hardware as well as with other Software. Manages the way information is stored on and retrieved disks. ' Also, the functionalilv of the OS can be extended with the addition of utility Q7. What is the difference between .com and .exe programs. Answer Command I-'iles and Uxeailable Files are identified by their extensions, which ure .com and .exe respectively. Txecutable Tiles are in executable form i.e. these are ready to run on the computer These files contain instructions in machine language whereas Command Files conla DOS commands. Q8. What is a directory, a volume label, and drive name.

Amswer A Directory is a container. It ca\i be filled with several different types of items, which in represent files, applications, or commands. A directory can contain other rectories, which are termed as "sub-directories. The root directory C:\ is the main rectory. All other directories are located within this directory. he volume label is used to identify the disk. The volume 'label can be a maximum of i characters (including spaced). DOS refers to the first floppy disk drive on a computer as the A: drive. If there is a seccond floppy drive, it is called the B: drive and if there is a hard disk, it is called the C: drive. These letters with colon are called drive name. 9. How do launch th6 command processor under Windows XP? Answer 0 activate the DOS prompt (command processor) under Windows XP follow the steps below: > Click on the Start button shown on the desktop of your computer. > Choose the Run command by using the mouse or the keyboard. A dialog box will be displayed on the screen. > Type "cmd" in the Open drop down text box and press Enter key. The command, processor window will be displayed where you can type any DOS command. Q10.: Describe the (i) path (ii) parent directory (iii) subdirectory following terms:

Answer Path It is a hierarchy of directories, each preceded by a \ (back slash), from the Root directory of the disk (represented by the first \) to the directory containing the directory or file on which the command is to be executed, e.g. C:\faculty\dep_ment\admin" . Parent Directory I is upward directory of current directory. Sub directory :is a child directory, which creates under the main directory or parent directory.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 42
Q11. How do you: (i) list all text files in subdirectory (ii) list all files with name accounts under directory A: b:\reports

Answer To list all text files in subdirectory b:\reports\ use the following command at the prompt: DIR B:\REPORTS\*.TXT To list all files with name accounts under directory A: use the following command the prompt: DIR A:\ACCOUNTS.* Q12. Suppose you are working in directory "c:\test". How would you perforr the following: (i) create a new directory named (ii) change directory to C: by changing to parent directory twice (iii)delete file named sample3.doc under the "test" directory (iv) remove the "test" directory after deleting files sample2.txt i sample3.doc Answer To create a new directory named "user, use the following command at the command prompt: MD USER To change directory to C: by changing to parent directory twice.'use the following commands at the command prompt: CDC:\ To delete file named "sample3.doc" under the "test" directory, use the following command at the command prompt: DEL \TEST\SAMPLE3.DOC To remove the "test" director)' after deleting files "sample2.txt" and "sample3.doc". use the following commands at the command prompt: DEL \ TEST \SAMPLE2.TXT DEL \ TEST \SAMPLE3.DOC RD TEST

Dos. Commands
Q13. Write DOS command: (i) To view current date (ii) change date to new date 2004-06-25 (iii)change date back to 2004-06-16 in one statement. Answer To view current date, use the following command at the command prompt: DATE After pressing the enter key the computer will show the current date on the monitor screen. . To change date to new date 2004-06-25, use the-foliowing commands at the command prompt: DATE When you press the enter key, the computer will show the current date and prompt you to enter the new date. Type the required date in mm-dd-yy format and press enter key. To change date back to 2004-06-16 in one statement, use the following command at the command prompt: DATE 06-16-2004 Q14 Write DOS command: (i) To list all files under "test" directory when you are under C:\ (ii) To list all files of name "sample" under the "test" directory (iii)To list all files of extension .doc under the "test" directory Answer To list all files of "test" directory under C:\, use the following command at the command prompt: DIR C:\TEST To list all files of name "sample" under the "test" directory, use the following command at the command prompt: DIR \TEST\SAMPLE. To list all files of extension .doc under the "test" directory, use the following command at the command prompt: DIR \TEST\*.DOC Q15. Write DOS commands to erase: (i) sample.cloc file under C: (ii) sample4.doc file under "test" directory (iii)all files under "test" directory Answer To erase file "sample.doc" under C:, use the following command at '.lie command prompt: DEL C:\SAMPLE.DOC To erase file"sample4.doc" under "lest" direclory. use the following command at the command prompt: DEL \TESTVSAMPLE4.DOC To erase all files under "lesl" directory, use the following command at the command prompt: DEL \TEST\V Q16. Make "test2" directory under subdirectory "test" directory when you are under C:\. Answer Use the following command at the command prompt: MD \TEST\TEST2 Q17. Explain the following commands: (i) format (ii) exit (iii)find

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 43
(iv) pause (v) print Answer FORMAT A disk must be formatted for a particular operating system before il can be read Irom or written to by thai operating system. FORMAT command creates a new root directory and Hie allocation table on the disk, il also destroys an\ thing already on ilk-disk . EXIT This command helps to exit from command processor window to back to windows desktop, FIND This command helps to locate file or files on different locations of the disk dri\c. PAUSE It provides pauses with using of any command when output of command makes screen rows full. PRINT This command sends output of file to printer. Q18. Change prompt to: (a) current time (b) version number (c) default drive (d) < character and > character. Answer Use the following command at the command prompt: PROMPT $L$T$V$P$G Q19. Write down the procedure for writing autoexec.bat file. Answer AUTOEXEC.BAT is a batch file which is often found on the boot disk. DOS accesses this file in the last stage of booting (i.e. starting) your system and executes each command it contains. To create the "autoexec.bat" file, use the following command at the command prompt: COPYCONAUTOEXEC.BAT Type commands which you want to run at startup of computer. Press F6 function key from the keyboard and press Enter to save autoexec.bat to the disk drive. Q20. Explain sort and sys commands. Answer SORT This command sorts a text file input to it into alphabetical order. SYS If you already have a formatted disk which you want lo be able to use as a System (or Boot) disk, you can install the 3 essential system files MSDOS.SYS, IO.SYS AND COMMAND.CGM to it using this command. Example: Make the diskette in drive A a system disk by installing the system files on the hard disk to it. SYSC:A: Q21. Explain type, volume and xcopy commands. Answer TYPE This command is used to displays the contents of a text file on the screen. The original file is not modified when we use this command. The syntax of this command is as follows: TYPE |DRIVE:]|PATHI(FILENAME If we display a binary file (e.g. executable files) using TYPE command we will see strange characters on the screen. VOL This command displays the disk volume label and serial number, if they exist. The general syntax of this command is as follows: VOL |DRIVE:| Example: VOL D: XCOPY This command is used to copy directories, their subdirectories, and files (except hidden and system files). We know that the copy command cannot be used for copying the subdirectories so XCOPY command is very useful. Also this command has some useful switches for taking backup of the data. This command is provided in the form of an executable file XCOPY.EXE. Example: XCOPY C:\*.* A: Q22. Practice all important DOS commands using Windows Command Window. Answer See Question 23 and 24. Q23. Practice all important internal DOS commands using Windows Command Window. Answer CD To change subdirectory to "test", use the following command at the command prompt: CD \TEST To change directory to parent directory, use the following command: CD.. To change subdirectory to root, use the following command: CD\

Commands
MD To make subdirectory "test", use the following command at the command prompt: MDTEST To make subdirectory "test2" in the directory "test", use the following command: MD \TEST\TEST2 RD To REMOVE subdirectory "test", use the fallowing command at the command prompt: RDTEST

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 44
DIR To see all files in subdirectory "test", use the following command: DIR \TEST To see all files with extension .exe, use the following command: DIR*.EXE To see all files with starting character "S" and extension .txt, use the following command: DIRS*.TXT To view all files in the present working directory, which have a four-character name you can use the following DOS command. DIR????.* To view all files in the present working directory, which have a X as third character of the filename the following command can be used. DIR??X*.* Following are the switches of DIR command: Switch IP /W Purpose Displays one screen of directory list at a time Displays the listing in wide format

Displays only the names of those directories and files with the attributes you specify. If you do not use this witch, DIR displays the names of all files except hidden and system files. If \ve use this switch without specifying any attributes, DIR displays the names of all files including hidden and system files. We can specify the following attributes of the file: A Files having archive variable set are shown H Only hidden files are shown . R Read only files are shown by using this option S System files are shown using this option

/A{{:}{atributes}

To view the current path settings, use the following command: PATH VOL To display the disk volume lahel and serial number, use the following command: VOL VER To view the version of MS-DOS, use the following command: VER Q24. Practice all important external DOS commands using Windows Command Window.

Answer ATTRIB To view the attributes of any file, use me following command: ATTRIB MYFILE.TXT To set the attribute of any file to read-only, use the following command: ATTRIB +R MYFILE.TXT To set the attributes of any file to hidden and system, use the following command: ATTRIB +S +H MYFILE.TXT To remove the read-only, hidden and system attributes from any file, use the following command: ATTRIB -R -H -S MYFILE.TXT To set all files in the current directory to read-only, use the following command: ATTRIB +R*.* Following are the switches of ATTRIB command: Switch Purpose +R Sets the read-only file attribute -R Clears the read-only file attribute +A Sets the archive file attribute -A Clears the archive file attribute i-S Sets the files as a system file -S Clears the system file attribute +H Sets the file as a hidden file -H Clears the hidden file attribute FORMAT To format a new (loppy disk in drive A, use the following command: FORMAT A: To perform a quick format on a previously formatted disk in drive A, use the following command: FORMAT A:/Q To format a floppy disk in drive A, with unconditional format, use the following command: FORMAT A:7U To format a floppy disk in drive A, and assign to it the volume label "DATA", use the following command: FORMAT A: /V:DATA DISKCOPY Use the following command to copy the disk in drive A onto a disk in drive B: DISKCOPY A: B: EDIT To edit a text file with an editor, use the following command: EDIT MYFILE.TXT 'SYS To copy the MS-DOS system files and command interpreter from the disk in the current drive to a disk in drive A. type the following command: SYS A: DELTREE To delete the TEMP directory on drive C including all files and subdirectories of the TEMP directory, enter the following at the command at the prompt: DELTREE C:\TEMP T,o delete the TEMP directory on drive C, and TEMPI directory on drive D, including all files and subdirectories of the TEMP and TEMPI directory, type the following at the command prompt: , DELTREE C:\TEMP D:\TEMP1 To delete all directories and files have T as the first name of their name you can use the following command: DELTREE T*.* XOPY To copy all the files and subdirectories (including any empty subdirectories) from the present working directory into disk in drive A, you can use the following command:

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 45
XCOPY *.* A:/S To perform a quick format on a previously formatted disk in drive A, use the following command: FORMAT A:/Q To format a floppy disk in drive A, with unconditional format, use the following command: FORMAT A:7U To format a floppy disk in drive A, and assign to it the volume label "DATA", use the following command: FORMAT A: /V:DATA DISKCOPY Use the following command to copy the disk in drive A onto a disk in drive B: DISKCOPY A: B: EDIT To edit a text file with an editor, use the following command: EDIT MYFILE.TXT 'SYS To copy the MS-DOS system files and command interpreter from the disk in the current drive to a disk in drive A. type the following command: SYS A: DELTREE To delete the TEMP directory on drive C including all files and subdirectories of the TEMP directory, enter the following at the command at the prompt: DELTREE C:\TEMP T,o delete the TEMP directory on drive C, and TEMPI directory on drive D, including all files and subdirectories of the TEMP and TEMPI directory, type the following at the command prompt: , DELTREE C:\TEMP D:\TEMP1 To delete all directories and files have T as the first name of their name you can use the following command: DELTREE T*.* XOPY To copy all the files and subdirectories (including any empty subdirectories) from the present working directory into disk in drive A, you can use the following command: XCOPY *.* A:/S Following are the switchesof XCOPY command: Switch Purpose /Y Indicates that you want XCOPY to replace existing file(s) without prompir. you forconfirmation. /A Used to copyjmly sourcejiles thatjiave their archive file attributes set. /M Used to copy source files that have their archive file attributes set. Unlikeilu /A switch, the /M switch turns off archive file attributes in (he files specified in source. /D:DATE Used to copy only those source files modified on or after the specified dak-Used to copy non-empty directories and subdirectories. /S Used to copy all directories and subdirectories even if the directories or subdirectories are_gmply. /E This switch is used to verily each file as it is written to the destination tile i make sure thai the destination f iles are identical to the source files. CHKDSK To check your drive C for errors or to find out how much data is stored on drive C and much space is still free, enter the following command on the command prompt: CHKDSK C: TREE To display the folder structure of a drive or path, use the following command: TREE C: Q25. Discuss in the class room the salient points of MS-DOS. Answer DOS is a single user operating system and has been very popular on microcomputers up to mid 1990s, DOS was designed by IBM (International Business Machines). DOS resides on disk and controls the overall functioning of the computer. It performs the following major tasks: Control input and output devices Execute user programs Manage system resources Provide user interface Memory management DOS does not provide networking features. To connect a computer running on DOS, some third party networking software should be installed. QZ6. Discuss >" the class different DOS command and their switches? Answer See question 24 and 25. Q27. Fill in the blanks: 1. _______ and _ convert a high-level program into a machine progra _ provides the command line interface to the users. 3. DIR/P command is used to _____. 4. _______ command can be used to uJeit all .EXI: tiles from a directory. 5. _______ is an external I^OS command and _______ is an internal command. 6. DOS stands for _______. 7. System software are necessary for the _______ use of computer. 8. _______ can be used to make a file read-only. 9. __ __ command can delete folders 2nd all subfolders and fiLs within it. itch is used with FORMAT command to conditionally format a DOS command. ! No. j Answer __ ! compiler, interpreter : DOS i 3. ! List files and directories page wise 4. , del *.exe 5. DKLTREK, DIR 6. Disk Operating System 7. Effective 8. ATTR1B command q. DELTREE 10. /u 1 II. External 1 Q28. Match the following: Answers a. ' DIR d. Interpreter b. 1 A TTR1B e. Compiler c. Operating System a. View a directory 1 d. Line bv line translation b. Make a file read-only c. High-level language c. Memory management Q29. Choose the correct answer: 1, XCOFY

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 46
a. Can copy subfolders as well b. Is an external DOS command c. Both a and b d. None of above

2. Windows a. I las a CUM h. Is nol an operating system c. 3. DOS a. Is an operating system b. Is nol an operating system c. Has graphical user interface d. None ofabove 4. a.

Is a compiler d.

All of above

Interpreter translate The assembly language program line by line b

The source program fine by line c.

The source program as a whole d.

None nf the above

5. dir ?|ass.* command u. will list files whose last four characters are "lass" with any extension b will lisi all flics starting with any character and with any extension c. will list files whose name starts with any character bin lasl four characters "lass" d. none of llie above 6. rmdir command a. make.i directory b. removes directory c. copies tile d. none of I he above 7. prompt command a. confirms deletion of file b. changes prompt c. searches a directory d. none of llie above 8. dir*.* a. lisl all files of extension .doc b. list all files c. lisl all files of name sample d. none of the above Answers : No. Alls No. Alls No. Am c -> a 3. a 4. b ; 6. h 7. b- 8. c

No. i 5.

Ans c

\ No.

Am

Q30. Mark the following as TRUE/FALSE. 1. An Assembler converts a high level language program into machine language 2. MD command can be used to delete directories as well 3. XCOPY/s *.* D: command copies all the files from the present directory to D:\COPY directory. 4. FORMAT A: command will delete all existing data from the A: drive and prepare it for storing data. 5. DOS external commands resides in COMMAND.COM 6. D1SKCOPY cannot copy files from hard disk. 7. Batch file contain multiple DOS commands to be executed 8. Time command can be used to change the current time 9. DELTREE is an internal DOS command 10. FORMAT command cannot format an already formatted disk Answers No, Ans 1. F 2. 6. T 7. No. Ans No. Ans No. Ans F 3., T. . 4. T 5. F T 8. T 9. F 10. F No. iAns

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 47
Chap 8

1. 2. 3.

Select an option. Click on OK button. The system will save necessary files to the disk and then take the requested action'

06. What is a Windows Explorer? How can we start Windows Explorer? Answer Windows Explorer is a program, which allows you to view all of your folders and files in those folders. It is divided into two panes. On the left side are the drives and folders. The right pane shows the files and subfolders of the folder or drive you have chosen from ihe left pane. 1. Select an option. 2. Click on OK button. 3. The system will save necessary files to the disk and then take the requested action' 06. What is a Windows Explorer? How can we start Windows Explorer? Answer Windows Explorer is a program, which allows you to view all of your folders and files in those folders. It is divided into two panes. On the left side are the drives and folders. The right pane shows the files and subfolders of the folder or drive you have chosen from ihe left pane.

Fig: Windows Explorer Steps to start Windows Explorer 1. Click on the Start button at bottom left comer of screen. 2. Click on Programs. 3. Select Windows Explorer OR 1. Double click on My Computer icon from the desktop. The dialog box will be displayed 2. Right-click on any drive icon. A shortcut menu will be displayed. 3. Select Explorer option. The Windows Explorer window will be displayed. Q7. What is the use of Recycle Bin? Answer All the deleted files from the hard disk goes to the recycle bin. When you delete a file, folder, or some other item, you click on it once and press delete key or drag it to. recycle bin icon on the desktop. If you prefer to use menus , you can right click on a files icon and then choose the delete Command from its shortcut menu. Any file you delete from the hard disk goes straight to the recycle bin, which is actually a special Opening Recycle Bin To open the recycle bin follow the following steps 1. Double click recycle bin icon 2. The deleted files appears in the recycle bin folder. 3. If you want to remove these deleted files permanently click empt\ recu.; bin button. All the deleted files permanently deleted in this way. 4. If you want -to restore these all files click restore all button. In iliis v the deleted files will be restored. You can also restore selected files.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 48

Q8. What is Control Panel? Name three different options of control pane and tasks performed them. Answer Control panel With the control panel, you can change the system defaults or properties of\, computer. You can customize the way your mouse and keyboard or any other <to . work. Choose the printer and customize the setting of the printer. Changing : desktop color schemes, background patterns and screen saver. The control pan window contains icons that you select depending on the properties you wanl to \u or edit. The settings are reloaded each time you run windows and stay in effect un you change them again with the control panel. Opening the control panel To open the control panel follow the following steps . ' 1. Click start button 2. Choose settings 3. Choose control panel The contra 1 panel window opens. It may look like the following window

Add /Re move Programs To change or remove a program, follow the following instructions 1. Open Add/Remove Programs in Control Panel. 2. Click Change or Remove Programs, then click the program you want to change or remove. 3. Click the appropriate button: i. To change a program, click Change/Remove or Change. ii. To remove a program, click Change/Remove or Remove. 4. When you click Change/Remove, some programs may be removed without prompting

Keyboard To change the way your keyboard responds, follow the following steps 1. Open Keyboard in Control Panel. 2. To open a Control Panel item, click Start, point to Settings, click Control Panel, and then double-click the keyboard icon 3. Make changes as follows i. To ailjusl how much time elapses before characters repeat when you hold down 3 key, drag the Repeat delay slider, ii. To adjusl how quickly characters repeal when you hold down a kej, drag the Repeat rate slider.

Display To set or change the background of your desktop, follow the following steps 1. Open Display in Control Panel. 2. On ilie Background tab, select a background picture from the wallpaper list. In the Piclure Display list, click Center, Tile, or Stretch 3. Background piciures may have the following file extensions: .bmp, .gif. jpg, .dib, .him. 4. You can sel an .him document as your wallpaper by saving the document to your hard drive. On the Background tab, click Browse to find your saved document and set it as your wallpaper. 5. If you choose an .him document as your background picture, the Center. Tile, ;md Stretch options are unavailable.

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

9th Class 49

Q9. Write a note on computer virus? Answer Computer Virus A computer virus may be a program or a set of'programs thai can cause extensive damage to your computer system. This code is attached to some pan of the normal computer operating system or computer program- Instructions in this code tell the computer to perform some task, This task, is often a destructive one, sucli as deleting important information or crashing the hard disk. However, there are other viruses that may only slow down your computer or do no serious damage. Some viruses have been known to do nothing more than put a larye happy face on your computer screen. Q10. What are the benefits of using anti-virus programs? Answer Anti-Virus Programs Anti-virus is software that is sued to detect and remove a virus on a computer system. You can stop viruses before they enter your computer. You can do this by using a good virus protection program i.e. anti-virus software, it will check all files for viruses. Once installed, an anti-virus program can be set to work in the background. It will check all files before they enter your computer and will alert you if a. virus is detected before it contaminates your system. If a virus is detected, your anti-virus program uill quarantine or eliminate it so that it cannot harm your computer. Be very careful to use a virus protection se a Mac, use a virus protections program made especially for Macintosh computers. |f you use Windows 98, or Windows XP, select a program that was written Decifically for your operating system. Don't try to use a virus protection program Ihat was written for Windows 95 on Windows XP machine; this will cause unstable (behaviour and may cause your computer to crash or malfunctions. viruses are written everyday. Companies like McAfeem Symantec, and Panda software are constantly expecting new viruses and updating their anti-virus software Itools. Q11. Fill in the blanks. i. Windows dominates the personal computer world, running almost on all personal computers. ii. in the filename phonenumbers.txt, the part "phonenumbers" ts the _ of the file. % of of the file and ".txt" is the iii. When you delete an object, Windows sends it to the browser and File Manager for Windows. acts as a directory acts as a directory browser and File Manager for Windows. iv. ____ v. Windows places the deleted files and folders in _______. vi. ____. is just a link to the original file/folder or an application. vn. _____ viii. Windows is a(n) can seriously damage the computer system. ix. A(n) is a software that is used to remove the viruses from the system. x. To add or remove hardware, you must select an option from Answers No. Answer No. Answer I. 90 2_ Name, Extension > .). Recycle Bin 4. Windows Explorer 5. Recycle Bin 6. Shortcut 7. i Virus 8. Operating System 9. Antivirus 10. Control Panel Q12. Mark the following as TRUE/FALSE. i. A Network is a group of Computers'connected to each other to share available resources such as storage and printers. ii. Windows do not provides online help. iii. Multitasking allows the user to activate and accomplish more than one task at a time, iv. Folders are used to organize the data stored on your drive. v. Icons help you to remember filenames in Windows. vi. The Internet Explorer browser is what you will use to access the Internet and the Worl Wide Web. vii. Windows is just a GUI, not an operating system. viii. Shift + Ctrl + Del command sequence is recognized only by Windows. ix. Contents of Recycle Bin can be restored to. x. NORTON anti-virus software can detect all viruses in the computer. Answers i_No^ Ans No. Ans No. Ans No. .Ans J No. ! Ans T ii. F in. T 1 iv. T v. F NT T VII. F viii. | F | ix. F X. F Q13. Choose the correct answer. the gateway of accessing most of the functionality available in the c. Start Button d. Mouse Application computer loaded with Windows. a. Taskhar b. l-oldcrs ii. Control Pant-1 allows you to customize which of the following feature. a. Appearance b. Themes c. Printers d. Other Hardware e. All of the above iii. Computer virus is simply a a. A disease b.Set of computer instructions or computer code c. Ty.pe of bacteria d.Hardware component e. None of the above iv. Klezisa a. Game name b. Hardware Component c. Virus name d. Person name e. None of the above v. Good Times was a a. Virus b. Anti-virus c. Fake news about the existence of virus d. None of the above Answers

Muhammad Rizwan Lateef (MS-IT)

FFMS Naushehra (Soon)

Você também pode gostar