Page 1 :
Understanding, Computer Working, , 1, Learning Objectives, How Does Computer Understand?, , Interpreters and Compilers, , Machine Language, , Binary Number System, , Understanding the Concept of 0 and 1, , Conversion of Decimal Number into Binary Number, , Assembly Language, , Conversion of Binary Number into Decimal Number, , High Level Languages, , Understanding Software and its Types, , Once the power is turned ON, a person who uses a computer on regular basis may not think, how the computer actually works. As long as Microsoft Windows keep popping up menus,, the user is quite content to work on the task in hand without knowing what goes behind the, scene. But when you learn how computer works, you'll realize that this machine is really an, engineering marvel., , How Does Computer Understand?, This chapter introduces the basic concept of, what the computer understands and how it, does this. We know that a computer cannot do, anything on its own. We give the instructions to, the computer to perform a particular task that, must be written in some computer language., Computer works with languages, that help us, to communicate with it., , Info, • In computer science, human languages are known as natural languages., • T, he method of human communication, either spoken or written, consist of use of words in a, structured and conventional way., , 5
Page 2 :
Computer Languages, , I can do, ANYTHING, you tell me to..., , Any language that forms a means of communication for the, user with the computer is termed as a computer language. It, is also called programming language. The types of computer, languages that have evolved over the years are:, • Machine language, , • High-level languages, , • Assembly language, , ... provide, you speak my, language, , Machine Language, , We communicate with computer in English language, which is converted by the computer, itself into machine language. This language is a combination of 0's and 1's. '0' represents the, OFF state and '1' represents the ON state of the current. This is called the Binary Code. We, understand through words and in computer a word is formed of bytes. Bytes are formed, from 0’s and 1’s that represent bits. A combination of 0's and 1's when are 8 (eight) in, number like 01011010 (8 bits), result in the formation of one byte., , Microprocessor, , Inputs, , Printer, , 0011111001100011, 1101010101011001, 0011011010000011, 1101000111100000, 1001011111100001, 0010010110001110, 1110110100100010, , Outputs, , Camera, , Mouse, , Keyboard, , 8 Bits =1 Byte, , Monitor, , Using bits and bytes in different combinations to represent a code is known as programming, in machine language. These codes help the computer to understand instructions., Advantages of Machine Language:, • It is directly understood by the computer., • It requires no translator to translate the, code., • It makes fast and efficient use of the, computer., 6 Brainy Gigabyte+ 7, , Disadvantages of Machine Language:, • It is machine dependent i.e. it differs, from computer to computer., • It is difficult to program and write., • It is prone to errors., • It is difficult to modify.
Page 3 :
?, , Do You Know, , Augusta Ada King commonly known as Ada Lovelace is regarded as the world's first lady computer, programmer. She wrote notes for early mechanical computer developed by Charles Babbage., , Understanding the Concept of 0 & 1, The memory chips inside the computer are divided into, Info, thousands of tiny compartments called bits. Each bit has an, A set of four(4) bits is called, electronic switch or gate. ON means the gate is open and, NIBBLE and eight(8) bits is, allows electricity to go through. The computer reads ON or, called a byte., OPEN switches as a number ‘1’. Closed gates are OFF because, the electricity is blocked and cannot go through. The computer reads OFF bits as 0. By, grouping these bits together a series of commands are formed that result in data to be input., Here's an example of a Binary Code in action:, When you type the letter A on your keyboard, electronic signals are sent from the keyboard, , A, , 0, , 1 0, 00, , A, , 00 1, , Binary Code, , Electronic Signals, , to the CPU. The CPU turns the signals into binary code. Then, the computer reads the code, and sends it to the monitor and displays the letter A., , Assembly Language, A little step ahead of machine language was the origin of Assembly language. It was, introduced to ease the programmer's burden of remembering the combinations of 0's and, 1's. This language has mnemonics to represent the operation code. A mnemonic is a short, name provided to every operation or word such as SUM for addition, MUL for multiplication., As the computer understands only machine language, the source code written in assembly, language has to be converted to, machine language. To do this a, 1100 1010 1011 0011, software program called Assembler, 1100 1010 1011 0011, 1100 1010 1011 0011, is used. The program written by a, 1100 1010 1011 0011, 1100 1010 1011 0011, programmer in assembly language, 1100 1010 1011 0011, Assembler, is called a Source program., Assembly Language, Machine Code, Assembler converts this program, Source Program, Object Program, into machine language, which is, Assembler, then called as the Object program., //1`15:, MOV R3, #15, STR R3. [R1L #-8], , //J.25:, MOV R3, #25, STR R3.[R1L.#-12], , //1`1-J:, LDR R2, [R1L #-8], LDR R3. [R1L #-12], ADD R3. R2, R3, STR R3, [R1L, #-8], , 7
Page 4 :
Advantages of Assembly Language:, , • It is easy to understand and use as, compared to machine language., • It is easy to locate and correct errors., , Disadvantages Assembly Language:, • It is machine dependent., , • Difficult to remember the syntax., , • It is easy to modify., , Definition, • M, achine language is a collection of binary digits or bits that the computer reads and interprets. It is, the only language a computer is capable of understanding., • A, ssembly language implements a symbolic representation of the machine code needed to program a, given CPU architecture., , High Level Languages (HLL’s), These are the most accepted computer languages, due to their simplicity and uniformity of being, used with a wide variety of computers. HLL is just, an English like language including a syntax like, we use grammar to make proper sentences. HLL’s, have been designed for different tasks such as, Cobol for business purposes, Fortran for scientific, applications, C++ for system and application, software development etc., A program written in HLL cannot be executed directly, it needs to be converted to machine, code. For this conversation a Translator program is required. There are two types of, Translators., , Interpreters, , Interpreters translate one source instruction, into object code and the computer, immediately checks and executes it before, checking the next instruction i.e. line by line, check., , Compilers, , The compilers convert the entire source, program into object program i.e. machine, language program in a single go. If the, program is error free, it can be executed to, display the result., , Advantages of High Level Languages:, , Disadvantages of High Level Languages:, , • It is machine independent language., , • High level programs are comparatively, slower than low level programs., , • They are easy to write, debug and, maintain., • Easy to learn., 8 Brainy Gigabyte+ 7, , • It takes additional translation time to, translate source code to machine code.
Page 5 :
Examples of High Level Languages:, , Logo, , Logo is a language of graphics orientation. Seymour Peter in USA, designed it. This language is designed for the children to learn and give, instructions to the computer to draw. Most of the commands in logo are, used to draw figures or shapes., , Basic, , Basic stands for Beginners All Purpose Symbolic Instruction Code developed by Kemeny, and Thomas Kurtz in 1964. This language is popular among the beginners because of its, simple English commands and statements., , Fortran, , FORTRAN is the short form for formula translation, was the first high level programming, language. This language was developed by IBM in 1957. Fortran is useful for carrying out, complicated scientific and mathematical calculations., , C++, , C++ was developed by Dr. Bjarne Stroustrup at AT&T's Bell labs. This is an, object oriented programming language for creating windows based, application and system programs., , Java, , Java was developed by James Gosling of Sun Microsystems USA. This is an objectoriented programming language and is popular because it is used for Internet, programming. C++ is the base of this language., , Python, , Python is an interpreted, object-oriented programming language,, created by Guido van Rossum in 1991. It is one of the most in-demand, programming languages in the IT industry. Besides being one of the best, introductory languages for beginners, Python is also a full-fledged and, all-round programming language for professionals., , Prolog, Prolog is a general purpose logic programming language associated with, artificial intelligence. It is a declarative programming language. The general, idea behind declarative languages is that you describe a situation and based, on this code, the interpreter or compiler will tell you a solution., 9
Page 6 :
Understanding Binary Number System, Binary is the basis of all digital technologies. As, the name suggests, (bi means 2) binary number, system uses only two digits '0' and '1', where, 0 represents absence of electronic impulse or, absence of current and 1 represents presence, of electronic impulse. Though all the electronic, devices work on the presence or absence of, these impulses, the binary digits hold special, significance in a computer system., , 0, , 1, , OFF, , (Electrical Switch), , ON, , OFF, , (Electrical Bulb), , ON, , This number system uses only two numbers 0 and 1, that's why it has a base 2. (zero)0 and, (one)1 when used in combinations as codes are called Binary Numbers., The American Standard Code for Information Interchange (ASCII) has specified codes, for various characters. This code informs us how information reaches the CPU, when a key, is pressed. Example: For alphabet 'A' the code is 65 and this code has been mentioned in, decimal number system. You must be wondering how can one know what message will be, conveyed to computer in the form of electronic impulses., , Understanding Decimal Number System, , The number system that you are using normally in mathematics is termed as decimal, number system. (Deci means 10) as it uses 10 digits, from 0 to 9. This number system is, based on 'tens' because there are ten digits. From the combinations of 10 digits only, we, can design various numbers. In decimal number system, the successive positions to the left, of the decimal point represent units, tens, hundreds, thousands, while to the right 1/10,, 1/100, 1/1000 and so on., Example:, , Decimal Point, Units, , 1/10 (Tenth), , Tens, , 1/100 (Hundredths), , Hundreds, Thousands, , 2179.46, 10× Bigger, , 10 Brainy Gigabyte+ 7, , 10× Smaller
Page 7 :
?, , Do You Know, , • T, he binary system was created by Gottfried Leibniz, a philosopher and a mathematician. This system, later became the foundation for every computer system., • I ndia has given the world an ingenuous method of expressing all numbers by means of ten symbols,, each symbol receiving a value of position., , Conversion of Decimal into Binary Number System, , Let's find out an equivalent of decimal number (65) in binary system., Step 1: Divide the number by 2 and note down the remainder (whether it is 0 or 1)., Step 2: Again divide the quotient obtained in the first division by 2. Note down the remainder., Step 3: Quotient obtained in second division is divided again by 2 and so on until the, quotient obtained as a result of last division is 0., Step 4: The remainder obtained as a result of all the divisions needs to be arranged in a, definite sequence i.e. from bottom to top as shown in the example below, the binary, equivalent of (65)10 is (1000001)2., Observe the following steps:, , ASCII code for ‘A’, Binary Base is ‘2’, , Info, The concept of 0 (zero) was, introduced by India’s greatest, mathematician ‘Aryabhatta’., , 2, , 65, , 2, , 32, , 1, , 2, , 16, , 0, , 2, , 8, , 0, , 2, , 4, , 0, , 2, , 2, , 0, , 2, , 1, , 0, , (65)10, , 1, , Decimal Number, , Reminder, , =, , (1 0 0 0 0 1 )2, Binary Number, , Conversion of Binary Number into Decimal Number, Let's go vice-versa: Converting a binary number into its equivalent decimal number system., As you know that decimal number system carries the base 10 (due to the presence of 10, digits). For example, the decimal number 1234 consists of the digit 4 in the units position, 3, in the tens position, 2 in the hundreds position and 1 in the thousands position., 11
Page 8 :
Its value can be written as:, (1234)10, Remember, (1×1000) + (2×100) + (3×10) + (4×1), 100 = 1, (1×103) + (2×102) + (3×101) + (4×100), 1000 + 200 + 30 + 4, = 1234, Let us now take a binary number (10101)2. In order to find out its decimal equivalent, firstly, you take into consideration the place values of each digit from right to left., Observe the place value of each digit., (1 0, , 24, , 23, , 1 0, , 1)2, , 22, , 21, , 20, , Steps, , Binary Number, , Decimal Number, , Step 1, , 101012, , ((1 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20))10, , Step 2, , 101012, , (16 + 0 + 4 + 0 + 1)10, , Step 3, , 101012, , 2110, , Understanding Software, The computer is no doubt an ultimate tool for entertainment, education and business., Using computer knowledge we can instantly access large pool of vital information, quickly and efficiently. We can also write reports or letters, keep track of our financial, books and many other things. The problem is that even the most powerful computers, in the world cannot do much of anything without a properly loaded software and user., , What is Software?, , A set of programs used to perform a particular job or to, enhance the capabilities of the computer is known as, Software. The software instructs the computer what to, do and how to do. It also permits a dialogue between, the user and the hardware. It works like a soul in the, body of the computer system., There are three types of software namely:, • System Software, • Application Software, • Utility Software, 12 Brainy Gigabyte+ 7
Page 9 :
Definition, What is Software?, Software is a collection of instructions that enable the user to interact with a computer to perform a task, or operation., , System Software, , It acts as an interface between the user, application software and the hardware. It helps the, computer to manage itself and carry out work. It controls the machine resources, such as, input and output devices, schedules the work within the machine and, User, enables the hardware to understand our commands that are given, in HLL. The Operating Systems, Compilers and Interpreters are a few, examples of system software., Application Software, Features of a System software:, • Close to the system, , • Fast in speed, , • Difficult to design, , • Difficult to understand, , • Difficult to manipulate, • Generally written in low-level language, , Operating System, , Hardware, , Application Software, , Applications software is capable of dealing with user inputs and helps the user to complete, the task. It is also called end-user programs or only an app. It resides above the system, software. Firstly user deals with system software after that he/she deals with application, software. The end user uses applications software for a specific purpose. It is programmed, for simple as well as complex tasks. It can either be installed or accessed online. It can be, a single program or a group of small programs that referred to as an application suite., Some examples of Application Software are word processing software, spreadsheets, software, presentation, web browsers etc., Features of a Application software:, • Close to the user, • Easy to design, • Generally written in high-level language, • Easy to understand, • Easy to manipulate and use, • Bigger in size and requires large storage, space, 13
Page 10 :
Utility Software, , Utility Software is a type of computer system software, also referred as service program or service tool. Software, utilities are specifically designed to help the end-user to, manage and tune the computer hardware or software., Utility software can be seen in many operating systems, e.g. Windows XP, Windows 7, Mac OS X etc. Examples of, some of the commonly used utility software are as follows:, Disk Compression Utilities: Disk compression tools do the job of compressing or, decompressing data on the drive, so that additional space is available for extra data to be, stored., Disk Checkers and Cleaners: These helpful utilities check the hard drive for any damaged or, unnecessary files and deletes them for efficient hard disk functioning. These tools are good, for increasing the speed of a slow computer., System Profilers: System profilers are responsible for providing the user with clear information, about the applications installed and the hardware devices connected to the system., Antivirus Software: There are many antivirus software available for purchase in the market, and even some free versions for downloads., Backup Utilities: As the name suggests, these data backup tools are used to copy all the, information and provide it when required, such as in case of disk failure or when disk corrupts., , Now You Know, • Computer language is used to communicate between the user and the computer., • Machine language is the only language that computer understands and is composed of 0's, and 1's i.e. Bits., • An assembly language is a low level programming language that uses mnemonics, a short, name provided for every operation., • A high level language is a computer language that uses words from common English, language., • An interpreter is a program that converts the high level program into machine language,, line by line., • Compiler is a program that translates a high level program to machine language all at once, and provides list of errors and warnings in one go., • Software is a collection of instructions that enable the user to interact with a computer to, perform a task or operation., • The binary system is a number system with base two (2) and has only two digits 0 and 1., 14 Brainy Gigabyte+ 7
Page 11 :
• Decimal number system is based on 'tens' because there are ten digits (0-9)., • Application software programs are designed to do almost anything like typing, designing,, net surfing etc., • Utility software are special programs or tools designed to perform a special task like writing, data on CD, zipping a file, protecting system from virus or taking back-ups etc., , Computer Lab Activity, ACTIVITY 1: Visit the school computer lab and find out the names of different application software that, run on the computer system in the lab. Using MS Word, make a list and type about their, usage., ACTIVITY 2: E, xplore Microsoft Windows operating system and list out some utility software that come, along with MS Windows operating system., , , (Hint: In Window 7 Click Start → All Programs → Accessories → System Tools, , ACTIVITY 3: Log on to the Internet and find the information on the following utility software available, for personal computers., • PC Booster • CCleaner • WinRAR, , Assessment Sheet, A., , Tick () the correct option for the following statements., 1. The language that is directly understood by the computer., , a), , Machine, , b), , Basic, , c), , Assembly, , 2. The instructions in machine language are written with the help of this., a), , English alphabets, , b), , Digits (0-9), , c), , 0's and 1's, , b), , Eight(8), , c), , Two(2), , 3. These many bits form a byte., a), , Four(4), , 4. A computer language in which instructions are written as mnemonic codes., a), , Machine language, , b), , High level language, , c), , Assembly language, , 5. A software that is designed to control the hardware and other software programs of the computer, system., a), , Application Software, , b), , Utility Software, , c), , System Software, 15
Page 12 :
6. The program that converts the complete program into a machine language program in a single go., a), , Translator, , b), , Interpreter, , c), , Compiler, , c), , Java, , c), , 21, , 7. One of the following is not a programming language., a), , b), , Python, , Tiger, , 8. The place value of 0 in (1011)2 is one of these., a), B., , b), , 23, , 22, , Read the following statements carefully. Put a () for the True and () for the False statement., 1. In computer science, natural languages mean human languages., 2. The binary number system consists of 10 digits (0-9)., 3. The concept of 0 and 1 was introduced by the Charles Babbage., 4. The concept of zero (0) was introduced by the Chinese., 5. A program written in high level language is called as source program., , C., , Give one word answer for the following statements:, Help Box, , D., , E., , Nibble, Zero(0), Machine, Hundred, One(1), , 1. The digit that represents the electronic state of ON., , __________________, , 2. The digit that represents the electronic state of OFF., , __________________, , 3. The language that is directly understood by the computer., , __________________, , 4. This is formed by four(4) bits., , __________________, , 5. In 836, what is the place value of 8?, , __________________, , Explain the following terms., 1. Bit, , __________________________________________________________________, , 2. Byte, , __________________________________________________________________, , 3. Interpreter, , __________________________________________________________________, , 4. Compiler, , __________________________________________________________________, , Answer the following questions., 1. What is Machine language?, , _______________________________________________________________________________, _______________________________________________________________________________, 16 Brainy Gigabyte+ 7
Page 13 :
2. Explain the concept of ‘0’ and ‘1’ in terms of computer science., _______________________________________________________________________________, _______________________________________________________________________________, 3. What is Assembly language?, _______________________________________________________________________________, _______________________________________________________________________________, 4. What is High level language? Explain with some examples., _______________________________________________________________________________, _______________________________________________________________________________, 5. What is Software? Mention the different types of software with examples., _______________________________________________________________________________, _______________________________________________________________________________, , Application Based Questions, 1, , upriya is using a laptop computer for her studies. Following is a list of software which are installed, S, in her computer. Help her to understand what type of software she is using., a) MS Windows, , ______________________________________________________, , b) MS Office Suite, , ______________________________________________________, , c) Quick Heal Antivirus, , ______________________________________________________, , d) Python Language, , ______________________________________________________, , e) Mozilla Firefox web browser ______________________________________________________, f), 2, , Folder Locker Software, , ______________________________________________________, , Help Kanika to solve the following., a) Convert the following decimal numbers to binary numbers., , i) (57)10 = ( __________ )2, , ii) (574)10 = ( __________ )2, , b) Convert the following binary numbers into decimal numbers., i) (1011)2 = ( __________ )10, , ii) (1111000)2 = ( __________ )10, , 17