Wednesday, 2 August 2017

BCA 1st sem /BCS-011/Solved Assignment/ Computer Basics and PC Software /2017-2018 New

Block 1

a) A computer program consists of instructions and data on which the instruction operates. How are the instructions of a program executed by a computer? Where are the instructions and data stored during execution? What is the role played by Input/output devices?


Ans:-   
How Computers Work: The CPU and Memory
  • The Central Processing Unit:
    • (CPU),
    • Buses,
    • Ports and controllers,
    • ROM;
  • Main Memory (RAM);
  • Input Devices;
  • Output Devices;
  • Secondary Storage;
    • floppy disks,
    • hard disk,
    • CD-ROM

The Central Processing Unit (CPU)

The computer does its primary work in a part of the machine we cannot see, a control center that converts data input to information output. This control center, called the central processing unit (CPU), is a highly complex, extensive set of electronic circuitry that executes stored program instructions. All computers, large and small, must have a central processing unit.

The Control Unit 


  • The control unit of the CPU contains circuitry that uses electrical signals to direct the entire computer system to carry out, or execute, stored program instructions. Like an orchestra leader, the control unit does not execute program instructions; rather, it directs other parts of the system to do so. The control unit must communicate with both the arithmetic/logic unit and memory.



  • The Arithmetic/Logic Unit 
  • The arithmetic/logic unit (ALU) contains the electronic circuitry that executes all arithmetic and logical operations. 



  • INSTRUCTION EXECUTION: 
    AN EXAMPLE:

     “How does the Computer execute a Program?” Let us explain this with the help of an example from higher level language domain.

     Problem: Write a program to add two numbers

    A sample C program (Assuming two fixed values of numbers as a = 5 and b = 2) 
    1. #include
      2. main () 
    3.
     { 4. int a =5, b=2, c; 
    5. c= a+b; 
    6. printf (“\n The added value is: % d”, c); 
    7. }
     The program at line 4 declares variables that will be equivalent to 3 memory locations namely a, b and c. At line 5 these variables are added and at line 6 the value of c is printed. 

     The execution of the instructions will be as follows: 

    Fetch First Instruction into CPU: 

    Step 1: Find or calculate the address of the first instruction in memory: In this machine example, the next instruction address is contained in PC register. It contains 1, which is the address of first instruction to be executed.

     Step 2: Bring the binary instruction to IR register. This step requires: • Passing the content of PC to Memory Address Registers so that the instruction pointed to by PC is fetched. That is location 1’s content is fetched. • CPU issues “Memory read” operation, thus, brings contents of location pointed by MAR (1 in this case) to the MBR register. • Content of MBR is transferred to IR. In addition PC is incremented to point to next instruction in sequence (2 in this case). 

    Step 3: The IR has the instruction LOAD A, which is decoded as “Load the content of address A in the accumulator register”.

    Step 4: The address of operand that is 13, that is A, is transferred to MAR register. Step 5: The content of memory location (specified by MAR that is location 13) is transferred to MBR. 

    Step 6: The content of MBR is transferred to Accumulator Register. Thus, the accumulator register is loaded with the content of location A, which is 5. Now the instruction 1 execution is complete, and the next instruction that is 2 (indicated by PC) is fetched and PC is incremented to .

    This instruction is ADD B, which instruct CPU to add the contents of memory location B to the accumulator. On execution of this instruction the accumulator will contain the sum of its earlier value that is A and the value stored in memory location B. On execution of the instruction at memory location 3, PC becomes 4; the accumulator results are stored in location C, that is 15, and IR still contains the third instruction.

    Please note that the execution of the instructions in the above example is quite simple and requires only data transfer and data processing operations in each instruction. Also these instructions require one memory reference during its execution.

    Role Play By Input Devices and Output Devices

    Input is information that goes into the computer. This can be USB device, Hard Drive, Microphone. (They are information that will go IN the computer, so its called INPUT).
      
    With output, you can send information out. So this can be connected with Scanner, Projector, Screen, Sound, etc. (They are information that will come OUT of the computer, so its called OUTPUT).

    b) Computer systems always have small RAM, yet it mostly has a large secondary memory like hard disk? Why? The access time of a hard disk is much larger than RAM, even than RAM is smaller in size than hard disk. Justify.

    Ans:-

    Hard Disk

    Hard Disk is a drive, which provides you to store your data for a long time. All your personal data like music, images, videos and files are saved by hard disk. Its basic measuring units are Gigabytes (GB) and Terabytes (TB). You can uninstall and save new data according to your demand. In case of more storage requirement, you can use external hard disk drive  as well. Seagate, Toshiba and Western Digital are largest manufacturers of internal hard disk while external hard disk are largely manufactured by ADATA, Freecom, LG, Samsung and Toshiba.

    RAM:

    RAM is the acronym of Random Access Memory, which is used for storage of computer data, not your personal data. This device is used to read and write data.  It temporary stores the computer memory and keep it until system is on and will erased it after your system go shutdown. RAM has two types SRAM (static RAM) and DRAM (dynamic RAM). It is available from 256MB to 8GB sizes. With increase in RAM size system will be able to perform faster than before.


    Key Differences(RAM Faster then Hard Disk)

    • All data you stored on hard disk are permanently saved during usage and after shutdown. While RAM keeps memory until system is running. All the memory will be erased automatically after your system switched off.
    • Currently, RAM are available from 256MB to 8GB (recently announced by Seagate). While hard disk size starts where RAM size ends. 10GB to 8TB size hard disk are available in the market.
    • RAM is just a chip containing some circuits. Hard disk is almost a machine having multiple parts like platters, plastic disc, magnate, writer & reader bar.
    • If you are running short of hard disk space, you can use external hard disk for your data storage. There is no option for external removable RAM.
    • Whenever we perform some task, memory first comes from RAM instead of hard disk. Hard disk is a secondary mean for circulation of memory.
    • RAM works faster than hard drive. Basic purpose of RAM is to fast the performance of system. If you have low RAM, your system speed will be low. Main purpose of hard disk is to store information. If you have low capacity hard disk there will be less impact on your system speed.
    • Additional RAM demand requires no Window but if you want to change your hard disk, it will be workable after fresh Window.
    Assume ─ Hit rate of 75 percent at a level of the memory hierarchy , Memory Requests take 12 nano seconds to complete if they hit in the level  and Memory requests that miss in the level take 100 ns to complete.

    Formula =  [Tav = (Thit × Phit) + (Tmiss × Pmiss )]
    Using the formula, the average access time = (12 ns × 0. 75) + ( 100 ns × 0.25) = 34 ns

    If there is a magnetic disk as following:
    Average seek time: 12 ms
    Rotation rate: 3600 RPM
    Transfer rate: 3.5 MB/second
    Number of sectors per track: 64
    Sector size: 512 bytes
    Controller overhead: 5.5 ms
    What's the average time to read a single sector?
    Seek time: 12 ms (given in text)
    Average rotational delay: 3600 RPM = 60 revs per second, or 16.7 ms/rev. Average is half that, or 8.3 ms.
    Transfer time: 512 / 3.5 MB/s = 146 µs -- however, it will take a little longer to actually read the sector, since there are 64 sectors on the disk, and the disk rotates once every 16.7 ms, each sector will take 16.7 ms / 64 = 260 µs to read. Since this is greater than the transfer time, it is the figure to use.
    Overhead: 5.5ms (given in text)
    Disk Access time:
    Seek time (12 ms) + Average rotational delay (8.3 ms) + Sector read time (260 µs) + Overhead (5.5 ms) = 26.1 ms
    It is possible, depending on how the disk controller works, the sector may be read into a hardware buffer (260 µs) and then transferred to memory (146 µs) as two separate operations, in which case the answer would be 26.2 ms instead.

    c)

    Ans

    Conversion:-
    There are two methods of converting decimals to binary. Here we present both methods using the number 85 as an example.
    85 = 1 * 26 + 0 * 25 + 1 * 24 + 0 * 23 + 1 * 22 + 0 * 21 + 1 * 20
    The binary representation of 85 is given by the coefficients in this representation listed one after another, starting with the highest power of 2: 1010101.
    First observation: the last digit in the binary representation is always the remainder of the number when divided by two. That is, it is 1 if the number is odd, and 0 if it is even. 
    Second observation: if we erase the last digit of a binary number, then we get a new binary number which is equal to half the original number, with the fraction of 1/2 dropped if the original number was odd.
    For example, consider the number n whose binary representation is abcd is equal to a * 23 + b * 22 + c * 21 + d * 20.
    Then note that n = 2 * (a * 22 + b * 21 + c * 20) + d. So n is even if d=0 and odd if d=1 (first observation). Also note that if we divide n by two and drop any fraction of 1/2 (if d is odd), then we get a * 22 + b * 21 + c * 20, which has binary representation abc, which is what you get if you erase the last binary digit of n (second observation).
    Although we only proved our observations with 4-digit binary numbers, the same argument works no matter how many digits we have.
    So [binary represenation of 85]=[binary representation of 42]1.
    The number 42 is even, hence its last binary digit is 0. Dividing 42 by 2 we get 21.
    So [binary represenation of 85]=[binary representation of 21]01.
    21's last binary digit is 1 (as it is odd). Subtract 1 and divide by two again: we get 10.
    So [binary represenation of 85]=[binary representation of 10]101.
    10's last binary digit is 0. 10/2 = 5.
    So [binary represenation of 85]=[binary representation of 5]0101.
    5's last binary digit is 1. Then 4/2 = 2.
    So [binary represenation of 85]=[binary representation of 2]10101.
    2's last binary digit is 0. Dividing 2 by 2, we get 1.
    So [binary represenation of 85]=[binary representation of 1]010101.
    Now the binary digit 1 represents the number 1.
    So the binary represenation of 85 is 1010101.


    First method. We are trying to represent the number 85 as the sum of powers of two starting from the largest. Find the largest power of 2 which is not more than 85. It is 64 = 26. Subtract it: 85 - 26 = 21. The result will always be less than the power of two that was subtracted (can you figure out why?). Now we need to represent 21 as the sum of powers of 2. Continue as before: the biggest power of two which is not more then 21 is 16 = 24. Subtract it: 21 - 24 = 5. Now we need to represent 5 as the sum of powers of 2. Continue as before: the largest power of two which is not more then 5 is 4 = 22. Subtract it: 5 - 22 = 1. We can represent 1 as 20. We got that 85 = 26 + 24 + 22 + 20. This is the same as: 

    Second method. This method is based on two observations.
    The number 85 is odd. Hence, the last digit is 1. Subtract 1, we get 84. Then dividing 84 by 2 we get 42. Binary representation of 42 will get us all other digits in front of the last.

    (i) Decimal 119.0625 into binary and hexadecimal

    Ans :- (119.0625)10 = (01110111)2
                (119.0625)10 = (77)16

    (ii) Decimal 25600 into binary and hexadecimal

     Ans :- (25600)10 = (0110010000000000)2
                  (25600)10 = (6400)16

    (iii) String “MATHS marks 50” to ASCII and Unicode string

    Ans : “MATHS marks 50”  = 77 65 84 72 83 32 109 97 114 107 115 32 53 48
             “MATHS marks 50” = 0000004d00000041000000540000004800000053 0000006d00000061000000720000006b00000073 0000003500000030(UTF - 32)

    (iv) Hexadecimal 9A8C7E to decimal and binary

    Ans :- (9A8C7E)16 = (10128510)10
                (9A8C7E)16 = (1001 1010 1000 1100 0111 1110)2


    d) How can you calculate the capacity of a Winchester disk given its density and speed? A disk has 10 recording surfaces. Each surface has 2000 tracks, each track has 512 sectors and each sector can store 1MB of data. Calculate the capacity of this disk. 

    Ans:- Another term for hard disk drive. The term Winchester comes from an early type of disk drive developed by IBM that had 30 MB of fixed storage and 30MB of removable storage; so its inventors called it a Winchester in honor of its 30/30 rifle. Although modern disk drives are faster and hold more data, the basic technology is the same, so Winchester has become synonymous with hard.
     OR
    A type of disk storage device characterized by non removable or sealed disk packs;
    extremely narrow tracks; a lubricated surface that allows the head to rest on the surface 
    during start and stop operations; and servo mechanisms which utilize magnetic
     pattern, recorded on the medium itself, to position the head.

    Calculation of DISK Capacity
    Disk capacity = total number of surfaces * no. of tracks per surface * amount of data per track 
    Total number of surfaces = 10
    No. of tracks per surface = 2000
    Amount of data per track  = 512*1MB

    Disk Capacity = 10*2000*512*1
                              = 10240000 MB  or
                              = 81920000000000 bits

    e)Compare and contrast the following technologies

     
    (i) Parallel port versus Serial port 

    The main difference between a serial port and a parallel port is that a serial port transmits data one bit after another, while a parallel port transmits all 8 bits of a byte in parallel. 
    Thus a parallel port transmits data much faster than a serial port. Computers have both serial and parallel ports along with newer technology called a USB (Universal Serial Bus) port.

    Pin Configuration of Ports
    Serial ports typically are 9 pin or 25 pin male connectors. The parallel port is a 25 pin female connector where the printer cable connects. The ports COM1 and COM2 on your computer are serial ports and the LPT1 port is a parallel port. Each pin has a specific function such as transmit data, receive data, data terminal ready or autofeed. Serial ports also refer to any port that is RS232 (Recommended Standard 232) compliant in the telecommunications world.
    Devices That Use Serial Ports
    The RS232 standard is used by many different manufacturers of devices. Some common devices that use the serial port connection are flat screen monitors, GPS receivers, bar code scanners and satellite phones or modems.
    Devices That Use Parallel Ports
    The parallel port is virtually synonymous with being a printer port. Other devices that communicate with a parallel port are zip drives, scanners, joysticks, external hard drives and webcams. Today, the parallel port has been replaced by the new USB port for connecting these same devices to the computer.
    (ii) Light Pen versus Touch Screen 
    A light pen is a computer input device in the form of a light-sensitive wand used in conjunction with the computer's CRT monitor. It allows the user to point to displayed objects, or draw on the screen, in a similar way to a touch screen but with greater positional accuracy. A light pen can work with any CRT-based monitor, but not with LCD screens, projectors or other display devices. 

    Touch screens, touch panels or touchscreen panels are display overlays which have the ability to display and receive information on the same screen. The effect of such overlays allows a display to be used as an input device, removing the keyboard and/or the mouse as the primary input device for interacting with the display's content. Such displays can be attached to computers or, as terminals, to networks. Touchscreens also have assisted in recent changes in the PDA and Cell-Phone Industries, making these devices more useable.

    (iii) LED Monitors versus Projection Displays 
    An LED monitor (short for Light Emitting Diode) or LED display is a flat screen, flat panel computer monitor or television. It has a very short depth and is light in terms of weight. The actual difference between this and a typical LCD monitor is the backlighting. The first LCD monitors used CCFLinstead of LEDs to illuminate the screen.

    LED monitor advantages

    LED monitors offer many benefits when compared to those that are CCFL lit including:

    • Typically are less expensive
    • Broader dimming range
    • Overall more reliable
    • They run at a lower temperature, and consume much less power, as few as 20 watts
    • Higher dynamic contrast ratio
    • Longer lifespan and less environmental impact

     A digital projector, also called a digital projection display system, is a specialized computer display that projects an enlarged image on a movie screen. Such devices are commonly used in presentations.
    There are two main types of digital projection display systems. The older, less expensive type employs three transparent liquid-crystal-display ( LCD ) panels, one for each of the primary colors (red, green, and blue). The light transmittivity of each pixel varies depending on the image data received from the computer. The light from a lamp is directed through the LCD panels, collimated using a lens, and projected onto a screen. 
    (iv) Laser printers versus Dot matrix printers 

    Laser printer is a type of printer that produces high quality text and graphics by passing a laser beam on plain paper. This process uses a xerographic printing process, which uses a cylindrical drum coated with selenium to print an image. Inkjet is a type of printer that prints images by propelling droplets of ink onto the paper. These printers are the most common type of printers that are available in households. 
    Dot Matrix printers is a type of printer that produces documents by having a printer head run back and forth and strike against an ink soaked ribbon to produce characters.

    Laser, Inkjet and Dot Matrix are three different types of printers that are available on the market. These printers differ from each other in various ways, including cost, technology used and maintenance. Laser printers are more commonly found in office settings, while inkjet can be used in office and home settings.

     Dot Matrix is only found in certain applications. Each of these printers has its own advantages and disadvantages and a person should ensure their need before purchasing a printer.

    f) Explain the characteristics/functions of the following I/O devices: 
    (i) Microphone
    microphone, colloquially nicknamed mic or mike , is a transducer that converts sound into an electrical signal.
    Microphones are used in many applications such as telephones, hearing aids, public address systems for concert halls and public events, motion picture production, live and recorded audio engineering, sound recording, two-way radios, megaphones, radio and televisionbroadcasting, and in computers for recording voice, speech recognition, VoIP, and for non-acoustic purposes such as ultrasonic sensors or knock sensors.  

    (ii) Graphics Tablet 

    Graphics tablets are designed to make digital artwork easier and more precise: drawing with a mouse is rarely ideal, and often cumbersome. Consisting of a flat pad and specialized electronic pen, graphics tablets are often used by professional digital artists to more accurately place lines and use movements naturally associated with drawing. While often useful tools, graphics tablets aren't without their drawbacks, making it important to weigh the costs against the benefits before purchasing one.

    (iii) MICR 

    The short form for Magnetic Ink Character Recognition is MICR, which is a recognition technology based on characters printed with magnetic ink or toner and processed by being magnetized and sensed magnetically. MICR characters are printed information on documents so that the code line information can be captured by magnetic recognition.

    Advantage of MICR:

    MICR encoded cheque book has some major advantages:


      Quick processing and reduced cheque clearing time
      Reduced cheque related fraudulent activities

    Features of MICR Cheque:

    The MICR Cheque has to have the following measurement:

    1.     Payor Institution Area
    2.     Cheque Number and Date Area
    3.     Payee and Legal Amount Area
    4.     Convenience Amount
    5.    Account Title

    (iv) Bar Code Reader

    barcode reader (or barcode scanner) is an electronic device that can read and output printed barcodes to a computer. Like a flatbed scanner, it consists of a light source, a lens and a light sensor translating optical impulses into electrical ones. Additionally, nearly all barcode readers contain decoder circuitry analyzing the barcode's image data provided by the sensor and sending the barcode's content to the scanner's output port.

    g) Explain the uses of following Software: 

    (i) Accounting Software 

    Accounting software describes a type of application software that records and processes accounting transactions within functional modules such as accounts payable, accounts receivable, general ledger, payroll, and trial balance. It functions as an accounting information system. It may be developed in-house by the organization using it, may be purchased from a third party, or may be a combination of a third-party application software package with local modifications. Accounting software may be on-line based, accessed anywhere at any time with any device which is Internet enabled, or may be desktop based. It varies greatly in its complexity and cost.
    The market has been undergoing considerable consolidation since the mid-1990s, with many suppliers ceasing to trade or being bought by larger groups.
    (ii) Anti-virus software 

    Antivirus or anti-virus software (often abbreviated as AV), sometimes known as anti-malware software, is computer software used to prevent, detect and remove malicious software.
    Antivirus software was originally developed to detect and remove computer viruses, hence the name. However, with the proliferation of other kinds of malware, antivirus software started to provide protection from other computer threats. In particular, modern antivirus software can protect from: malicious browser helper objects (BHOs), browser hijackersransomwarekeyloggersbackdoorsrootkitstrojan horsesworms, malicious LSPsdialersfraudtoolsadware and spyware.Some products also include protection from other computer threats, such as infected and malicious URLsspamscam and phishing attacks, online identity (privacy), online banking attacks, social engineering techniques, advanced persistent threat (APT) and botnet DDoS attacks.
    (iii) Disk Checkers 

    CHKDSK (short for "check disk") is a system tool in DOS, OS/2 and Windows. It verifies the file system integrity of a volume and fixes logical file system errors. It is similar to the fsck command in Unix.
    On Windows NT operating systems, CHKDSK can also check the disk surface for bad sectors and mark them. (In MS-DOS 6.x and Windows 9x, this is a task done by Microsoft ScanDisk.) Windows Server version of CHKDSK is RAID-aware and can fully recover data in bad sectors of a disk in a RAID-1 or RAID-5 array if other disks in the set are intact.
    CHKDSK can be run from DOS prompt, Windows Explorer, Windows Command Prompt or Recovery Console.
    (iv) Spreadsheet software

    spreadsheet is an interactive computer application for organization, analysis and storage of data in tabular form. Spreadsheets are developed as computerized simulations of paper accounting worksheets.The program operates on data entered in cells of a table. Each cell may contain either numeric or text data, or the results of formulas that automatically calculate and display a value based on the contents of other cells. A spreadsheet may also refer to one such electronic document.
    Spreadsheet users can adjust any stored value and observe the effects on calculated values. This makes the spreadsheet useful for "what-if" analysis since many cases can be rapidly investigated without manual recalculation. Modern spreadsheet software can have multiple interacting sheets, and can display data either as text and numerals, or in graphical form.

    Block 2

    a) What is client/server architecture? What are its advantages and disadvantages? Is cloud computing also a client/server architecture? Justify your answer.

    Ans : - Client/Server Architecture : -
    The client/server architecture significantly decreased network traffic by providing a query response rather than total file transfer. It allows multi-user updating through a GUI front end to a shared database. Remote Procedure Calls (RPCs) or standard query language (SQL) statements are typically used to communicate between the client and server.

    The following are the examples of client/server architectures.



    1) Two tier architectures A two-tier architecture is where a client talks directly to a server, with no intervening server. It is typically used in small environments(less than 50 users). 



    In two tier client/server architectures, the user interface is placed at user's desktop environment and the database management system services are usually in a server that is a more powerful machine that provides services to the many clients. Information processing is split between the user system interface environment and the database management server environment.

    2) Three tier architectures The three tier architecture is introduced to overcome the drawbacks of the two tier architecture. In the three tier architecture, a middleware is used between the user system interface client environment and the database management server environment.

    These middleware are implemented in a variety of ways such as transaction processing monitors, message servers or application servers. The middle ware perform the function of queuing, application execution and database staging. 
    The three tier client/server architecture is used to improve performance for large number of users and also improves flexibility when compared to the two tier approach.


     The widespread use of the term 3-tier architecture also denotes the following architectures:

    • Application sharing between a client, middleware and enterprise server

    • Application sharing between a client, application server and enterprise database server.

    Advantage an Disadvantage :-

    Advantages :

    client / server solutions tend to the less expensive.

    client/server architecture  improving functionality & simplicity .

     cost is reduced because to off loading applications at client – side.

    Disadvantages :

    client/ server architecture creates a more complex environment (LAN os) are often difficult to manage.

    security problems can occur.


    the burden of training increases the cost of maintaining the environment.




    Comparison of "Cloud Computing" and "Client- Server Architecture":-
    In a client/server architecture one logs on to a server, authenticating their identification against credentials stored on the server, not on the local computer even before accessing their computer’s operating system, whereas cloud access usually takes place without requiring manual user-provided credentials, after the user has logged on to the computer, or other device, using locally-stored credentials.

    “Cloud storage” can be a (transparent) sub-function of a client/server architecture though the opposite is not true, that is, a client/server architecture is not (presently) a sub-function of cloud storage, though we can probably expect that to become the norm sooner rather than later.
    Depending on the “cloud,” no one really knows just how secure that cloud is, nor whether or not access to user data is really secure or not.

    In short, cloud architecture is, or can be, just another form of a client/server architecture where the user is cunningly insulated from the client/server aspects of its implementation. It all depends on who manages what cloud and which cloud we’re talking about. Expect that in the future all client/server architectures “look” more like the cloud than networks of old, but it’s really much the same thing: remote storage of user data that is modified locally and accessible to the user regardless of which platform they use to access it.

    b) Explain the features and uses of the following computer software: 

    (i) Compiler 

    Ans:- Generally compiling is a term which is often heard by everyone who is associated with programming, even if remotely. A compiler is a program which converts a high level language program/code into binary instructions (machine language) that our computer can interpret, understand and take the appropriate steps to execute the same.

    (ii) Linkers 

    Ans:- In computer science, a linker is a computer program that takes one or more object files generated by a compiler and combines them into one, executable program.

    Computer programs are usually made up of multiple modules that span separate object files, each being a compiled computer program. The program as a whole refers to these separately-compiled object files using symbols. The linker combines these separate files into a single, unified program; resolving the symbolic references as it goes along.

    Dynamic linking is a similar process, available on many operating systems, which postpones the resolution of some symbols until the program is executed. When the program is run, these dynamic link libraries are loaded as well. Dynamic linking does not require a linker.

    The linker bundled with most Linux systems is called ld; see our ld documentation page for more information.

    (iii) File viewer 

    Ans:- file viewer is application software that presents the data stored in a computer file in a human-friendly form. The file contents are generally displayed on the screen, or they may be printed. Also, they may be read aloud using speech synthesis.
    File viewers do not edit files, yet it is common for them to be able to export data in a different file format, or to copy information from the viewed to the system-wide clipboard. A file viewer is limited-functionality software in the sense that it does not have a capability to create a file, or modify the content of an existing one. Instead, it is used only to display or print the content.
    File viewers have to have sufficient knowledge about the file format to be viewed in order to handle different byte orders, code pages or newline styles.

    (iv) Presentation software

    Ans:-  presentation program is a software package used to display information in the form of a slide show. It has three major functions: an editor that allows text to be inserted and formatted, a method for inserting and manipulating graphic images, and a slide-show system to display the content.

    c)What is the kernel of an operating system of a Computer? Explain the terms multiuser, multiprogramming and multitasking in the context of operating system.  

    Ans:- A kernel is a central component of an operating system. It acts as an interface between the user applications and the hardware. The sole aim of the kernel is to manage the communication between the software (user level applications) and the hardware (CPU, disk memory etc). The main tasks of the kernel are : 
     Process management 
     Device management 
     Memory management 
     Interrupt handling 
     I/O communication 
     File system...etc..
    ROLE OF KERNAL
    The kernel is the most fundamental part of an operating system. It can be thought of as the program which controls all other programs on the computer. When the computer starts, it goes through some initialization (booting) function, such as checking memory. It is responsible for assigning and unassigning memory space which allows software to run.
    It provides services so programs can request the use of the network card, the disk or other piece of hardware (the kernel forwards the request to special programs called device drivers which control the hardware), manages the file system and sets interrupts for the CPU to enable multitasking. Many kernels are also responsible for ensuring that faulty programs do not interfere with the operation of others, by denying access to memory that has not been allocated to them and restricting the amount of CPU time they can consume.

    Multiprogramming

    In a multiprogramming system there are one or more programs loaded in main memory which are ready to execute. Only one program at a time is able to get the CPU for executing its instructions (i.e., there is at most one process running on the system) while all the others are waiting their turn.
    The main idea of multiprogramming is to maximize the use of CPU time. Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be accomplished). Then, the OS may interrupt that process and give the control to one of the other in-main-memory programs that are ready to execute (i.e. process context switching). In this way, no CPU time is wasted by the system waiting for the I/O task to be completed, and a running process keeps executing until either it voluntarily releases the CPU or when it blocks for an I/O operation. Therefore, the ultimate goal of multiprogramming is to keep the CPU busy as long as there are processes ready to execute.

    Multiprocessing

    Multiprocessing sometimes refers to executing multiple processes (programs) at the same time. This might be misleading because we have already introduced the term “multiprogramming” to describe that before.In fact, multiprocessing refers to the hardware (i.e., the CPU units) rather than the software (i.e., running processes). If the underlying hardware provides more than one processor then that is multiprocessing. Several variations on the basic scheme exist, e.g., multiple cores on one die or multiple dies in one package or multiple packages in one system.

    Multitasking

    Multitasking has the same meaning of multiprogramming but in a more general sense, as it refers to having multiple (programs, processes, tasks, threads) running at the same time. This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). At any time the CPU is executing one task only while other tasks waiting their turn. The illusion of parallelism is achieved when the CPU is reassigned to another task (i.e. process or thread context switching).

    d) Differentiate between the following 

    (i) Command line interface versus GUI 

    Ans:- 

    (ii) File Management system versus Input/Output control system in the context of an Operating system 

    Ans:- 

    (iii) A process versus a program 

    Ans:- A program is an executable file residing on the disk (secondary storage) in a directory. It is also termed as a set of instructions stored in the secondary storage device that are intended to carry out a specific job. It is read into the primary memory and executed by the kernel.

    Therefore, a program is termed as a ‘passive entity’ which exists in the secondary storage persistently even if the machine reboots.
    Few examples:
    • On a Microsoft Windows® system: The ‘Calculator’ program is stored at “:\windows\system32\calc.exe”.
    • On a Linux system: The ‘ls’ program is available at: “/bin/ls”.
    PROCESS: An executing instance of a program is called a process. Some operating systems use the term ‘task‘ to refer to a program that is being executed.
    A process is termed as an ‘active entity’ since it is always stored in the main memory and disappears if the machine is power cycled. Several process may be associated with a same program.
    On a multiprocessor system, multiple processes can be executed in parallel. On a uni-processor system, though true parallelism is not achieved, a process scheduling algorithm is applied and the processor is scheduled to execute each process one at a time producing an illusion of concurrency.
    Example: Executing multiple instances of the ‘Calculator’ program. Each of the instances are termed as a process.

    (iv) Unix versus MS-DOS

    Ans:- The primary advantage of UNIX over DOS is its security. Although it greatly adds to the complexity of the operating system, it is essential for an operating system that is mainly used as a server. DOS was meant to be an operating system for personal computers and sacrificed security to make it easier to use.
    There are a couple of usage differences between DOS and UNIX. The first difference is the case sensitivity of UNIX but not DOS. So in UNIX, the files example.exa and Example.exa can exist in the same folder but not in DOS. As long as the filename has the same characters, they would be considered as identical by DOS. The second, and less consequential of the two, is the use of slashes. DOS uses backslashes (\) to separate directories. In contrast, UNIX uses forward slashes (/) in its directory structure. These are just things to remember if you are familiar with one or the other.
    The differences between UNIX and DOS are largely attributed to what they were meant to do. Nowadays, UNIX is still used with servers due to its light and performance-oriented nature. Only a handful of people have the ability to work with it. Although DOS was initially meant for personal computers, it has been replaced by more intuitive and easier-to-use operating systems like Windows, OS X, and even Linux. The only niche where DOS is still used is in embedded systems largely due to its very minimal requirements.

    e) Draw a flow chart and write an algorithm for a program that multiplies first n odd numbers starting from 1. The value of n may be given as input to the program. (You must use looping).

    Ans:- 
    #include<stdio.h>
    void main()
    {
    int NUM,i,SUM=0;
    clrscr();
    printf(“\nENTER INTERGER NUMBER : “);
    scanf(“%d”,&NUM);
    for(i=1;i<NUM*2;i++)
    {
    if(i%2!=0)
    {
    SUM=SUM+i;
    }
    }
    printf(“\nTHE SUM OF ODD NOS. TILL %d NO. IS %d”,NUM,SUM);
    getch();
    }


    f)Define the following terms in the context of programming with the help of an example: 

    (i) Expressions 

    Ans:- 

    1. In programming, an expression is any legal combination of symbols that represents a value. 
    2. C Programming Provides its own rules of Expression, whether it is legal expression or illegal expression. For example, in the C language x+5 is a legal expression.
    3. Every expression consists of at least one operand and can have one or more operators.
    4. Operands are values and Operators are symbols that represent particular actions.

    ExpressionsValidity
    a + bExpression is valid since it contain + operator which is binary operator
    + + a + bInvalid Expression

    (ii) Two dimensional Arrays 

    Ans:-  In C programming, you can create an array of arrays known as multidimensional array. For example,

    float x[3][4];Here, x is a two-dimensional (2d) array. The array can hold 12 elements. You can think the array as table with 3 row and each row has 4 column.

    Initialization of a two dimensional array

    // Different ways to initialize two dimensional array


    int c[2][3] = {{1, 3, 0}, {-1, 5, 9}};         int c[][3] = {{1, 3, 0}, {-1, 5, 9}};                int c[2][3] = {1, 3, 0, -1, 5, 9};

    Example #1: Two Dimensional Array to store and display values

    // C program to store temperature of two cities for a week and display it.

    #include <stdio.h>
    const int CITY = 2;const int WEEK = 7;
    int main(){    int temperature[CITY][WEEK];    for (int i = 0; i < CITY; ++i) {        for(int j = 0; j < WEEK; ++j) {            printf("City %d, Day %d: ", i+1, j+1);            scanf("%d", &temperature[i][j]);        }    }
        printf("\nDisplaying values: \n\n");    for (int i = 0; i < CITY; ++i) {        for(int j = 0; j < WEEK; ++j)        {            printf("City %d, Day %d = %d\n", i+1, j+1, temperature[i][j]);        }    }    return 0;}


    Output

    City 1, Day 1: 33City 1, Day 2: 34City 1, Day 3: 35City 1, Day 4: 33City 1, Day 5: 32City 1, Day 6: 31City 1, Day 7: 30City 2, Day 1: 23City 2, Day 2: 22City 2, Day 3: 21City 2, Day 4: 24City 2, Day 5: 22City 2, Day 6: 25City 2, Day 7: 26

    Displaying values: 

    City 1, Day 1 = 33City 1, Day 2 = 34City 1, Day 3 = 35City 1, Day 4 = 33City 1, Day 5 = 32City 1, Day 6 = 31City 1, Day 7 = 30City 2, Day 1 = 23City 2, Day 2 = 22City 2, Day 3 = 21City 2, Day 4 = 24City 2, Day 5 = 22City 2, Day 6 = 25City 2, Day 7 = 26

    (iii) Arithmetic operators 

    Ans:- 

    OperatorDescriptionExample
    +Adds two operands.A + B = 30
    Subtracts second operand from the first.A − B = 10
    Multiplies both operands.A ∗ B = 200
    Divides numerator by de-numerator.B ∕ A = 2
    %Modulus Operator and remainder of after an integer division.B % A = 0
    ++Increment operator increases the integer value by one.A++ = 11
    --Decrement operator decreases the integer value by one.A-- = 9

    (iv) Conditional statement

    Ans:- In C language there are various methods which can be used to select an appropriate set of statements depending upon the user’s input. On counting them, totally there are FOUR different ways to take decisions which are as follows : 

    (a) if Statement 

    /* single statement following the if clause */
     
        if (condition) 
            statement;    
        statement;  
     
        /* block of statements following the if clause */
     
        if (condition) {
            statement;
            ----
            statement;
        }
        statement;

    (b) if-else Statement 



    if (condition)        
            statement;  
        else
            statement;

    (c) Conditional Operators 

     z = a > b ? a : b; 
     
        /*
         * 1. This is interpreted as: if a > b, then a is assigned
         *    to z else b is assigned to z
         * 2. operator ">" greater than, is a Relational Operator.
         *    Other Relational Operators that can be used are
         *    <, >=, <=, ==, !=
         */

    (d) Switch Statement

    switch (expression) {
            case    label: statements;
                           break;
            case    label: statements;
                           break;
            case    label: statements;
                           break;
            case    label: statements;
                           break;
            default      : statements;
                           break;
        }

    g) Explain the following with the help of an example/diagram, if needed: 

    (i) Open Source development model 

    Ans:- Open-source software development is the process by which open-source software, or similar software whose source code is publicly available, is developed. These are software products available with its source code under an open-source license to study, change, and improve its design. Examples of some popular open-source software products are Mozilla FirefoxGoogle ChromiumAndroidLibreOffice and the Apache OpenOffice Suite. Open-source software development has been a large part of the creation of the World Wide Web as we know it, with Tim Berners-Lee contributing his HTML code development as the original platform upon which the internet is now built.

    (ii) Scheduling in the context of project management software 

    Ans:- The project schedule is the tool that communicates what work needs to be performed, which resources of the organization will perform the work and the timeframes in which that work needs to be performed. The project schedule should reflect all of the work associated with delivering the project on time. Without a full and complete schedule, the project manager will be unable to communicate the complete effort, in terms of cost and resources, necessary to deliver the project.
    Online project management software allows project managers to track project schedules, resources, budgets and project related assets in real time. The project schedule can be viewed and updated by team members associated with the project, keeping everyone well informed on the overall project status.

    (iii) Mailmerge in MS-Word 

    Ans:- Mail Merge is a powerful tool for writing and sending a personalized letter or e-mail to many different people at the same time. You can also use it to create envelopes or labels with each recipient' information. Mail Merge imports data from another source such as Excel and then uses that data to replace placeholders throughout your message with the relevant information for each individual you are messaging. You can use it to quickly create personalized messages for hundreds of people at once.

    Use names from a Microsoft Outlook Contacts List

    To use an Outlook Contact List, follow these steps: 
    1. In the Mail Merge task pane, click Next: Select recipients.
    2. Click Select from Outlook contacts.
    3. In the Select from Outlook contacts section, click Choose Contacts Folder.
    4. In the Select Contact List Folder dialog box, select the Outlook contacts folder that you want, and then click OK.

      Word displays the Mail Merge Recipients dialog box. You can sort and edit your data if you want.
    5. Click OK to return to the main document.

    (iv) Creating tables using a DBMS.

    Ans:- The SQL CREATE TABLE statement is used to create a new table.
    SyntaxThe basic syntax of the CREATE TABLE statement is as follows −
    CREATE TABLE table_name(   column1 datatype,   column2 datatype,   column3 datatype,   .....   columnN datatype,   PRIMARY KEY( one or more columns ));CREATE TABLE is the keyword telling the database system what you want to do. In this case, you want to create a new table. The unique name or identifier for the table follows the CREATE TABLE statement.
    Then in brackets comes the list defining each column in the table and what sort of data type it is. The syntax becomes clearer with the following example.
    A copy of an existing table can be created using a combination of the CREATE TABLE statement and the SELECT statement.

    Block 3

    a)Explain the following terms in the context of computer networks:

     (i) Packet switching 

    Ans :- You are familiar with the-concept of switching. Circuit switching is the study of data link layer. The services of networks are provided by using the concept of packet switching.
    Packet switching can be used as an alternate to circuit switching. In the packet switched networks, data is sent in discrete units that have variable length. They are called as packets. There is a strict upper bound limit on the size of packets in a packet switch network. The packet contains data and various control information.
    The packet switched networks allow any host to send data to any other host without reserving the circuit. Multiple paths between a pair of sender and receiver may exist in a packet switched network. 

    (ii) Half Duplex transmission 

    Ans :- half-duplex transmission is the transmission of data in only one direction at any given time. Most speakerphones are half-duplex and only allow one way communication. However, a telephone is full-duplex and allows both people to talk at the same time.

    (iii) Need of computer networks 

    Ans :-The term network is defined as a set of computers of different types, terminals, telephones, and other communication equipments, connected by data communication links, which allow the network components to work together. The network components may be located within a small area or spread over many remote locations. In any case, data communications hold the network together.
    Computers are connected by many different technologies. A network is a two or more computer that can interconnect in a peer-to-peer or client to server fashion most often over a shared and virtual connection.
    In other words, networks provide the connection between computer resources in order to accommodate the flow of information.

    (iv) Channel of data transmission

    Ans :- Transmission of the data is very much important in the services related to the data communication and the information technology as this technique makes use of the data processed in the order to forward the same to the end user.
    2. Converter at the transmitting end.
    3. Transmission channel.
    4. Converter at the receiving end.
    5. Receiver.
    The communication of the data mainly involves the processing of the data as well as the transmission of the data and for the communication of the data, following devices play a very critical role and these devices should work in a very efficient manner.

    (b) A Multinational company has its sales offices in 100 different countries of the World. It uses a computer network to collect worldwise sale and order data at its head office. What kind of network the company should make for its sales offices and head office? Justify your answer. 

    Ans :- Wan network is used by  a  Multinational company has its sales offices in 100 different countries of the World. It uses a computer network to collect worldwise sale and order data at its head office.

    Wide Area Network, WAN is a collection of computers and network resources connected via a network over a geographic area. Wide-Area Networks are commonly connected either through the Internet or special arrangements made with phone companies or other service providers.

    (c) What is TCP/IP? What is an IP address? Explain various components of IP address with the help of an example.

    Ans :- TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network (either an intranet or an extranet). When you are set up with direct access to the Internet, your computer is provided with a copy of the TCP/IP program just as every other computer that you may send messages to or get information from also has a copy of TCP/IP.

    IP Address Components
    Address Class
    Table 3.7 Address Class and Range
    Class
    High-Order Bits
    1st Octet Range
    A
    0
    1–126
    B
    10
    128–191
    C
    110
    192–223
    D
    1110
    224–239
    E
    11110
    240–255
    Early in the development of IP, the IANA (Internet Assigned Numbers Authority) designated five classes of IP address: A, B, C, D, and E. These classes were identified based on the pattern of high-order bits (the high-value bits at the beginning of the first octet). The result is that certain ranges of networks are grouped into classes in a pattern based on the binary values of those high-order bits, as detailed in Table 3.7:
    You might notice that 127 is missing. This is because at some point the address 127.0.0.1 was reserved for the loopback (sometimes called "localhost") IP—this is the IP of the TCP/IP protocol itself on every host machine.

     (d) What is a browser? How does a browser work? How does it communicate with the web server? Explain with the help of an example. 

    Ans :-  Web browser is actually a software application that runs on your Internet-connected computer. It allows you to view Web pages, as well as use other content and technologies such as video, graphics files, and digital certificates, to name a few.
    How Do Web Browsers Work?

    The World Wide Web is a system of Internet servers that support specially formatted documents. Web browsers are used to make it easy to access the World Wide Web. Browsers are able to display Web pages largely in part to an underlying Web protocol called Hyper Text Transfer Protocol (HTTP). HTTP defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. It is what allows Web clients and Web servers to communicate with each other. When you enter a Web address (URL) in your browser, this actually sends an HTTP command to the Web server directing it to fetch and transmit the requested Web page and display the information in your browser. All Web servers serving Web sites and pages support the HTTP protocol.
    Web Browser  communicate with the web server through the following way:

    Client-Server Network Design and the Web

    Web browsers and web servers function together as a client-server system.

    Network Protocols for Web Browsers and Servers

    Web browsers and servers communicate via TCP/IP. Hypertext Transfer Protocol (HTTP) is the standard application protocol on top of TCP/IP supporting web browser requests and server responses.

    (e) How can you enhance your search results from Internet? Explain with the help of examples. List four applications of the Internet. 

    Ans :- 
    Using Search Engines to Find Information on the Web
    Search Engines
    Search engines on the World Wide Web are remotely accessible programs that let you do keyword searches for information on the Internet. There are several types of search engines and searches may cover titles of documents, URL's, headers, or full text. Keep in mind that the results you get from one search engine may not match the results you get from another search engine. In fact, they are often different due to the way each search engine behaves. Therefore, it may actually be beneficial to use more than one search engine on a regular basis.
    In this section, we briefly look at Google and Yahoo!. Web pages are often dynamic and can change at any time. As a result, you may find that if either site changes, your experience with JAWS may be different than what is described here.

    (f) Explain the following in the context of Internet and its applications, giving their features and uses: 
    (i) E-mail 
    (ii) Moodle
    Ans :-
    (i) E-mail 

    E-mail (electronic mail) is the exchange of computer-stored messages by telecommunication. (Some publications spell it email; we prefer the currently more established spelling of e-mail.) E-mail messages are usually encoded in ASCII text. However, you can also send non-text files, such as graphic images and sound files, as attachments sent in binary streams. E-mail was one of the first uses of the Internet and is still the most popular use. A large percentage of the total traffic over the Internet is e-mail. E-mail can also be exchanged between online service provider users and in networks other than the Internet, both public and private.
    E-mail can be distributed to lists of people as well as to individuals. A shared distribution list can be managed by using an e-mail reflector. Some mailing lists allow you to subscribe by sending a request to the mailing list administrator. A mailing list that is administered automatically is called a list server.
    E-mail is one of the protocols included with the Transport Control Protocol/Internet Protocol (TCP/IP) suite of protocols. A popular protocol for sending e-mail is Simple Mail Transfer Protocol and a popular protocol for receiving it is POP3. Both Netscape and Microsoft include an e-mail utility with their Web browsers.

    (ii) Moodle
    Moodle is a piece of software. It is what nowadays is called courseware. In a sense it is comparable to online digital learning environments like Blackboard, WebCT or Teletop. It is different from them in one major aspect: it has an open source license. That means it is freely available and that anyone is able to see the source code and even change it. Especially small institutions are able to use this adaptability to their advantage. This essay is about how Moodle could be used in secondary education.

    Martin Dougiamas is the sole creator of Moodle. As an Australian who, when little, was educated out of necessity with distance learning (self study and half an hour of radio contact with a teacher every day), he has been interested in means for distance education ever since. Moodle stands for Modular Object Oriented Dynamic Learning Environment. Being Modular anyone can write any module they would like for it. Object Oriented refers to the programming method. Dynamic reflects the fact that the web pages are dynamically created and the word “Moodle” tries to show the feeling you get while using the product. The meaning of Learning Environment is obvious.

    2 comments: