1st Sessional Notes

Embed Size (px)

Citation preview

  • 8/10/2019 1st Sessional Notes

    1/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    1

    1st

    Sessional Notes

    The Five Generations of Computers

    The history of computer development is often referred to in reference to the different generations

    of computing devices. Each of the five generations of computers is characterized by a majortechnological development that fundamentally changed the way computers operate, resulting in

    increasingly smaller, cheaper, and more powerful and more efficient and reliable computingdevices.

    Following are the main five generationsof computers

    First Generation (1940-1956) Vacuum Tubes

    The first computers used vacuum tubes for circuitry and magnetic drums for memory, and wereoften enormous, taking up entire rooms. They were very expensive to operate and in addition to

    using a great deal of electricity, generated a lot of heat, which was often the cause ofmalfunctions.

    First generation computers relied on machine language, the lowest-level programming language

    understood by computers, to perform operations, and they could only solve one problem at atime. Input was based on punched cards and paper tape, and output was displayed on printouts.The UNIVAC and ENIAC computers are examples of first-generation computing devices. The

    UNIVAC was the first commercial computer delivered to a business client, the U.S. CensusBureau in 1951.

    The main features of First Generation are:

    Vacuum tube technology Unreliable

    Supported Machine language only Very costly

    Generate lot of heat Slow Input/output device

    Huge size Need of A.C.

    Non portable Consumed lot of electricity

    Second Generation (1956-1963) Transistors

    Transistors replaced vacuum tubes and ushered in the second generation of computers. The

    transistor was invented in 1947 but did not see widespread use in computers until the late 1950s.The transistor was far superior to the vacuum tube, allowing computers to become smaller,

    faster, cheaper, more energy-efficient and more reliable than their first-generation predecessors.Though the transistor still generated a great deal of heat that subjected the computer to damage,

    it was a vast improvement over the vacuum tube. Second-generation computers still relied onpunched cards for input and printouts for output.

    Second-generation computers moved from cryptic binary machine language to symbolic, orassembly, languages, which allowed programmers to specify instructions in words. High-level

    programming languages were also being developed at this time, such as early versions of

  • 8/10/2019 1st Sessional Notes

    2/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    2

    1st

    Sessional Notes

    COBOL and FORTRAN. These were also the first computers that stored their instructions intheir memory, which moved from a magnetic drum to magnetic core technology.

    The first computers of this generation were developed for the atomic energy industry.

    The main features of Second Generation are:

    Use of transistors Reliable as compared to First generation computers

    Smaller size as compared to First generation computers Generate less heat as compared to First generation computers

    Consumed less electricity as compared to First generation computers Faster than first generation computers

    Still very costly A.C. needed

    Support machine and assembly languages

    Third Generation (1964-1971) Integrated Circuits

    The development of the integrated circuit was the hallmark of the third generation of computers.Transistors were miniaturized and placed on silicon chips, called semiconductors, which

    drastically increased the speed and efficiency of computers.

    Instead of punched cards and printouts, users interacted with third generation computers throughkeyboards and monitors and interfaced with an operating system, which allowed the device to

    run many different applications at one time with a central program that monitored the memory.Computers for the first time became accessible to a mass audience because they were smaller

    and cheaper than their predecessors.

    The main features of Third Generation are:

    IC used

    More reliable Smaller size

    Generate less heat Faster

    Lesser maintenance Still costly

    A.C needed

    Consumed lesser electricity Support high level language

    Fourth Generation (1971-Present) Microprocessors

    The microprocessor brought the fourth generation of computers, as thousands of integratedcircuits were built onto a single silicon chip. What in the first generation filled an entire room

    could now fit in the palm of the hand. The Intel 4004 chip, developed in 1971, located all the

  • 8/10/2019 1st Sessional Notes

    3/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    3

    1st

    Sessional Notes

    components of the computerfrom the central processing unit and memory to input/outputcontrolson a single chip.

    In 1981 IBM introduced its first computer for the home user, and in 1984 Apple introduced the

    Macintosh. Microprocessors also moved out of the realm of desktop computers and into many

    areas of life as more and more everyday products began to use microprocessors.

    As these small computers became more powerful, they could be linked together to form

    networks, which eventually led to the development of the Internet. Fourth generation computersalso saw the development of GUIs, the mouse and handheld devices.

    The main features of Fourth Generation are:

    VLSI technology used Very cheap

    Portable and reliable

    Use of PC's Very small size Pipeline processing

    No A.C. needed Concept of internet was introduced

    Great developments in the fields of networks Computers became easily available

    Fifth Generation (Present and Beyond) Artificial Intelligence

    Fifth generation computing devices, based on artificial intelligence, are still in development,

    though there are some applications, such as voice recognition, that are being used today. The use

    of parallel processing and superconductors is helping to make artificial intelligence a reality.Quantum computation and molecular and nanotechnology will radically change the face ofcomputers in years to come. The goal of fifth-generation computing is to develop devices that

    respond to natural language input and are capable of learning and self-organization.

    The main features of Fifth Generation are:

    ULSI technology

    Development of true artificial intelligence Development of Natural language processing

    Advancement in Parallel Processing

    Advancement in Superconductor technology More user friendly interfaces with multimedia features Availability of very powerful and compact computers at cheaper rates

    Components of a Computer

    The five classic components of a computer are briefly described below.

  • 8/10/2019 1st Sessional Notes

    4/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    4

    1st

    Sessional Notes

    Datapath - manipulates the data coming through the processor. It also provides a small amount of

    temporary data storage.

    Control - generates control signals that direct the operation of memory and the datapath.

    Memory - holds instructions and most of the data for currently executing programs.

    Input - external devices such as keyboards, mice, disks, and networks that provide input tothe processor.

    Output - external devices such as displays, printers, disks, and networks that receive data fromthe processor.

    Block Diagram of Computer its Various Components

    Input: This is the process of entering data and programs in to the computer system. You shouldknow that computer is an electronic machine like any other machine which takes as inputs raw

    data and performs some processing giving out processed data. Therefore, the input unit takesdata from us to the computer in an organized manner for processing.

  • 8/10/2019 1st Sessional Notes

    5/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    5

    1st

    Sessional Notes

    2. Storage: The process of saving data and instructions permanently is known as storage. Datahas to be fed into the system before the actual processing starts. It is because the processing

    speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with

    the same speed. Therefore the data is first stored in the storage unit for faster access andprocessing. This storage unit or the primary storage of the computer system is designed to do theabove functionality. It provides space for storing data and instructions.

    The storage unit performs the following major functions: All data and instructions are stored here before and after processing.

    Intermediate results of processing are also stored here.

    3. Processing: The task of performing operations like arithmetic and logical operations is calledprocessing. The Central Processing Unit (CPU) takes data and instructions from the storage unit

    and makes all sorts of calculations based on the instructions given and the type of data provided.It is then sent back to the storage unit. 4. Output: This is the process of producing results from

    the data for getting useful information. Similarly the output produced by the computer afterprocessing must also be kept somewhere inside the computer before being given to you in human

    readable form. Again the output is also stored inside the computer for further processing.

    5. Control: The manner how instructions are executed and the above operations are performed.

    Controlling of all operations like input, processing and output are performed by control unit. It

    takes care of step by step processing of all operations inside the computer.

    System Software vs Application Software

    System software and application software are computer programs. The system software is also

    installed during the installation of the operating system. However, the application softwareutilizes the capabilities of the computer on which it is installed.

    System Software

    The programs and the file that comprises the operating system are called system software. These

    files include configuration files, system preferences, system services, libraries of functions andthe drivers for the hardware installed on the computer. The computer programs in system

    software include compilers, system utilities, assemblers, debuggers and file management tools.

    Once you install the operating system, the system software is also installed. Program such

    Software update or Windows update can be used to update the system software. However,the end user does not run the system software. For example, while using the web browser, youdont need to use the assembler program.

    System software is also called low-level software as it runs at most basic level of the computer. It

    just creates a graphical user interface thorough which the user can interact with hardware with

  • 8/10/2019 1st Sessional Notes

    6/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    6

    1st

    Sessional Notes

    the help of operating system. System software just runs at the back so you dont need to botherabout it.

    The system software provides an environment to run application software and it controls the

    computer as well as the applications installed on the machine.

    Application software

    The subclass of a computer program which utilizes the capabilities of computer is called

    application software. Application here means the application software and the implementation.The example of application software programs includes media players, spreadsheets and word

    processors. When multiple applications are packaged together then it is called application suite.

    There is a common user interface in each application suite which makes it easier for the user tolearn different applications. In some cases, such as Microsoft Office, the various application

    programs have the ability to interact with each other. This facility is very handy for the user. For

    example, a user can embed the spreadsheet in a word processor using the application software.Application software cannot run without the presence of system software.

    Difference between system software and application software

    System software gets installed when the operating system is installed on the

    computer while application software is installed according to the requirements ofthe user.

    System software includes programs such as compilers, debuggers, drivers,assemblers while application software includes media players, word processors,

    and spreadsheet programs.

    Generally, users do not interact with system software as it works in thebackground whereas users interact with application software while doing different

    activities.

    A computer may not require more than one type of system software while theremay be a number of application software programs installed on the computer at thesame time.

    System software can run independently of the application software while

    application software cannot run without the presence of the system software.

    Compiler: A Compiler translates high-level instructions directly into machine language.

    Compiled programs generally run faster than interpreted programs.A compiler reads, analyses and translates code into either an object file or a list of error messages

  • 8/10/2019 1st Sessional Notes

    7/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    7

    1st

    Sessional Notes

    Interpreter:An Interpreter translates high-level instructions into an intermediate form, which itthen executes.

    Assembler: A program that translates programs from assembly language to machine language

    An assembly language is a low-level programming language for computers, microprocessors,

    microcontrollers, and other programmable devices. It implements a symbolic representation ofthe machine codes and other constants needed to program a given CPU architecture. Thisrepresentation is usually defined by the hardware manufacturer, and is based on mnemonics .

    Linker: A linker combines one or more object files and possible some library code into either

    some executable, some library or a list of error messages.

    Loader: A loader reads the executable code into memory, does some address translation and triesto run the program resulting in a running program or an error message (or both).

    Input Devices

    Following are few of the important input devices which are used in Computer Systems

    Keyboard

    Mouse Joy Stick

    Light pen Track Ball

    Scanner Graphic Tablet

    Microphone

    Magnetic Ink Card Reader(MICR) Optical Character Reader(OCR) Bar Code Reader

    Optical Mark Reader

    Keyboard

    Most common and very popular input device is keyboard. The keyboard helps in inputting thedata to the computer.The layout of the keyboard is like that of traditional typewriter, although

    there are some additional keys provided for performing some additional functions.Keyboard are of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys keyboard is

    also available for Windows and Internet.

    The keys are followingSr. No. Keys Description

    1 Typing KeysThese keys include the letter keys (A-Z) and digits keys (0-9)

    which are generally give same layout as that of typewriters.

  • 8/10/2019 1st Sessional Notes

    8/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    8

    1st

    Sessional Notes

    2 Numeric Keypad

    It is used to enter numeric data or cursor movement.

    Generally, it consists of a set of 17 keys that are laid out in the

    same configuration used by most adding machine and

    calculators.

    3 Function Keys

    The twelve functions keys are present on the keyboard. These

    are arranged in a row along the top of the keyboard.Each

    function key has unique meaning and is used for some specific

    purpose.

    4 Control keys

    These keys provides cursor and screen control. It includes four

    directional arrow key.Control keys also include Home,

    End,Insert, Delete, Page Up, Page Down, Control(Ctrl),

    Alternate(Alt), Escape(Esc).

    5 Special Purpose Keys

    Keyboard also contains some special purpose keys such as

    Enter, Shift, Caps Lock, Num Lock, Space bar, Tab, and Print

    Screen.

    Mouse

    Mouse is most popular Pointing device. It is a very famous cursor-control device. It is a smallpalm size box with a round ball at its base which senses the movement of mouse and sends

    corresponding signals to CPU on pressing the buttons.

    Generally it has two buttons called left and right button and scroll bar is present at the mid.

    Mouse can be used to control the position of cursor on screen, but it cannot be used to enter textinto the computer.

    Advantages

    Easy to use

    Not very expensive Moves the cursor faster than the arrow keys of keyboard.

  • 8/10/2019 1st Sessional Notes

    9/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    9

    1st

    Sessional Notes

    Joystick

    Joystick is also a pointing device which is used to move cursor position on a monitor screen. It is

    a stick having a spherical ball at its both lower and upper ends. The lower spherical ball moves ina socket.TheJoystic can be moved in all four directions.

    The function of joystic is similar to that of a mouse. It is mainly used in Computer AidedDesigning(CAD) and playing computer games.

    Light Pen

    Light pen is a pointing device which is similar to a pen. It is used to select a displayed menu item

    or draw pictures on the monitor screen.It consists of a photocell and an optical system placed in asmall tube.

    When light pen's tip is moved over the monitor screen and pen button is pressed, its photocellsensing element detects the screen location and sends the corresponding signal to the CPU.

    Track Ball

    Track ball is an input device that is mostly used in notebook or laptop computer, instead of amouse. This is a ball which is half inserted and by moving fingers on ball, pointer can be moved.

    Since the whole device is not moved, a track ball requires less space than a mouse. A track ball

    comes in various shapes like a ball, a button and a square.

  • 8/10/2019 1st Sessional Notes

    10/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    10

    1st

    Sessional Notes

    Scanner

    Scanner is an input device which works more like a photocopy machine. It is used when someinformation is available on a paper and it is to be transferred to the hard disc of the computer for

    further manipulation.Scanner captures images from the source which are then converted into the digital form that can

    be stored on the disc.These images can be edited before they are printed.

    Digitizer

    Digitizer is an input device which converts analog information into a digital form. Digitizer canconvert a signal from the television camera into a series of numbers that could be stored in acomputer. They can be used by the computer to create a picture of whatever the camera had been

    pointed at.Digitizer is also known as Tablet or Graphics Tablet because it converts graphics and pictorial

    data into binary inputs. A graphic tablet as digitizer is used for doing fine works of drawing andimages manipulation applications.

  • 8/10/2019 1st Sessional Notes

    11/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    11

    1st

    Sessional Notes

    Microphone

    Microphone is an input device to input sound that is then stored in digital form. The microphone

    is used for various applications like adding sound to a multimedia presentation or for mixingmusic.

    Magnetic Ink Card Reader(MICR)

    MICR input device is generally used in banks because of a large number of cheques to beprocessed every day. The bank's code number and cheque number are printed on the cheques

    with a special type of ink that contains particles of magnetic material that are machine readable.

    This reading process is called Magnetic Ink Character Recognition(MICR). The main advantagesof MICR is that it is fast and less error prone.

    Optical Character Reader(OCR)

    OCR is an input device used to read a printed text. OCR scans text optically character bycharacter, converts them into a machine readable code and stores the text on the system memory.

  • 8/10/2019 1st Sessional Notes

    12/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    12

    1st

    Sessional Notes

    Bar Code Readers

    Bar Code Reader is a device used for reading bar coded data (data in form of light and dark

    lines). Bar coded data is generally used in labelling goods, numbering the books etc. It may be ahand held scanner or may be embedded in a stationary scanner.

    Bar Code Reader scans a bar code image, converts it into an alphanumeric value which is then

    fed to the computer to which bar code reader is connected.

    Optical Mark Reader(OMR)

    OMR is a special type of optical scanner used to recognize the type of mark made by pen or

    pencil. It is used where one out of a few alternatives is to be selected and marked. It is speciallyused for checking the answer sheets of examinations having multiple choice questions.

    Output Devices:Following are few of the important output devices which are used in Computer Systems

    Monitors Graphic Plotter

    Printer

    Monitors

    Monitor commonly called as Visual Display Unit (VDU) is the main output device of a

    computer. It forms images from tiny dots, called pixels, that are arranged in a rectangular form.The sharpness of the image depends upon the no. of the pixels.

    There are two kinds of viewing screen used for monitors. Cathode-Ray Tube (CRT)

    Flat- Panel DisplayCathode-Ray Tube (CRT) Monitor

    In the CRT display is made up of small picture elements called pixels for short.The smaller the

    pixels, the better the image clarity, or resolution.It takes more than one illuminated pixel to formwhole character, such as the letter e in the word help.

  • 8/10/2019 1st Sessional Notes

    13/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    13

    1st

    Sessional Notes

    A finite number of character can be displayed on a screen at once.The screen can be divided intoa series of character boxes - fixed location on the screen where a standard character can be

    placed.The most screens are capable of displaying 80 characters of data horizontally and 25 lines

    vertically. There are some disadvantage of CRT

    Large in Size High Power consumption

    Flat-Panel Display Monitor

    The flat-panel display refers to a class of video devices that have reduced volume, weight andpower requirement compare to the CRT. You can hang them on walls or wear them on yourwrists. Current uses for flat-panel displays include calculators, videogames, monitors, laptop

    computer, graphics display.

    The flat-panel display are divided into two categories

    Emissive Displays- The emissive displays are devices that convert electrical energy into

    light. Example are plasma panel and LED(Light-Emitting Diodes). Non-Emissive Displays - The Non-emissive displays use optical effects to convert

    sunlight or light from some other source into graphics patterns.Example is LCD(Liquid-

    Crystal Device)

    Printers

    Printer is the most important output device, which is used to print information on paper.

    There are two types of printers

    Impact Printers Non-Impact Printers

  • 8/10/2019 1st Sessional Notes

    14/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    14

    1st

    Sessional Notes

    Impact Printers

    The printers that print the characters by striking against the ribbon and onto the paper, are called

    impact printers.

    Characteristics of Impact Printers are following

    Very low consumable costs

    Impact printers are very noisy Useful for bulk printing due to low cost

    There is physical contact with the paper to produce an image

    These printers are of two types

    Character printers

    Line printers

    Character Printers:Character Printers are printers which print one character at a time.

    These are of further two types

    Dot Matrix Printer(DMP)

    Daisy Wheel

    Dot Matrix Printer

    In the market one of the most popular printer is Dot Matrix Printer because of their ease ofprinting features and economical price. Each character printed is in form of pattern of Dot's and

    head consists of a Matrix of Pins of size(5*7, 7*9, 9*7 or 9*9) which comes out to form acharacter that is why it is called Dot Matrix Printer.

    Advantages

    Inexpensive

    Widely Used Other language characters can be printed

    Disadvantages

    Slow Speed Poor Quality

  • 8/10/2019 1st Sessional Notes

    15/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    15

    1st

    Sessional Notes

    Daisy Wheel

    Head is lying on a wheel and Pins corresponding to characters are like petals of Daisy(flower

    name) that is why it is called Daisy Wheel Printer. These printers are generally used for word-processing in offices which require a few letters to be send here and there with very nice quality

    representation.Advantages

    More reliable than DMP's Better quality

    The fonts of character can be easily changed.Disadvantages

    Slower than DMP's Noisy

    More expensive than DMP's

    Line Printers

    Line printers are printers which print one line at a time.

    These are of further two types

    Drum Printer Chain Printer

  • 8/10/2019 1st Sessional Notes

    16/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    16

    1st

    Sessional Notes

    Drum Printer

    This printer is like a drum in shape so it called drum printer. The surface of drum is divided into

    number of tracks. Total tracks are equal to size of paper i.e for a paper width of 132 characters,Drum will have 132 tracks. A character set is embossed on track. The different characters sets

    are available in market 48 character set, 64 and 96 characters set.One rotation of drum prints one

    line. Drum Printers are fast in speed and speed in between 300 to 2000 lines per minute.

    Advantages

    Very high speed

    Disadvantages

    Very expensive

    Characters fonts can not be changed

    Chain PrinterIn this printer chain of character sets are used so it called Chain Printers.A standard character setmay have 48, 64, 96 characters.

    Advantages

    Character fonts can easily be changed.

    Different languages can be used with the same printer.

    Disadvantages

    Noisy Do not have the ability to print any shape of characters.

    Non-impact Printers

    The printers that print the characters without striking against the ribbon and onto the paper, arecalled Non-impact Printers. These printers print a complete page at a time, also called as Page

    Printers.

    These printers are of two types

    Laser Printers

    Inkjet Printers

    Characteristics of Non-impact Printers

    Faster than impact printers.

    They are not noisy. High quality.

  • 8/10/2019 1st Sessional Notes

    17/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    17

    1st

    Sessional Notes

    Support many fonts and different character size.

    Laser Printers

    These are non-impact page printers. They use laser lights to produces the dots needed to form thecharacters to be printed on a page.

    Advantages Very high speed.

    Very high quality output. Give good graphics quality.

    Support many fonts and different character size.Disadvantage

    Expensive. Cannot be used to produce multiple copies of a document in a single printing.

    Inkjet Printers

    Inkjet printers are non-impact character printers based on a relatively new technology. They print

    characters by spraying small drops of ink onto paper. Inkjet printers produce high quality outputwith presentable features.

    They make less noise because no hammering is done and these have many styles of printingmodes available. Colour printing is also possible. Some models of Inkjet printers can produce

    multiple copies of printing also.

    Advantages

    High quality printing More reliable

    Disadvantages

    Expensive as cost per page is high Slow as compare to laser printer

  • 8/10/2019 1st Sessional Notes

    18/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    18

    1st

    Sessional Notes

    Primary storage device

    Alternatively referred to as internal memory, main memory, and primary memory, primary

    storage is a storage location that holds memory for short periods of times while the computerrunning. This storage is the fastest memory in your computer and is used to store data while it's

    being used. For example, when you open a program data is moved from the secondary storageinto the primary storage.

    Primary Storage Devices:

    1. RAM2. ROM

    3. PROM4. EPROM

    5. EEPROM

    Random-access memory (RAM):RAM is a form of primary storage, it is volatile. RAM takes the form of integrated circuits and itis used to temporarily store data and allows quick access to this stored data. This data can be

    accessed in any order.Read-only memory (ROM):

  • 8/10/2019 1st Sessional Notes

    19/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    19

    1st

    Sessional Notes

    ROM is a class of non-volatile storage device that is programmed at creation, it cannot bereprogrammed at any later time. Data stored in ROM cannot be modified, therefore, it is mainly

    used to store firmware (firmware is software that is very closely tied to specific hardware, andunlikely to need frequent updates).

    Programmable Read-only memory (PROM):

    PROM is a form of ROM that is one-time programmable. This means that this device can only

    be programmed once and can never be reprogrammed. The key difference from ROM is that theprogramming is applied after the device is created.

    Erasable Programmable read only memory(EPROM):

    EPROM is a type of ROM. EPROM Differs from PROM in that it can be erased by exposing itto strong ultraviolet light from a mercury-vapor light source.

    Electronically Erasable Programmable read only memory(EEPROM):

    EEPROM is also a type of ROM. EEPROM Differs from EPROM in that it can be erasedelectronically. An example of an EEPROM device is the Flash Drive.

    Types of Secondary Storage

    There are several types of secondary storage media used today in the world, each of these can be

    compared to each other in terms of portability, speed and capacity. Here are discussions on someSecondary Storage Devices:

    Magnetic Tape

    Magnetic Tape is a recording medium consisting of a thin tape with a coating of a fine magnetic

    material, used for recording analogue or digital data. A device that stores computer data onmagnetic tape is a tape drive. The capacity of tape media are generally on the same order as hard

    disk drives (The largest being about 5 Terabytes in 2011). Magnetic Tapes Generally transferdata a bit slower than hard drives, however magnetic tapes are cheaper and are more durable

  • 8/10/2019 1st Sessional Notes

    20/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    20

    1st

    Sessional Notes

    Floppy Disk

    Floppy Disks were an were a ubiquitous form of data storage between 1980's and early 2000's,

    However they have now been superseded by data storage methods with much greater capacity,such as USB flash drives. Floppy disks comes in 3 sizes: 8-inches, 5.5-inches and 3.5-inches.

    The capacities of Floppy disks vary between 1-250 Megabytes and these devices were very slow,reading data at rates of bytes and kbytes/second. However, most are very small and portable.

    Hard Disk

    The hard disk drive is the main, and usually largest data storage device in a computer. It is a non-volatile, random access digital magnetic data storage device. A hard drive is made up of platterswhich stored the data, and read/write heads to transfer data. A Hard Drive is generally the fastest

    of the secondary storage devices, and has the largest data storage capacicity, approximately thesame as Magnetic Tapes. Hard drives however, are not very portable and are primarily used

    internally in a computer system. Some persons use hard drives externally as a form of storageand as a substitute for portable storage, hard drives used for these purposes are called external

    hard drives.

    A Hard Disk is divided into tracks and sectors, Data on this hard disk is positioned into thesetracks and sectors so they can be easily read by the heads and also to help reduce fragmentation

    on the hard disk. Below are 2 diagrams depicting how a hard disk is divided into tracks andsectors:

  • 8/10/2019 1st Sessional Notes

    21/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    21

    1st

    Sessional Notes

    Data on a hard drive are accessed by two methods:1. Fixed Head: Hard Disks with fixed heads have a read/write head for each track on the hard

    disk, since there is no moving of heads to access data, the data access time is generally faster forFixed head Hard Drives.

    2. Moving Head: A moving head hard disk is one in which one or more read-write heads are

    attached to a movable arm which allows each head to cover many tracks of information

    Optical Disks

    Optical disk is an electronic data storage medium from which data is read and written to by using

    a low-powered laser beam. It is flat, circular, plastic or glass disk on which data is stored in the

    form of light and dark pits. There are three basic types of optical disks: Read-only optical disks,Write once read many Optical disks and Rewritable Optical disks. Two main types of optical

    disks are:

    CD- is an abbreviation of compact disk, and is a form of data storage that can transfer data up to

    the speed of 7800 KB/s. A standard 120 mm CD holds up to 700 MB of data, or about 70minutes of audio. There are two types of CD: CD-ROM and CD-RW, CD-ROM are stands forCD-Read Only Memory and they function the same way Read Only Memory Does. CD-RW

    Stards for CD-Rewritable, these disks can be erased and rewritten at any time.

    DVD: is an abbreviation of Digital Versatile Disc, and is an optical disc storage media format

    that can be used for data storage. The DVD supports disks with capacities of 4.7 GB to 17 GBand access rates of 600 KBps to 1.3 MBps. A standard DVD disc store up to 4.7 GB of data.

    There are two types of DVD's: DVD-ROM and DVD-RW. DVD-ROM are stands for DVD-Read Only Memory and they function the same way Read Only Memory Does. DVD-RW Stardsfor DVD-Rewritable, these disks can be erased and rewritten at any time.

  • 8/10/2019 1st Sessional Notes

    22/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    22

    1st

    Sessional Notes

    Flash Drive

    A flash drive is a small external storage device, typically the size of a human thumb that consists

    of flash memory. USB flash drives are removable and rewritable reads and writes to flash

    memory. They are a solid-state storage medium that's both inexpensive and durable. Currently,USB 2.0 flash drives on the market are able to reach a data transfer speed of 480 Mbit/s and USB

    3.0 has transmission speeds of up to 5 Gbit/s. USB Flash drives vary in sizes from 8 Megabytesto 512 Gigabytes. More commonly used sizes vary from 2 Gigabytes -16 Gigabytes.

    Flash Memory cards

    Flash memory is a EEPROM non-volatile computer storage chip. These Memory cards currentlyvary in sizes between 1 Gigabytes -16 Gigabytes and they transfer data at a rate of approximately

    14.65 MB/s. Flash memory cards have most of the same characteristics of a flash drive in thatthey are inexpensive and durable, and are very small. However Flash memory cards are Flat and

    have a size of about 1 inch * 0.75 inch with a thickness of about 2mm. Flash memory cards alsohave a smaller version which is used within cell phones; These smaller cards are about

    6mmX3mm in size and are less than 1mm thick.

    DOS Commands

    Microsoft Disk operating system, MS-DOSis a non-graphical command line operating systemcreated for IBM compatible computers that was first introduced by Microsoft in August 1981and was last updated in 1994 when MS-DOS 6.22 was released.

    DOS Commands are divided into 2 types:

  • 8/10/2019 1st Sessional Notes

    23/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    23

    1st

    Sessional Notes

    1. Internal Commands

    These are for performing basic operations on files and directories and they do not need

    any external file support.

    2.

    External Commands

    These external commands are for performing advanced tasks and they do need some

    external file support as they are not stored in COMMAND.COM

    INTERNAL COMMANDS

    1. These are those commands which are contained in command.com files of MS-DOS.2. These are those functions that are built into the command interpreter.

    3.

    There is no need of any external file in computer to read internal MS-DOS command.4.

    These commands can be used as long as DOS is running on the system.5. Internal commands do not vary from system to system.

    6. These are ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc.

    EXTERNAL COMMANDS

    1. These are those commands which are not in-built in MS-DOS.

    2. External commands are those which are not included in the interpreter.3. There is a need of an internal file in the computer to read external MS-DOS command.

    4.

    External command may vary from system to system. This means any two computers withsame version of MS-DOS may have same internal commands, but may have different

    external commands.5. These are tree, xcopy, diskcopy, more, print etc.

    Most Commonly Used Internal DOS Commands

    1.

    DATE

    This command is used to display the system current date setting and prompt you to enter

    a new date. The syntax is: DATE [/T | date]

  • 8/10/2019 1st Sessional Notes

    24/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    24

    1st

    Sessional Notes

    If you type DATE without parameters then it displays current date and prompts to enter

    new date. We should give new date in mm-dd-yy format. If you want to keep the same

    date just Press ENTER. DATE command with /T switch tells the command to just output

    the current system date, without prompting for a new date.

    2.

    TIME

    This command is used to displays or set the system time.

    The syntax is: TIME [/T | time]

    Same as DATE command, typing TIME with no parameters displays the current time and

    a prompt for a new one. Press ENTER to keep the same time. TIME command used with

    /T switch tells the command to just output the current system time, without prompting for

    a new time.

    3. COPY CON

    It is used to create a file in the existing directory. Here CON is a DOS reserved word

    which stands for console.

    Syntax is: COPY CON filename after that press Enter and start typing your text and

    after you're done typing your text, to save and exit hit F6 key.

    4.

    TYPE

  • 8/10/2019 1st Sessional Notes

    25/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    25

    1st

    Sessional Notes

    This command is used to display the contents of a text file or files. The syntax is: TYPE

    [drive:][path]filename

    Now, lets try to display the contents of the file named filename we've created earlier

    using COPY CON command.

    5. CLS

    It is used to clear the screen. Syntax is CLS

    6. REN

    This command is used to change/modify the name of a file or files.

    Syntax is: REN [drive:] [path] filename1 filename2.

    Here, filename1 is source file for which you wanted to change the name, and filename2

    will obviously becomes your new file name. Also note that you cannot specify a new

    drive or path for your destination file.

    7.

    DIR

    This command displays a list of files and subdirectories in a directory. Syntax is: DIR

    [drive:] [path] [filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L]

    [/N] [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

    Here,

  • 8/10/2019 1st Sessional Notes

    26/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    26

    1st

    Sessional Notes

    [drive:][path][filename] Specifies drive, directory, and/or files to list.

    /A:attributes

    Displays files with specified attributes. The possible attributes are as

    follow: D Directories, R Read-only files, H Hidden files, A

    Files ready for archiving, S System files, - Prefix meaning not

    /B display in bare format with no heading information or summary

    /CUsing this attribute with dir by default displays the thousand separator

    in file sizes. To disable display or separator use /-C

    /D Displays file list sorted by column.

    /L Uses lowercase in listing file names and sub-directories.

    /N Display in new long list format where filenames are on the far right.

    /O:sortorder

    Displays list by files in sorted order. The sortorder attributes are as

    follow: N By name (alphabetic), S By size (smallest first), E

    By extension (alphabetic), D By date/time (oldest first), G Group

    directories first, - Prefix to reverse order

    /PDisplay page wise pausing after each screenful of information and

    prompts to press any key to continue.

    /Q Displays the owner of a file or files.

    /S

    Displays files in specified directory and all subdirectories. Bear caution

    in using this in your root directory as you may end up in overflowing

    information. To stop the screen overflow at any point hit Pause-Break

    key.

    T:timefieldThis sorts and displays the list based on time field specified. C for

    Creation, A for Last Access, W for Last Written

    /W Displays list width wise or wide list format.

    /XThis is used to display the short names generated for non-8dot3 file

    names.

  • 8/10/2019 1st Sessional Notes

    27/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    27

    1st

    Sessional Notes

    Note that switches may be different in the DIRCMD environment variable, in which case

    just override present switches by prefixing any switch with - (hyphen), for example

    instead of using /P use /-P

    8.

    PATH

    This command displays the path that how we have come to the present position or sets a

    search path for executable files.

    Its Syntax is PATH [[drive:]path[;...][;%PATH%]]

    Typing PATH without any parameters displays the current path under current directory.

    Typing PATH ; clears all search-path settings and direct cmd.exe to search only in the

    current directory. And including %PATH% in the new path setting causes the old path to

    be appended to the new setting.

    9.

    VER

    This command displays the version of the Microsoft Windows running on your computer.

    10.VOL

    It displays the disk volume label and serial number, if they exist for the drive specified. If

    no drive is specified it displays for the active drive.

    Syntax is VOL [drive:]

    11.

    DEL/ERASE

    Used to delete one or more files.

    Syntax is DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

    Here,

    tr>

  • 8/10/2019 1st Sessional Notes

    28/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    28

    1st

    Sessional Notes

    names

    Specifies a list of one or more files or directories. Wildcards * and ? may be used to

    delete multiple files. * indicates group of unknown characters whereas using

    wildcard ? in file-names is for single unknown character. And using this command

    if a directory is specified, all files within the directory will be deleted.

    /P

    Prompts for (Y)es/(N)o confirmation before deleting each

    file.

    /F Used to force delete read-only files.

    /S

    Delete specified files from all subdirectories. If Command Extensions are enabled

    DEL and ERASE change while using /S switch such that it shows you only the files

    that are deleted, not the ones it could not find.

    /Q Delete in quite mode and do not ask if ok to delete on global wildcard

    /A:attributes

    Delete files based on specified attribute. The attributes are: R for Read-only files, S

    for System files, H for Hidden files, A for files ready for archiving and - Prefix

    meaning not.

    12.

    COPY

    This command is useful in copying one or more files to another file or location. Syntax is

    COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B] [+ source [/A |

    /B] [+ ...]] [destination [/A | /B]]

    The different switches that can be used with this command as follow along with their use.

    source It specifies the file or files to be copied.

    /A Indicates an ASCII text file.

    /B This switch indicates a binary file.

    /D This allows the destination file to be created with decryption.

  • 8/10/2019 1st Sessional Notes

    29/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    29

    1st

    Sessional Notes

    destination This specifies the directory and/or filename for the new file or files.

    /V Helps to verify new files to be written correctly.

    /N

    Specifying this switch uses short filename, if available, when copying a file with a

    non-8dot3 file name.

    /YIf destination file already exists, this switch suppresses prompting to confirm you

    want to overwrite it and does it asap.

    /-YContrary to above switch, this causes prompting to confirm you want to overwrite an

    existing destination file.

    /Z Copies networked files in restartable mode.

    For appending multiple files for source use wildcard or file1+file2+file3 format and make

    sure to specify a single file for destination.

    13.MD, CD and RDo MD (or MKDIR) command stand for make directory and it is used to create a

    directory. Syntax is MD [drive:]path

    o CD (or CHDIR)stands for create or change directory and it allows to display thename of or change the current directory or rather we can say come out of a

    directory. Syntax is CD [/D] [drive:][path] Typing CD drive:displays the current directory in the specified drive. This CD

    (or CHDIR) command does not treat spaces as delimiters due to which it allows toCD into a subdirectory name that contains a space without surrounding the name

    with quotes.For example:

    CHDIR \program files\mozilla firefoxis the same as:

    CHDIR "\program files\mozilla firefox"

    If you type CDwithout any parameters it displays current drive and directory.CD..specifies that you want to change to the higher directory in the current path.

    Whereas, using CD\ you can directly change to parent/root directory from any

  • 8/10/2019 1st Sessional Notes

    30/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    30

    1st

    Sessional Notes

    location in the current drive.

    Using /D switch changes current drive in addition to current directory for adrive.

    o RD (or RMDIR) command removes or deletes a directory. There are twoconditions to remove any directory - (1) Directory to be removed should be

    empty. and (2) We should be outside the directory we are commanding to delete.Syntax is RD [/S] [/Q] [drive:]path

    Here, using the switch /S removes a directory tree meaning it removes alldirectories and files in the specified directory in addition to the directory itself.

    And using /Q is the quiet mode that doesn't asks for ok approval to remove adirectory tree.

    Most Commonly Used External DOS Commands

    1. EDIT

    This command is used to modify or change the data of a file.

    Syntax is EDIT [/B] [/H] [/R] [/S] [filename(s)]

    Using switch /B you can force the edit in monochrome mode. /H displays the maximum

    number of lines possible for your system hardware. Whereas using /R and /S one can load

    files in read-only mode and force the use of short filenames respectively. [filename(s)] is

    used to specify file(s) to go edit. You can use wildcards (* and ?) to specify multiple

    files.

    2.

    XCOPY

    This command is used to copy files and directory trees from one disk to another disk.

    Syntax is XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]]

    [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O]

    [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...]

  • 8/10/2019 1st Sessional Notes

    31/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    31

    1st

    Sessional Notes

    3. LABEL

    It is used to create, change, or delete the volume label of a disk.

    Syntax is LABEL [drive:] [label]

    LABEL [/MP] [volume] [label]

    Here, [drive:] is for secifying the drive letter of a drive to be labelled and [label] specifies

    the label of the volume disk. [/MP] is used to specify that the volume should be created as

    a mount point and [volume] is used to specify volume name, usually mentioned after

    drive letter followed by colon and then giving volume name required.

    4. DISKCOPY

    This command copies the contents of one floppy from the source drive to a formatted or

    un-formatted floppy disk in the destination drive. This command copies the data from

    particular position on the source disk to exactly the same position on the destination disk.Syntax Diskcopy A: B:

    copies contents of A: to B: drive. This command can be used with /V switch which

    verifies that the disk is copied correctly.

    5. CHKDSK

    This command is used to check a disk and display a status report with properties of disk

    like serial number, volume label, memory and other properties along with errors on the

    disk if any.

    Syntax is CHKDSK [volume path] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

    [volume path] is where you specify the drive letter followed by a colon and volume name

    to be checked. using /F switch allows you to fix errors on the disk. /V display full path

    and/or cleanup message if any. /R is used in tandem with /F and used to locate bad

    sectors and recover readable information. If you wanted to perform a less vigorous check

    of index entries on the disk then the right option is to use /I or /C rather then /R as they

    skip checking of cycles on the volume and helps in reducing the amount of time required

    to run chkdsk. Using /X forces the volume to dismount first before checking is

    performed. /L:size is all about specifying the log file size in kilobytes.

    6. TREE

    This command is very useful to view the list of directories and subdirectories present on

    the disk in graphical form. If you wanted to include files also with directories and

    subdirectories, then you'll have to give the command line as tree/f which presents the tree

  • 8/10/2019 1st Sessional Notes

    32/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    32

    1st

    Sessional Notes

    view of all the content on your disk. Here is the syntax for this command with allowed

    switches:

    TREE [drive:path] [/F] [/A]

    In case you wanted use ASCII instead of extended characters, then go ahead include /A in

    the command line.

    7. DELTREE

    This command is used to remove a directory along with its contents.

    Syntax is deltree [drive:path]

    here, [drive:path] specifies the directory name to be deleted. All the subdirectories and

    files in this directory will be deleted without prompt and there's not getting back. So,

    keep caution while using this command.

    8. DOSKEY

    This command is generally used to edits command lines and recalls commands.

    Syntax is DOSKEY [/REINSTALL] [/HISTORY] [text]

    Here, /REINSTALL installs new copy of doskey, /HISTORY is used to display all

    previously given commands stored in memory. And [text] specifies the commands you

    want to record.

    9. FIND

    This command searches for a specific text string in a file or files. Syntax is FIND [/V][/C] [/N] [/I] [/OFF] "string" [[drive:][path]filename[ ...]]

    The basic essential elements in the command line for find are - the string enclosed in " "

    and [[drive:][path]filename(s)]. String specifies the text string to find in the file and

    [[drive:][path]filename(s)] specifies the file or files where the text string search is to be

    done. If a path is not specified, FIND searches the text typed at the prompt or piped from

    another command. When you append /OFF in the command line, it searches and finds

    even those files with offline attribute set. Apart from searching the text string, this

    command is useful in:

    o Displaying all lines not containing the specified string @ /Vo Displaying only the number count of lines containing the text string @ /C

    o Displaying line numbers with the displayed lines @ /N

    10.SORT

  • 8/10/2019 1st Sessional Notes

    33/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    33

    1st

    Sessional Notes

    This command is used to arrange the data of a file in alphabetical order (A-Z, 0-9) or

    reverse alphabetical order.

    Syntax is SORT [/R] [[drive1:][path1]filename1] [/T [drive2:][path2]] [/O

    [drive3:][path3]filename3]

    /R in command line reverses the sort order; that is, the data of the specified file sorts sorts

    Z to A, then 9 to 0. [drive1:][path1]filename1 specifies the file to be sorted.

    /T [drive2:][path2] is used in cases of data overflow in main memory and it specifies the

    path of the directory to hold the sort's working storage. And /O [drive3:][path3]filename3

    specifies the file where the sorted input is to be stored.

    11.FORMAT

    This command creates a new root directory and a File Allocation Table (FAT) for the

    disk. In order for MS-DOS to be able to use a new disk you must use this command to

    format the disk.

    FORMAT with /S switch

    When the disk is formatted with /s option, the disk can be used as a booting disk.

    C:\>DOS>Format A: /s

    The above command copies the OS files MSDOS.SYS, IO.SYS and COMMAND.COM

    which are required for booting the machine from your system startup drive to the newly

    formatted disk. The disk can then be used for booting.

    FORMAT with /U switch

    Here's the command C:\DOS>Format A: /U

    This command specifies an Unconditional Format which destroys all existing data and

    prevents you from later unformatting the disk.

    FORMAT with /Q switch

    This can be used only with the previously formatted disk. This deletes FAT, Root

    directory and data of disk but doesn't scan for the bad errors. This is generally used for

    Quick formatting.

    WarningAs Format command deletes all existing data, use this command with extreme

    caution. Any disk formatted (except with /U switch) may be later unformatted using the

    UNFORMAT command.

  • 8/10/2019 1st Sessional Notes

    34/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    34

    1st

    Sessional Notes

    12.BACKUP

    The Backup command backs up one or more files from one disk to another. You can

    backup files onto either a hard disk or on a floppy disk. Syntax is

    BACKUP Source Destination

    Here source specifies the location of files to be backed up and destination drive specifies

    the drive on which you want to store the backup files. The backed-up files are stored in

    backup.nnn and control.nnn files where nnn represents the backup disk number.

    Backup with Switches

    o The /S switch can be used to backup the contents of all files in the source

    including the contents of sub-directories.

    o The /N switch can be used to backup only those files that have changed since the

    last backup.

    o Backup command with /D:mm-dd-yyyy switch will backup files that havechanged since the data specified.

    13.

    RESTORE

    The RESTORE command restores files that were backed up by using BACKUPcommand. Syntax: RESTORE drive1 drive2:path

    Here drive1 specifies the drive on which backup files are stored.

    drive2:path specifies the path to which those backup files will be restored.

    Using backup command with /S switch is used to restore all backup files to their

    original directories and sub-directories.

    Introduction to flowcharts

    A flowchart is a graphical representation of an algorithm. These flowcharts play a vital role in

    the programming of a problem and are quite helpful in understanding the logic of complicated

    and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any

    high level language. Often we see how flowcharts are helpful in explaining the program to

    others. Hence, it is correct to say that a flowchart is a must for the better documentation of a

    complex program.

  • 8/10/2019 1st Sessional Notes

    35/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    35

    1st

    Sessional Notes

    Flowcharts are usually drawn using some standard symbols; however,

    PART II: Example of a flowchart:

    Problem 1: Write an algorithm and draw the flowchart for finding the average of two numbers

    Algorithm:

    Input: two numbers x and y

    Output: the average of x and y

    Steps:

    1. input x2. input y

    3. sum = x + y4. average = sum /2

    5.

    output average

    START

    Input x

    Input y

    Sum = x + y

    Average = sum/2

    Output

    Average

    END

  • 8/10/2019 1st Sessional Notes

    36/36

    FUNDAMENTALS OF COMPUTING: Paper Code: ETCS-111

    The following are some guidelines in flowcharting:

    a. In drawing a proper flowchart, all necessary requirements should be listed out in logical

    order.b. The flowchart should be clear, neat and easy to follow. There should not be any room forambiguity in understanding the flowchart.

    c. The usual direction of the flow of a procedure or system is from left to right or top tobottom.

    d. Only one flow line should come out from a process symbol.

    or

    e.

    Only one flow line should enter a decision symbol, but two or three flow lines, one foreach possible answer, should leave the decision symbol.

    f. Only one flow line is used in conjunction with terminal symbol.

    h. If the flowchart becomes complex, it is better to use connector symbols to reduce the

    number of flow lines. Avoid the intersection of flow lines if you want to make it moreeffective and better way of communication.

    i. Ensure that the flowchart has a logical startandfinish.j. It is useful to test the validity of the flowchart by passing through it with a simple test

    data.