Docstoc

Basic Computer pharm PU

Document Sample
Basic Computer pharm PU Powered By Docstoc
					     Basic Computer                                                                                     B.pharm PU




CSC 191 (Credit hours 3)


                               Computer Science (Introductory)




                                        B. Pharm., First Year, First Semester



Course Objectives:
    The objective of the course is to provide the students with a general view of computer architecture, its operation and
    application, familiarize the students with the existing technologies, and provide them with hands on experience on
    personal computers.


Course Contents:

1. Introduction to Computers                                                          3 hours
   History of Computers, Classification of Computers, Functioning of Computers, Computer Hardware,
   Software, Firmware


2. Number System                                                                               6 hours
 Decimal number system, Binary number system, Hexadecimal number system, Octal number system, Conversion of a
 number from one system to other, Addition and Subtraction of binary numbers, Compliments, Subtraction by 2’s
 compliment method

3. Boolean Algebra and Logic Gates                                                           5 hours
    Introduction, Basic operations of Boolean algebra, DeMorgan’s Theorem, Boolean variable and function,
    Boolean postulates, Dual and compliments of Boolean expression, SOP and POS standard forms,
    Canonical forms of Boolean expression, Simplification of Boolean expressions by Karnaugh method, Logic
    Gates-AND, OR, NOT, NOR, XOR, XNOR



4. Arithmetic Logic Unit and Memory Element                                                                2 hours
   Half adder, Full adder, Flip-flop, R-S flip-flop


5. Memory                                                                                                  3 hours
    Classification, RAM, ROM, Floppy disk, Hard disk


6. Input Output Devices and Computer Network                                                               5 hours


                                                           1
      Basic Computer                                                                                   B.pharm PU


    Role of input and output devices, Keyboard, Mouse, Scanners, MICR, Video terminals, Printers, Plotters,
    Digital to analog conversion, Introduction to computer network, Sharing, Network types


7. Word Processing                                                                                4 hours
    Introduction, Concept of file, Inputting the text, Formatting, Inserting the files and Symbols, Mail merge
    facility, Grammar checking, Auto correct feature (MS-Word is to be used)

8. Spreadsheet Analysis                                                                               4 hours
 Introduction to spreadsheets, Workbook and worksheet, Formula, Formatting and Graphics (MS-Excel is to be used)

9. Database Management                                                                                   4 hours
Data, Database, Input, Processing, Storage, Output (MS-Access is to be used)

10. Internet and Multimedia                                                                                 4 hours
 Introduction to Internet, e-mail, Introduction to slide, Making a presentation (MS-PowerPoint is to be used)

11. Programming Concepts                                                                                 5 hours
 Difference between a computer and calculator, Algorithm, Flowchart, Program, Programming language


Reference Books:
    1.   B. Ram: Computer Fundamentals, 1999, Willey Eastern Publication, New Delhi.
    2. O. S. Lawrence: Schaum’s Outline of Computers & Business, 2000, Mc-Grew Hill International., New
       Delhi.
    3. Suresh Basandra: Computer Systems Today, 1999, Galgotia Publication, New Delhi.
    4. M. Busby and R. A. Stultz: Office 2000, 2000, BPB Publication, New Delhi.




                                                           2
     Basic Computer                                                                           B.pharm PU




Computer
A computer is an electronic machine operating under human/user control that accepts data using some
input devices performs certain operations and displays the results in output devices.

Computers are used in wide areas of fields like house, schools, colleges, hospitals, business, and industries.
They are used to accomplished job in fast and efficient way. Computer is devices that can not do noting alone
without certain programs and instruction. A program is a set of code /instructions which causes a computer
to perform particular operations.

Computer System
The computer is called computer system because of different components work together to produce the
desired result to the user. The various components of computers of computer systems are as follows:
Hardware: All the physical components of the computer system are called hardware such as Monitor, CPU,
and Mouse etc.
Software: The collection of instruction or logical components that instruct the hardware to perform certain
task is called software.
Producer: The way of operating computer is called procedure.
Data /instruction: The raw data under which computer work and produce the useful information.
Connectivity: When two or more computers and other peripherals are connected to communicate in the
computer system.

Computer Architecture
Computer architecture is the theory behind the design of a computer. The digital computer can be divided
into 3 major sections are CPU, Memory and I-O unit. The simple architecture of computers are as follows. The
CPU and other Units are linked with the parallel communication channels data channels, address channels
and controls channels are called bus/cable.




Processor (CPU): The processors is a computer chip( Heart of computer) that receives the data input form the
input devices , processes the data in some way by performing calculations or reorganizing it, stores the

                                                      3
     Basic Computer                                                                            B.pharm PU


results in memory until it sends them to an output devices or stores them in a backup storage devices. The
CPU is divided into 3 major sections are follows:
Control Unit (CU): The control unit manages program instruction, so that data is received form input devices
and send to output devices at right time. It sends output control signals at a speed that is measured in
meghthertz (MHz).



Arithmetic and Logical Unit:
The arithmetic and logical Unit carries out all the arithmetic and logical operations that are needed to
produces data.
Register Unit:
It is special temporary storage location of CPU. Registers are very quickly accept, store and transfer data and
instruction that are being used currently.
Bus: A bus is simple a parallel communication pathway over which information and signals are transferred
between several computer components.
Address bus: The address bus is used to carry address signals for addressing data in different location in
computer memory. So that it is Unit directional bus.
Data bus: The data bus is used to communicate data form CPU and other internal unit of computer system.
Data bus is bi-directional.
Control bus: The control signals transmitted on the control bus to ensure that proper timing does occurs.

Affecting Factors for Speed of CPU
System Clock Rate: It is the rate of an electronic pulse used to synchronize processing and measured in MHZ
( 1 MHz= 1 million cycles per second).
Bus Width: The amount of data the CPU can transmit at a time to main memory and to input and output
devices. An 8 bit bus moves 8 bits of data at a time. They are 8, 16, 32, 64, and 128 so far.
Word Size: The amount of data than can be processed by the CPU at one time. An 8 bit processor can
manipulate 8 bits at a time. Processors can 8, 16, 32, 64 and so far. The bigger the number means the faster
the computer system.

Characteristics of Computer
Speed: Computer performs complex calculation at a very high speed. The speed of computer at performing a
single operation can measured in terms of Millisecond, Microsecond, Nanosecond and Picoseconds.
                                        1/1000(10-3) sec-1 Millisecond
                                       1/1000000(10-6)- 1 Microsecond
                                      1/1000000000(10-9)-1 Nanosecond
                                    1/1000000000000(10-12) Picoseconds
Storage: A large amount of data can store in computer memory. The storing capacity is measured in terms of
Bytes, Kilobytes, Megabytes, and gigabytes and Terabytes
                                         1024 Bytes= 1 Kilobytes (KB)
                                      1024 Kilobytes =1 Megabytes (MB)
                                      1024 Megabytes= 1 Gigabytes (GB)
                                          1024 GB= 1 Terabytes (TB)
Accuracy: A computer can perform all the calculation and comparison accurately. Sometimes errors may
produce by computers due to the fault in machine or due to Bugs in the programs. If input data are not
correct, this may also lead to incorrect output. The computer follows the simple rules of GIGO (Garbage in,
Garbage Out).



                                                      4
     Basic Computer                                                                              B.pharm PU


Reliability: Computer never tired, bored or lazy to do task i.e the computer is capable of performing task
repeatedly at the same level of speed and accuracy even if it has to carry complex operations for a long
period of time. Computers are quite capable to performing automatic, once the process is given to computer.
Automatic: Computer is an automatic machine. Everything that is given to computers is processed and dome
by computers automatically according to the instruction proved.
Versatility: A computer has wide range of application areas ie computers can do many types of jobs. IT can
perform operations ranging form single mathematical calculations to high complex and logical evaluations for
any extended periods of times. Some of the areas of computers applications are Educations, Sciences.
Technology, Business, Research etc.
Diligence: A computer can perform respective tasks without being bored, tired and losing concentration. It
can continuously work for several hours without human intervention after the data and program are feed to
it. They can handle complicated and complex task. There is not aging effect on computer ie efficiency does
not decrease over the years of use.

Limitations of Computers
    1. Sometime the failure in devices and programs can produce unreliable information.
    2. Computer is dull machine. It does not have intelligence on it.
    3. Computer can not draw conclusion without going through all intermediate steps.


Historical Development of Computer
The computer which is one of the most advanced discoveries of making has got a long history. Around 3000
years before the birth of Jesus Christ, there were no any kind of number system. So people had to remember
a lot of information. They felt the need to count the cattle. Then they started counting using their fingers. But
the limited number of finger had made difficult for them to remember more facts. So they used stone for
counting. As result around fifth century Hindu Philosopher could develop new methods of counting using
numbers 1 to 9. In 8th century Alkhawarism of Iraq developed 0. Since there are ten digits these number
systems method was called decimal system.

Mechanical Era/ the Age of Mechanical Calculator
The most significant early computing tools is ABACUS, was developed in 1000-1500 AD, a wooden rack
holding parallel rods on which different sizes balls are stung. The arithmetic operations can be carried out
with the help of breads on the wire. The frame consists of upper parts and lower parts. The upper part is
called heaven and lower is called earth. Each part consists of five beads on earth part and heaven parts
consist of two beads. This is used for addition and subtraction. In 1500, Leonardo da Vinchi developed
mechanical calculator, that was very heavy. A Scottish mathematician, John Napier (1614) invented another
calculator which was made of bone had more functionality add and multiplication of numbers. These are
analog computers which have been replaced modern times by pocket calculators. The significant evolution of
computing system was the invention of by French Mathematician, Blaise Pascal (1642). La Pascal machine
could also multiply, divide and find square root. In 1822 a professors of mathematician, Thomas (Charles
Xavier Thomas) developed a machine called differential engine was the first commercially mechanical
calculators. Charles Babbage (1792- 1871) at Cambridge was developed the first digital computer. By 1822 he
built an automatic mechanical calculator called difference engine. Unfortunately, Babbage analytical engine
was never completed because its design required fabrication precision beyond what was feasible at that
time. In 1840 Augusta (first programmer) suggested binary storage.
In 1887 an American statistician Herman Hollerith constructed a tabulating machine to compute the statics
of 1890 US census. He used the punch cards to store data. This machine can read 200 punched cards per
minutes. In 1900 Johan Amberose Fleming invents the vacuum tube to store data and instruction, which was
very big. The major step in the evolution of computer system is invention of punch card which was first used
during the U.S similarly; Lee de Frost invented triode and Semiconductors. After his retirement in 1913

                                                       5
     Basic Computer                                                                             B.pharm PU


Thomas J Watson becomes president of the company             which become International Business Machines
Corporation in 1924.

Electronic Era/Age of Electronic Mechanical Computer
The electronic era was the time when computers were made with electronics components. Following are
some of the historical keys dates and inventions in this era.
1937- John V. Atanasoff Designed the first special purpose digital electronic computer. Professor Howard
Akine constructed electro-mechanical computer named Mark I, which can perform according to pre
programming instructions automatically. It was based on Charles Babbage principle after 100 years of his
death. Although it was very huge with 51 feet log and 8 ft height and 3 ft wide using 18000 vacuum tubes,
similarly Howard Aiken modified Mark 1 and invented Mark II which used 19000 vacuum tubes.
1945- John w Mauchly and Presper Eckert built ENIAC (Electronic Numerical Integrator and Calculator) for
the U.S. army. ENIAC was the first machine to use more than 2000 vacuum tubes and 18000 vacuum tube
ENICA was the first high speed general purpose electronic digital computer was produce.
1946 UNIVAC (Universal Automatic Computer) was designed by Persper Eckert and John Mauchly,
inventors of the ENICA. The UNIVAC was completed in 1950. It was the first commercial computer produced
in the United States.
1948- Howard Aiken developed the Harvard Mark III electronic computer with 5000 tubes. The Harvard
Mark III, also known as ADEC (Aiken Dahlgren Electronic Calculator) was an early computer that was partly
electronic and partly electronic mechanical. It was built at Harvard University under US Navy.
1952- Remington Rand bought the ERA in 1951 and combined the UNIVAC product in 1952; the UNIVAC
1101 was used to calculate the presidential election.
1950-National Bureau of Standards(NBS) introduced its standards Eastern Automatic Computer with 10000
newly germanium diodes in its logic circuits, and the first magnetic disk drive designed by Jacob Rainow.
1953-Tom Watson and IBM introduced model 604 computers, its first with transistor, which becomes the
basic of the model 608, the first solid state computer for the commercial market.
1964- IBM produce SABRE, the first airline reservation tracing system for American airlines, IBM announce
system 360 all purpose computer using for 8 bit character word length.
1968- DEC introduced the first mini computer, the PDP-8 named after the mini skirt, DEC was founded in
1975 by Kenneth H. Olsen who came for the sage project at MIT and began sales of PDP in 1960.
1969-developemtn began son ARPAnet, founded by DOD (Department of Defense)
1970 – First microprocessors and Dynamic RAMs were developed Hoff developed the first microprocessors
4004.
1971- Intel produces large Scale Integrated circuits that were used in the digital delay line, the digital audio
device. Gilbert Hyatt at micro computer company introduced 4 bit 4004, a VLSI of 2300 components for
Japanese company business to create a single chip for calculator. Similarly IBM introduced the first 8 inch
memory disk; it was called then floppy disk.
1972- Intel made the 8 pins 8008 and 8080 microprocessors; Gary Kildall wrote his control program/
microprocessor disk operating system to provide instructions for floppy disk drivers to work with 8080
processors.
1973- IBM developed the first true sealed hard disk drive called Winchester after the rifle company, using
two 30 mb plates. Robert Metcalfe at Xerox Company created Ethernet as the basic for local area network.
1975-Bill Gates and Paul Allen found Microsoft Corporation.
1976- Job and Woznik developed the Apple personal computer; Alan Shugart introduced 5.25 inch floppy
disk.
1980- IBM signed a contract with Microsoft Company of Bill Gates and Paul Allen and Steve Ballmer to
supply an operating system for IBM PC model.
1984- Apple computer introduced the Macintosh personal computer in January 24.
1985 Microsoft developed Windows 85, was the first window.
1991- World Wide Web (WWW) was developed by Tim Berner Lee and released by CERN.

                                                       6
     Basic Computer                                                                        B.pharm PU


1993- The first web browser called Mosaic was crated by student Marc Andresen and programmer Eric Bina
at NCSA in the first 3 months of 1993. The beta version of 0.5 of X UNIX was released in Jan 23 1993.
1994- Netscape Navigator 1.0 was released DEC 1994, and given a way free soon gaining 75% world market.
1996 Intel corporation introduces pro(X 86) microprocessors
1997- Intel corporation produced Pentium II
1999- Intel Corporation produced Pentium III
2000- Intel corporation produced Pentium IV
History of Computer in Nepal
     In 2018 BS an electronic calculator called “FacIt” was used for census.
     In 2028 BS, Census, IBM 1401 a second generation mainframe computer was used.
     In 2031 BS a center for Electronic Data Processing, later renamed to National computer Center (NCC),
        was established fro national data processing and computer training.
     In 2038 BS ICL 2950/10 a second generation mainframe computer was used for the census.
Generations of Computers
In 1962 scientists decided to classify computer into different classes according to the devices
technology and system architecture. The history of computer development is often referred to in
reference to the different generations of computing devices. A generation refers to the state of
improvement in the product development process. This term is also used in the different
advancements of new computer technology. With each new generation, the circuitry has gotten
smaller and more advanced than the previous generation before it. As a result of the miniaturization,
speed, power, and computer memory has proportionally increased. New discoveries are constantly
being developed that affect the way we live, work and play.
Each generation of computers is characterized by major technological development that
fundamentally changed the way computers operate, resulting in increasingly smaller, cheaper, and
more powerful and more efficient and reliable devices. Read about each generation and the
developments that led to the current devices that we use today.

                                             First Generation - 1940-1956: Vacuum Tubes
                                               The first computers used vacuum tubes for circuitry and
                                               magnetic drums for memory, and were often enormous,
                                               taking up entire rooms. A magnetic drum, also referred to
                                               as drum, is a metal cylinder coated with magnetic iron-
                                               oxide material on which data and programs can be stored.
                                               Magnetic drums were once use das a primary storage
                                               device but have since been implemented as auxiliary
                                               storage devices.
The tracks on a magnetic drum are assigned to channels located around the circumference of the
drum, forming adjacent circular bands that wind around the drum. A single drum can have up to 200
tracks. As the drum rotates at a speed of up to 3,000 rpm, the device's read/write heads deposit
magnetized spots on the drum during the write operation and sense these spots during a read
operation. This action is similar to that of a magnetic tape or disk drive.
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 of malfunctions. First generation computers relied on machine
language to perform operations, and they could only solve one problem at a time. Machine languages
are the only languages understood by computers. While easily understood by computers, machine
languages are almost impossible for humans to use because they consist entirely of numbers.
Computer Programmers, therefore, use either high level programming languages or an assembly
language programming. An assembly language contains the same instructions as a machine language,
but the instructions and variables have names instead of being just numbers.
                                                    7
     Basic Computer                                                                    B.pharm PU


Programs written in high level programming languages retranslated into assembly language or
machine language by a compiler. Assembly language program retranslated into machine language by
a program called an assembler (assembly language compiler).
Every CPU has its own unique machine language. Programs must be rewritten or recompiled,
therefore, to run on different types of computers. Input was based on punch card and paper tapes, 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. Census Bureau
in 1951.
Acronym for Electronic Numerical Integrator and Computer, the world's first operational electronic
digital computer, developed by Army Ordnance to compute World War II ballistic firing tables. The
ENIAC, weighing 30 tons, using 200 kilowatts of electric power and consisting of 18,000 vacuum
tubes, 1,500 relays, and hundreds of thousands of resistors, capacitors, and inductors, was completed
in 1945. In addition to ballistics, the ENIAC's field of application included weather prediction,
atomic-energy calculations, cosmic-ray studies, thermal ignition, random-number studies, wind-
tunnel design, and other scientific uses. The ENIAC soon became obsolete as the need arose for faster
computing speeds.
Some Characteristics:
     Very large in size and slower than other generation.
     Thousand of vacuum tubes were used in a single computer. So they produce large amount of
        heat and prone to frequent hardware failure.
     Punch cards used as secondary storage.
     Machine level programming used.
     Cost was very high and not available for commercial use.
     Computing time is milliseconds.

Second Generation - 1956-1963: Transistors
Transistors replaced vacuum tubes in the second generation
computer. Transistor is a device composed of semiconductor
material that amplifies a signal or opens or closes a circuit.
Invented in 1947 at Bell Labs, transistors have become the key
ingredient of all digital circuits, including computers. Today's
latest microprocessor contains tens of millions of
microscopic transistors. Prior to the invention of transistors,
digital circuits were composed of vacuum tubes, which had
many disadvantages. They were much larger, required more
energy, dissipated more heat, and were more prone to failures.
It's safe to say that without the invention of transistors, computing as we know it today would not be
possible.
The transistor was invented in 1947 but did not see widespread use in computers until the late 50s.
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 on punched cards for
input and printouts for output.
Second-generation computers moved from binary machine language to symbolic, or assembly,
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 COBOL and FORTRAN.
These were also the first computers that stored their instructions in their memory, which moved from
                                                  8
     Basic Computer                                                                     B.pharm PU


a magnetic drum to magnetic core technology. The first computers of this generation were developed
for the atomic energy industry.

Characteristics
   Transistor were smaller faster and higher reliable compared to tubes. Transistor can do the
      task of 1000 tubes. They occupied less space and were ten times cheaper than those using
      tubes.
   These transistors had no filament, so they did not generate heat. That is they required less
      electricity less electricity and emitted less heat than vacuum tubes.
   Magnetic cores were developed for primary storage and magnetic tapes and magnetic disk for
      secondary storage.
   Second generation compeers replaced machine language with assembly language. COBAL
      (common Business oriented Language) and FORTAN (formula translation) are in common
      use during this time.
   The operating speed was increased up to the microseconds range.

                                               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.
                                                A nonmetallic chemical element in the carbon family
                                                of elements. Silicon - atomic symbol "Si" - is the
                                                second most abundant element in the earth's crust,
                                                surpassed only by oxygen. Silicon does not occur
                                                uncombined in nature. Sand and almost all rocks
                                                contain silicon combined with oxygen, forming silica.
                                                When silicon combines with other elements, such as
iron, aluminum or potassium, a silicate is formed. Compounds of silicon also occur in the
atmosphere, natural waters, and many plants and in the bodies of some animals.
Silicon is the basic material used to make computer chips, transistors, silicon diodes and other
electronic circuits and switching devices because its atomic structure makes the element an ideal
semiconductor. Silicon is commonly doped, or mixed, with other elements, such as boron,
phosphorous and arsenic, to alter its conductive properties.
A chip is a small piece of semi conducting material (usually silicon) on which an integrated circuit is
embedded. A typical chip is less than ¼-square inches and can contain millions of electronic
components (transistors). Computers consist of many chips placed on electronic boards called printed
circuit boards. There are different types of chips. For example, CPU chips (also called
microprocessors) contain an entire processing unit, whereas memory chips contain blank memory.
Semiconductor is a material that is neither a good conductor of electricity (like copper) nor a good
insulator (like rubber). The most common semiconductor materials are silicon and germanium. These
materials are then doped to create an excess or lack of electrons.
Computer chips, both for CPU and memory, are composed of semiconductor materials.
Semiconductors make it possible to miniaturize electronic components, such as transistors. Not only
does miniaturization mean that the components take up less space, it also means that they are faster
and require less energy.

                                                  9
       Basic Computer                                                                       B.pharm PU


Instead of punched cards and printouts, users interacted with third generation computers through
keyboards 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.
Characteristics
     Using ICs proved to be highly reliable, relatively inexpensive and faster.
     Less human labor was required at assembly stage.
     Computers become portable. They were smaller in size but had high memory.
     The computer used programming language such as Pascal and Fortan.

Fourth Generation - 1971-Present:
Microprocessors
The microprocessor brought the fourth generation of
computers, as thousands of integrated circuits we
rebuilt onto a single silicon chip. A silicon chip that
contains a CPU. In the world of personal computers,
the terms microprocessor and CPU are used
interchangeably. At the heart of all personal computers
and most workstations sits a microprocessor.
Microprocessors also control the logic of almost all
digital devices, from clock radios to fuel-injection
systems for automobiles.
Three basic characteristics differentiate microprocessors:
        Instruction Set: The set of instructions that the microprocessor can execute.
        Bandwidth: The number of bits processed in a single instruction.
        Clock Speed: Given in megahertz (MHz), the clock speed determines how many instructions per
         second the processor can execute.
In both cases, the higher the value, the more powerful the CPU. For example, a 32-bit microprocessor
that runs at 50MHz is more powerful than a 16-bitmicroprocessor that runs at 25MHz.
What in the first generation filled an entire room could now fit in the palm of the hand. The Intel
4004chip, developed in 1971, located all the components of the computer - from the central
processing unit and memory to input/output controls - on a single chip.
Abbreviation of central processing unit, and pronounced as separate letters. The CPU is the brains of
the computer. Sometimes referred to simply as the processor or central processor, the CPU is where
most calculations take place. In terms of computing power, the CPU is the most important element of
a computer system.
On large machines, CPUs require one or more printed circuit boards. On personal computers and
small workstations, the CPU is housed in a single chip called a microprocessor.
Two typical components of a CPU are:
        The arithmetic logic unit (ALU), which performs arithmetic and logical operations.
        The control unit, which extracts instructions from memory and decodes and executes them, calling
         on the ALU when necessary.
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 computers also saw the
development of GUI's, the mouse and handheld devices
                                                     10
       Basic Computer                                                                        B.pharm PU


Characteristics
   Highly accurate and totally reliable.
   Operation speed increased beyond Picoseconds and MIPS (million of instruction per second).
   These chips reduced the physical size of computer and increased their power.
   Magnetic and optical storages devices.

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.
Artificial Intelligence is the branch of computer
science concerned with making computers behave like
humans. The term was coined in 1956 by John
McCarthy at the Massachusetts Institute of
Technology. Artificial intelligence includes:
        Games Playing: programming computers to play
         games such as chess and checkers
        Expert Systems: programming computers to make
         decisions in real-life situations (for example, some
         expert systems help doctors diagnose diseases based on symptoms)
        Natural Language: programming computers to understand natural human languages
        Neural Networks: Systems that simulate intelligence by attempting to reproduce the types of
         physical connections that occur in animal brains
        Robotics: programming computers to see and hear and react to other sensory stimuli
Currently, no computers exhibit full artificial intelligence (that is, are able to simulate human
behavior). The greatest advances have occurred in the field of games playing. The best computer
chess programs are now capable of beating humans. In May, 1997, an IBM super-computer called
Deep Blue defeated world chess champion Gary Kasparov in a chess match.
In the area of robotics, computers are now widely used in assembly plants, but they are capable only
of very limited tasks. Robots have great difficulty identifying objects based on appearance or feel,
and they still move and handle objects clumsily.
Natural-language processing offers the greatest potential rewards because it would allow people to
interact with computers without needing any specialized knowledge. You could simply walk up to a
computer and talk to it. Unfortunately, programming computers to understand natural languages has
proved to be more difficult than originally thought. Some rudimentary translation systems that
translate from one human language to another are in existence, but they are not nearly as good as
human translators.
There are also voice recognition systems that can convert spoken sounds into written words, but they
do not understand what they are writing; they simply take dictation. Even these systems are quite
limited -- you must speak slowly and distinctly.
In the early 1980s, expert systems were believed to represent the future of artificial intelligence and
of computers in general. To date, however, they have not lived up to expectations. Many expert
systems help human experts in such fields as medicine and engineering, but they are very expensive
to produce and are helpful only in special situations.
Today, the hottest area of artificial intelligence is neural networks, which are proving successful in an
umber of disciplines such as voice recognition and natural-language processing.
There are several programming languages that are known as AI languages because they are used
almost exclusively for AI applications. The two most common are LISP and Prolog.
Characteristics
                                                     11
     Basic Computer                                                                     B.pharm PU


    They will be able to understand natural language, speak command, capacity to see their
     surrounding and will think power called Artificial Intelligence (AI).
    In contrast to present DIPS/ LIPS (Data/ logic Information processing System), the 5th
     generation will have KIPS (knowledge Information Processing System).
    Will support parallel processing in full fledge

In the beginning ...
     A generation refers to the state of improvement in the development of a product. This term is
also used in the different advancements of computer technology. With each new generation, the
circuitry has gotten smaller and more advanced than the previous generation before it. As a result
of the miniaturization, speed, power, and memory of computers have proportionally
increased. New discoveries are constantly being developed that affect the way we live, work and
play.

The First Generation: 1946-1958 (The Vacuum Tube Years)
                                       The first generation computers were huge, slow, expensive,
                                     and often undependable. In 1946two Americans, Presper
                                     Eckert, and John Mauchly built the ENIAC electronic computer
                                     which used vacuum tubes instead of the mechanical switches of
                                     the Mark I. The ENIAC used thousands of vacuum tubes, which
                                     took up a lot of space and gave off a great deal of heat just like
                                     light bulbs do. The ENIAC led to other vacuum tube type
computers like the EDVAC (Electronic Discrete Variable Automatic Computer) and the UNIVAC I
(UNIVersal Automatic Computer).
     The vacuum tube was an extremely important step in the advancement of computers. Vacuum
tubes were invented the same time the light bulb was invented by Thomas Edison and worked very
similar to light bulbs. It's purpose was to act like an amplifier and a switch. Without any moving
parts, vacuum tubes could take very weak signals and make the signal stronger (amplify it). Vacuum
tubes could also stop and start the flow of electricity instantly (switch). These two properties made
the ENIAC computer possible.
      The ENIAC gave off so much heat that they had to be cooled by gigantic air
conditioners. However even with these huge coolers, vacuum tubes still overheated regularly. It
was                     time                   for                   something                   new.

The Second Generation: 1959-1964 (The Era of the Transistor)
     The transistor computer did not last as long as the vacuum tube computer
lasted, but it was no less important in the advancement of computer
technology. In 1947 three scientists, John Bardeen, William Shockley, and
Walter Brattain working at AT&T's Bell Labs invented what would replace the
vacuum tube forever. This invention was the transistor which functions like a
vacuum tube in that it can be used to relay and switch electronic signals.
     There were obvious differences between the transistor and the vacuum
tube. The transistor was faster, more reliable, smaller, and much cheaper to build than a vacuum
tube. One transistor replaced the equivalent of 40 vacuum tubes. These transistors were made of
solid material, some of which is silicon, an abundant element (second only to oxygen) found in
                                                  12
     Basic Computer                                                                      B.pharm PU


beach sand and glass. Therefore they were very cheap to produce. Transistors were found to
conduct electricity faster and better than vacuum tubes. They were also much smaller and gave off
virtually no heat compared to vacuum tubes. Their use marked a new beginning for the
computer. Without this invention, space travel in the 1960's would not have been
possible. However, a new invention would even further advance our ability to use computers.

The Third Generation: 1965-1970 (Integrated Circuits - Miniaturizing the Computer)
                         Transistors were a tremendous breakthrough in advancing the
                 computer. However no one could predict that thousands even now millions of
                 transistors (circuits) could be compacted in such a small space. The integrated
                 circuit, or as it is sometimes referred to as semiconductor chip, packs a huge
                 number of transistors onto a single wafer of silicon. Robert Noyce of Fairchild
Corporation and Jack Kilby of Texas Instruments independently discovered the amazing attributes
of integrated circuits. Placing such large numbers of transistors on a single chip vastly increased the
power of a single computer and lowered its cost considerably.
      Since the invention of integrated circuits, the number of transistors that can be placed on a
single chip has doubled every two years, shrinking both the size and cost of computers even further
and further enhancing its power. Most electronic devices today use some form of integrated
circuits placed on printed circuit boards-- thin pieces of bakelite or fiberglass that have electrical
connections etched onto them -- sometimes called a mother board.
      These third generation computers could carry out instructions in
billionths of a second. The size of these machines dropped to the size of
small file cabinets. Yet, the single biggest advancement in the computer
                                                 era was yet to be
                                                 discovered. The Fourth
                                                 Generation: 1971-Today (The Microprocessor)
                                                      This generation can be characterized by both the
                                                 jump to monolithic integrated circuits(millions of
                                                 transistors put onto one integrated circuit chip) and
                                                 the invention of the microprocessor (a single chip that
                                                 could do all the processing of a full-scale
                                                 computer). By putting millions of transistors onto one
single chip more calculation and faster speeds could be reached by computers. Because electricity
travels about a foot in a billionth of a second, the smaller the distance the greater the speed of
computers.
      However what really triggered the tremendous growth of computers and its significant impact
on our lives is the invention of the microprocessor. Ted Hoff, employed by Intel (Robert Noyce's
new company) invented a chip the size of a pencil eraser that could do all the computing and logic
work of a computer. The microprocessor was made to be used in calculators, not computers. It led,
however, to the invention of personal computers, or microcomputers.
      It wasn't until the 1970's that people began buying computer for personal
use. One of the earliest personal computers was the Altair 8800 computer
                          kit. In 1975 you could purchase this kit and put it
                          together to make your own personal computer. In 1977


                                                  13
     Basic Computer                                                                      B.pharm PU


the Apple II was sold to the public and in 1981 IBM entered the PC (personal computer) market.
     Today we have all heard of Intel and its Pentium® Processors and now we know how it all got
started. The computers of the next generation will have millions upon millions of transistors on one
chip and will perform over a billion calculations in a single second. There is no end in sight for the
computer movement.
Classification of Computer
                                Size                Micro Computer
                                                    Mini Computer
                                                    Mainframe Computer
                                                    Super Computer
                                Work                Analogue Computer
                                                    Digital Computer
              On the basic of



                                                    Hybrid Computer
                                Brand               IBM Computer(Apple/Macintosh)
                                                    IBM PC
                                Model               XT Computer
                                                    AT Computer
                                                    PS2 Computer
                                Operation           Server
                                                    Client
Computer Sizes and Power

Computers can be generally classified by size and power as follows, though there is considerable

    Personal Computers                      Workstations   Minicomputer   Mainframes   Supercomputers
                                                           s
 Least powerful                                                                      Most powerful
overlap:
 Personal Computer: A small, single-user computer based on a microprocessor.
 Workstation: A powerful, single-user computer. A workstation is like a personal computer, but it
   has a more powerful microprocessor and, in general, a higher-quality monitor.
 Minicomputer: A multi-user computer capable of supporting up to hundreds of users
   simultaneously.
 Mainframe: A powerful multi-user computer capable of supporting many hundreds or thousands
   of users simultaneously.
 Supercomputer: An extremely fast computer that can perform hundreds of millions of
   instructions per second.

Supercomputer
The highly calculation-intensive tasks can be effectively performed by means of supercomputers.
Quantum physics, mechanics, weather forecasting, molecular theory are best studied by means of
supercomputers. Their ability of parallel processing and their well-designed memory hierarchy give
the supercomputers, large transaction processing powers.
Supercomputer is a broad term for one of the fastest computers currently available. Supercomputers
are very expensive and are employed for specialized applications that require immense amounts of
mathematical calculations (number crunching). For example, weather forecasting requires a
supercomputer. Other uses of supercomputers scientific simulations, (animated) graphics, fluid
dynamic calculations, nuclear energy research, electronic design, and analysis of geological data (e.g.
                                                           14
        Basic Computer                                                              B.pharm PU


in petrochemical prospecting). Perhaps the best known supercomputer manufacturer is Cray
Research.
    Super computer are the most powerful and fastest computers among digital computers.
    These computers are capable of handling huge amounts of calculations that are beyond human
       capabilities. They can perform billions of instructions per second (BIPS).
    Super computers have the computing capability equal o 40,000 microcomputers.
    A Japanese supercomputer has calculated the value of PI (π) to 16 million decimal places.
    These computers costs in 15 to 20 millions dollar range (most expensive).
    They are mostly used in temperature forecast and scientific calculations.
    Examples: CRAY X-MP/24, NEC-500, PARAM, ANURAG. Among them PARAM and
       ANURAG are super computer s produced by Indian are exported in European countries.
    These were some of the different types of computers available today. Looking at the rate of
       the advancement in technology, we can definitely look forward to many more types of
       computers in the near future.




         The Columbia Supercomputer - once one of the fastest.
     Supercomputers are fast because they're really many computers working together.
   Supercomputers were introduced in the 1960's as the worlds most advanced computer. These
    computers were used for intense calculations such as weather forecasting and quantum physics.
    Today, supercomputers are one of a kind, fast, and very advanced. The term supercomputer is
    always evolving where tomorrow's normal computers are today's supercomputer. As of November
    2008, the fastest supercomputer is the IBM Roadrunner. It has a theoretical processing peak of
    1.71 pet flops and has currently peaked at 1.456 pet flops.

Mainframe
Mainframe was a term originally referring to the cabinet containing the central processor unit or
"main frame" of a room-filling Stone Age batch machine. After the emergence of smaller
"minicomputer" designs in the early 1970s, the traditional big iron machines were described as
"mainframe computers" and eventually just as mainframes. Nowadays a Mainframe is a very large
and expensive computer capable of supporting hundreds, or even thousands, of users simultaneously.
The chief difference between a supercomputer and a mainframe is that a supercomputer channels all
its power into executing a few programs as fast as possible, whereas a mainframe uses its power to
execute many programs concurrently. In some ways, mainframes are more powerful than
supercomputers because they support more simultaneous programs. But supercomputers can execute
a single program faster than a mainframe. The distinction between small mainframes and
minicomputers is vague, depending really on how the manufacturer wants to market its machines.
     Mainframe computers are very large and powerful
     It is general purpose computer designed for large scale data processing
     Very large sixe with approximate an area of 10000 sq.ft.
                                                     15
     Basic Computer                                                                    B.pharm PU


      It supports large no of terminals.
      They are suitable for large offices like bank, hospitals.
      They can be used in networking systems
      Some popular systems are IBM 1401, ICL 2950/10, ICL 39, and CYBER 170.




Mainframe computer

Mainframes are computers where all the processing is done centrally, and the user terminals are
called "dumb terminals" since they only input and output (and do not process).
Mainframes are computers used mainly by large organizations for critical applications, typically bulk
data processing such as census. Examples: banks, airlines, insurance companies, and colleges.

Minicomputer/Workstation
It is a midsize computer. In the past decade, the distinction between large minicomputers and small
mainframes has blurred, however, as has the distinction between small minicomputers and
workstations. But in general, a minicomputer is a multiprocessing system capable of supporting from
up to 200 users simultaneously.
      Minis are smaller than Mainframe computers.
      They are medium sized computers.
      They can support 50 terminals.
      They require area of 100 sq.ft.
      These computers are useful for small business industries and university.
      Examples: Prime 9755, VAX 7500, HCL, MAGNUM etc.




    Workstations are high-end, expensive computers that are made for more complex procedures
     and are intended for one user at a time. Some of the complex procedures consist of science,
     math and engineering calculations and are useful for computer design and manufacturing.
     Workstations are sometimes improperly named for marketing reasons. Real workstations are
     not usually sold in retail.
    The movie Toy Story was made on a set of Sun (Sparc) workstations
    Perhaps the first computer that might qualify as a "workstation" was the IBM 1620.

Microcomputer

                                                 16
     Basic Computer                                                                        B.pharm PU


It is a type of computer used for engineering applications (CAD/CAM), desktop publishing, software
development, and other types of applications that require a moderate amount of computing power and
relatively high quality graphics capabilities. Microcomputers generally come with a large, high-
resolution graphics screen, at large amount of RAM, built-in network support, and a graphical user
interface. Most microcomputers also have a mass storage device such as a disk drive, but a special
type of microcomputers, called a diskless workstation, comes without a disk drive. The most common
operating systems for workstations are UNIX and Windows NT. Like personal computers, most
workstations are single-user computers. However, workstations are typically linked together to form a
local-area network, although they can also be used as stand-alone systems.
      A computer which is based on microprocessor is called microcomputer.
      It is a small, low cast digital computer.
      It requires small space, even can place in desktop.
      They are mainly use in home offices shop stores. It can be connected to networking system.
      Eg: IBM PC Macintosh etc.

Personal computer:
It can be defined as a small, relatively inexpensive computer designed for an individual user. In price,
personal computers range anywhere from a few hundred pounds to over five thousand pounds. All are
based on the microprocessor technology that enables manufacturers to put an entire CPU on one chip.
Businesses use personal computers for word processing, accounting, desktop publishing, and for
running spreadsheet and database management applications. At home, the most popular use for
personal computers is for playing games and recently for surfing the Internet.
Personal computers first appeared in the late 1970s. One of the first and most popular personal
computers was the Apple II, introduced in 1977 by Apple Computer. During the late 1970s and early
1980s, new models and competing operating systems seemed to appear daily. Then, in 1981, IBM
entered the fray with its first personal computer, known as the IBM PC. The IBM PC quickly became
the personal computer of choice, and most other personal computer manufacturers fell by the
wayside. P.C. is short for personal computer or IBM PC. One of the few companies to survive IBM's
onslaught was Apple Computer, which remains a major player in the personal computer marketplace.
Other companies adjusted to IBM's dominance by building IBM clones, computers that were
internally almost the same as the IBM PC, but that cost less. Because IBM clones used the same
microprocessors as IBM PCs, they were capable of running the same software. Over the years, IBM
has lost much of its influence in directing the evolution of PCs. Therefore after the release of the first
PC by IBM the term PC increasingly came to mean IBM or IBM-compatible personal computers, to
the exclusion of other types of personal computers, such as Macintoshes. In recent years, the term PC
has become more and more difficult to pin down. In general, though, it applies to any personal
computer based on an Intel microprocessor, or on an Intel-compatible microprocessor. For nearly
every other component, including the operating system, there are several options, all of which fall
under the rubric of PC
Today, the world of personal computers is basically divided between Apple Macintoshes and PCs.
The principal characteristics of personal computers are that they are single-user systems and are based
on microprocessors. However, although personal computers are designed as single-user systems, it is
common to link them together to form a network. In terms of power, there is great variety. At the
high end, the distinction between personal computers and workstations has faded. High-end models
of the Macintosh and PC offer the same computing power and graphics capability as low-end
workstations by Sun Microsystems, Hewlett-Packard, and DEC.



                                                   17
     Basic Computer                                                                    B.pharm PU



Personal Computer Types
Actual personal computers can be generally classified by size and chassis / case. The chassis or case
is the metal frame that serves as the structural support for electronic components. Every computer
system requires at least one chassis to house the circuit boards and wiring. The chassis also contains
slots for expansion boards. If you want to insert more boards than there are slots, you will need an
expansion chassis, which provides additional slots. There are two basic flavors of chassis designs–
desktop models and tower models–but there are many variations on these two basic types. Then come
the portable computers that are computers small enough to carry. Portable computers include
notebook and subnotebook computers, hand-held computers, palmtops, and PDAs.
Tower model
The term refers to a computer in which the power supply, motherboard, and mass storage devices are
stacked on top of each other in a cabinet. This is in contrast to desktop models, in which these
components are housed in a more compact box. The main advantage of tower models is that there are
fewer space constraints, which makes installation of additional storage devices easier.
Desktop model
A computer designed to fit comfortably on top of a desk, typically with the monitor sitting on top of
the computer. Desktop model computers are broad and low, whereas tower model computers are
narrow and tall. Because of their shape, desktop model computers are generally limited to three
internal mass storage devices. Desktop models designed to be very small are sometimes referred to as
slim line models.
Notebook computer
An extremely lightweight personal computer. Notebook computers typically weigh less than 6 pounds
and are small enough to fit easily in a briefcase. Aside from size, the principal difference between a
notebook computer and a personal computer is the display screen. Notebook computers use a variety
of techniques, known as flat-panel technologies, to produce a lightweight and non-bulky display
screen. The quality of notebook display screens varies considerably. In terms of computing power,
modern notebook computers are nearly equivalent to personal computers. They have the same CPUs,
memory capacity, and disk drives. However, all this power in a small package is expensive. Notebook
computers cost about twice as much as equivalent regular-sized computers. Notebook computers
come with battery packs that enable you to run them without plugging them in. However, the
batteries need to be recharged every few hours.
Laptop computer
A small, portable computer -- small enough that it can sit on your lap. Nowadays, laptop computers
are more frequently called notebook computers.
Subnotebook computer
A portable computer that is slightly lighter and smaller than a full-sized notebook computer.
Typically, subnotebook computers have a smaller keyboard and screen, but are otherwise equivalent
to notebook computers.
Hand-held computer
A portable computer that is small enough to be held in one’s hand. Although extremely convenient to
carry, handheld computers have not replaced notebook computers because of their small keyboards
and screens. The most popular hand-held computers are those that are specifically designed to
provide PIM (personal information manager) functions, such as a calendar and address book. Some
manufacturers are trying to solve the small keyboard problem by replacing the keyboard with an
electronic pen. However, these pen-based devices rely on handwriting recognition technologies,
which are still in their infancy. Hand-held computers are also called PDAs, palmtops and pocket
computers.
Palmtop

                                                 18
       Basic Computer                                                                     B.pharm PU


A small computer that literally fits in your palm. Compared to full-size computers, palmtops are
severely limited, but they are practical for certain functions such as phone books and calendars.
Palmtops that use a pen rather than a keyboard for input are often called hand-held computers or
PDAs. Because of their small size, most palmtop computers do not include disk drives. However,
many contain PCMCIA slots in which you can insert disk drives, modems, memory, and other
devices. Palmtops are also called PDAs, hand-held computers and pocket computers.
PDA
Personal Digital Assistants (PDAs): It is a handheld computer and popularly known as a palmtop. It
has a touch screen and a memory card for storage of data. PDAs can also be effectively used as
portable audio players, web browsers and smart phones. Most of them can access the Internet by
means of Bluetooth or Wi-Fi communication. Short for personal digital assistant, a handheld device
that combines computing, telephone/fax, and networking features. A typical PDA can function as a
cellular phone, fax sender, and personal organizer. Unlike portable computers, most PDAs are pen-
based, using a stylus rather than a keyboard for input. This means that they also incorporate
handwriting recognition features. Some PDAs can also react to voice input by using voice recognition
technologies. The field of PDA was pioneered by Apple Computer, which introduced the Newton
MessagePad in 1993. Shortly thereafter, several other manufacturers offered similar products. To
date, PDAs have had only modest success in the marketplace, due to their high price tags and limited
applications. However, many experts believe that PDAs will eventually become common gadgets.
PDAs are also called palmtops, hand-held computers and pocket computers.
On the Basic of working principle
Based on the operational principle of computers, they are categorized as analog computers, Digital
computer and hybrid computers.
Analog Computers: These are almost extinct today. These are different from a digital computer
because an analog computer can perform several mathematical operations simultaneously. It uses
continuous variables for mathematical operations and utilizes mechanical or electrical energy.

The computer which process analogue quantities (Continuous data) is called an analogue computer.
For example Watch with hands is an example of analogue device.

   o    Analogue computer operates by measuring rather than counting.
   o    They are slower than digital computer.
   o    They are designed to compute physical forces as temperature and pressures.
   o    They are mostly used in engineering and scientific application.
   o    Analogue computers are used in hospital to measure the size of stone in kidney and mental
        disease diagnostics (CT scan with photos).
Digital Computer
         The computer with accepts discrete data is known as digital computer. For example
            digital watch is called digital because they go for one value to the nest with displaying all
            intermediate value. But can display only finite number.
         A binary number consisting of 0’s 1’s represents each quantity in such a computer. There
            is no way to represents the values in between 0 and 1. So all data that compute process
            must be encoded digitally, as series of zeros or ones.
         Digital computers are mostly used for general purpose.
         Digital computers are faster than analogue.
         It has large memory capacity.
         Example: IBM PC, Apple/Macintosh.
                                                   19
     Basic Computer                                                                      B.pharm PU


Hybrid Computers: These computers are a combination of both digital and analog computers. In this
type of computers, the digital segments perform process control by conversion of analog signals to
digital ones.
Following are some of the other important types of hybrid computers.

It can transfer data from analogue to digital and vice-versa.

    During launching of rocket the analogue computers measures the speed of the rocket,
       temperature and pressure of atmosphere. Then these measurements are converted into
       digital signals and
    In hospital analogue devices measure the temperature and blood pressure of patient, and
       then these measurements are converted into digital signals and fed to the digital computer.
On the Basic of Operation

Server




Inside of a Rack unit Server

Similar to mainframes in that they serve many uses with the main difference that the users (called
clients) do their own processing usually. The server processes are devoted to sharing files and
managing log on rights.
A server is a central computer that contains collections of data and programs. Also called a network
server, this system allows all connected users to share and store electronic data and applications. Two
important types of servers are file servers and application servers.
Client Computer
These computers which are used in network always ask for request to its server for its operation is
called client computer. The personal computer sometimes called as client computer.




A personal computer (PC)

PC is an abbreviation for a Personal Computer, it is also known as a Microcomputer. Its physical
characteristics and low cost are appealing and useful for its users. The capabilities of a personal
computer have changed greatly since the introduction of electronic computers. By the early 1970s,
people in academic or research institutions had the opportunity for single-person use of a computer
system in interactive mode for extended durations, although these systems would still have been too
                                                  20
     Basic Computer                                                                   B.pharm PU


expensive to be owned by a single individual. The introduction of the microprocessor, a single chip
with all the circuitry that formerly occupied large cabinets, lead to the proliferation of personal
computers after about 1975. Early personal computers generally called microcomputers, sold often in
kit form and in limited volumes and were of interest mostly to hobbyists and technicians. By the late
1970s, mass-market pre-assembled computers allowed a wider range of people to use computers,
focusing more on software applications and less on development of the processor hardware.
Throughout the 1970s and 1980s, home computers were developed for household use, offering some
personal productivity, programming and games, while somewhat larger and more expensive systems
(although still low-cost compared with minicomputers and mainframes) were aimed for office and
small business use.

On the basic of Brand
IBM PC
IBM PC is a microcomputer produced by IMB Company. Dr.Herman Horierith established IBM in
1923. It is a leading the market of mainframe and PC’s. It used the processors, multimedia devices
and some other hardware’s parts, developed by some other companies like Intel. But use the principal
of its own. So all the computer developed by IBM Company is called IBM Computer.
IBM Compatible:
IBM compatible can use hardware amd software designed for IBM PC. The internal architecture of
IBM compatible is similar to IBM PC. So they are called duplicate computers. Example Epson, Acer
etc.
Apple/Macintosh
Apple Corporation was established in 1970 in USA. Its computer are called Apple/Macintosh (Mac)
computer. The internal architecture of these computers is totally different form that of IBM.
Therefore they need their own software.

On the basic of Model
XT computer:
XT (Extra Technology) computer are old technology computers with much slower processing spent
(not more than 4.77 MHZ) Advance GUI based software like windows cannot be run in these
computers. Everything was based on text based system. Serial number of processors was like 8080
and 8088, which were developed by Intel company are used. Complex calculation and large
processing I/O devices were not flexible and faster. It used 4 bits processor length.
AT computer:
AT (Advanced Technology) computers are the new technology computers. They are faster in
processing (more than 2 GHZ). It can run any type of software with high GUI and color. Serial
number of process is 80286, 80386 and Pentium. Any type of complex and long processing can be
done depending on the capacity of computers. I/O devices are interactive, flexible and faster. Word
length exceeds 64 bits. Coprocessors re used to help the main processors for complex mathematics.
PS2 Computer:
Actually, those are not totally different model of computer but are refinement of AT computers.
These models were built after 1990’s and mostly used in laptop computers. Rechargeable and battery
operational systems with faster flexible I/O devices are some important characeteists of these
computers. OS2 operating system was used at the beginning but the now day’s widows operating
system is in leading

Computer software
Software is a computer program which is a sequence of instructions designed to direct a computer
to perform certain task. The software enables a computer to receive input, store information, make
                                                 21
     Basic Computer                                                                    B.pharm PU


decisions, manipulate and output data in the correct format. A program consists of instruction that
tell the computer what to do, how to behave. When we buy a computer we don’t automatically get
every program produced in the world. It may load operating system (like Window XP) if we want to
write the text, presentation some slides, do some calculation then we must installed the office
package, that is another software.
System software: The most essential for computer operation and directs inter operation of system
and its hardware, services, utility, drivers and other preferences configuration files. The programs
that are the past of computer system which includes assemblers, compilers, file management,
system utility.
For example: windows 85, windows 89, window XP, window Red hat, Window Vista etc.
Application software: the types of software which is used for user’s specific application are called
application software. IT consists of a number of programs designed to perform specific user
application. Eg Word, Excel, PowerPoint, Photoshop, CorelDraw, Spss, Stata, Epiinfo etc




                                         Questions
Directions: Answer each of the questions after reading the article above. Write in complete
sentences. You must think and be creative with your answers.

   1. In each of the 4 generations what was the cause for the increase of speed, power, or
      memory?
   2. Why did the ENIAC and other computers like it give off so much heat? (Be very specific)
   3. What characteristics made the transistors better than the vacuum tube?
   4. How was space travel made possible through the invention of transistors?
                                                 22
    Basic Computer                                                                  B.pharm PU


   5. What did the microprocessor allow the computers to do? and What was the microprocessor's
      original purpose?
   6. When was the first computer offered to the public and what was its name?
   7. Intel was started by who?
   8. What is monolithic integrated circuits?
   9. How do you think society will be different if scientists are able to create a chip that will
      perform a trillion operations in a single second?




Computer Program and Programming Language
Computer program is a set of instruction that when executed, causes the computer to behave in a
predetermined manner. Without program computers are unless and cannot do anything. However
most people are confused that are intelligent devices but concept is wrong. Computer cannot
understand human natural language like English or Nepali. To instruct a computer to perform a
certain job we need language which can understand by the computer. The languages which are used
to instruct the computer to do certain jobs called computer programming languages. There are
many programming languages like C,C++,Pascal, Basic etc.




                                               23
      Basic Computer                                                                                    B.pharm PU




Number System
The distinct symbols, characters, alphabets which are used to measure the physical quantity is term
as number system. The various number systems are used for encoding and decoding of data in
computer. The distinguishing of the number system is of its base.
                                                             Divider 2 5(dividend)   2 (quotient)

Rules for Conversion                                                         -4
The quotient and remainders are noted in each step.
                                                                             1 remainder
The quotient of one stage is divided by 2,8,16 respectively at the next stage.
The process repeat up to less than its base numbers/divider.
The first digit is known as most significant digits and the right most digit is known as least significant
digit.
Number conversion table
         Decimal                       Binary               Octal                            Hex-decimal

Decimal          0,1,2,3,4,5,6,7,            (25) 10              (63)10                        (66)10
                                                       1        8    63 7                     16 66 2
Positional
                 8,9                   2      25
                                       2      12       0              7                            4
weight (Right
to left) ones,   (Base of 10)          2       6       0        (77)8                         (42)16
                                       2       3       1
tens,
hundreds,                              2       1
thousands                                    (11001)10

Binary            (111)2               1,0                         (101100)2                     (101111)2
                  1 1 1                                         1 0 1 1 0 0                   1 0 1 1 1 1
                  2    1       0                                2   1   0   2   1   0         1    0    3     2   1   0
Positional                             Base of 2
weight            2 2 2                                         2 2 2 2 2 2                   2 2 2 2 2 2
                  4 2 1                                         4   2   1   4   2   1         2    1    8    4    2   1
 ( right to                                                     *   *   *   *   *   *         *    *    *    *    *   *
                  (7)10                                         1   0   1   1   0   0         1    0    1    1    1   1
left)
1,2,4,8,16,32,                                                  4 0 1 4 0 0                   2 0 8 4 2 1
…                                                               5      4                        2 15(F)
                                                                    (54)8                         (2F)16
                                                            Select three digits frame and    Select 4 digits frame and
                                                            convert      its       decimal   convert in decimal equivalent
                                                            equivalent

Octal                  (56)8              (53)8             0,1,2,3,4,5,6,7                                 144 8
                        5          6     5      3                                                   1          4      4
                           1       0
Positional                                                  Base of 8
                                       101 011                                                    001        100    100
weight (Right           8     8
                                        (101011)2                                                   0       0110   0100
to left)              5*8 1*6
                                                                                                               6 4
1,8,64,512,40          40     6
96,..                  (46)10                                                                               (64)16


                                                           24
      Basic Computer                                                                                  B.pharm PU



Hex-                       2B16               (7E)16                 3DE16                    0,1,2,3,4,5,6,7,8,9
                      2 B (11)             0111 1110            3     D    E
decimal
                   0010 1011
                                          (01111110)2          11 1101  1110                  ,10(A),11(B),12(C),
Positional             1          0                           111   011 110
weight (Right       16      16                                    7 3 6                       13(D),14(E),15(F)
                                                                1
to left)            32 11
                       (43)10                                       1736 8
1,16,256,409
                                                            Make 3 digits frame then          Base of 16
8..                                                         convert    its    decimal
                                                            equivalent


Conversion of Fractional Number
Those numbers which has both integer part as well as fractional part is called real number or floating point
number. The real numbers may be Positive (+ve) or Negative (–v) are used for scientific calculation it is often
necessary to carry out calculations with very large or may be very small numbers. It is also possible to convert
fractional or decimal number system into other number system. The fractional number system is that
number system that can represent closer to the original number system. It is also called as floating point
number that represent decimal pattern.
                                                           For example: (0.10111)2 to Decimal
 For example: (0.635)10
                                                                  1      0     1      1       1
         6             3              5
                                                             1*2-1 0*2-2 1*2-3 1*2-4    1*2-5
  6*10-1 3*10-2  5*10-3
                                                             1*1/2 0*1/4 1*1/8 1*1/16 1*1/32
  6*1/10 3*1/100 1*1/1000
                                                                0.5      0 0.125 0.0625 0.03125
      0.6   0.03    0.005
                                                             (0.71875)10
  (0.635)10

                                                                   For example: (0.563)8 to Decimal
 For example: (0.5A6B) 16 to Decimal
                                                                            .5            6           3
        .5    A(10)              6    B(11)                                -1        -2       -3
       -1      -2          -3                                       5*8     6*8     3*8
  5*16    10*16       6*16         11*16-4                                1       2
                                                                    5*1/8 6*1/8 3*1/83
  0.3125 0.0390625 .001464648437 .0001678
                 (0.353195037)10                                     0.625 0.9375 0.005859375
                                                                    (0.724609375)10


Rules to Convert Fractional Numbers                     For example: (0.8125)10 to Binary
     Place fractional number then multiply by
         its (base, 2 for binary, 8 for octal and 16     2 .8125 1.625           1
         for hexadecimal)                                2 .625 1.25             1
     If carry comes before decimal put that             2     .25  .50          0
         number else place 0 to binary digits.
                                                         2     .50 1.00          1
     Continue up to 6 places for hex and 5
         places for octal if it is not finished.         (0.1101)2
     Take its digits form up to down (reverse
         than binary number.
                                                                                 For example: (0.62)10 to Hexadecimal
   For example :( 0.635)10 to Binary       For example: (0.96)8 to Octal          16 .62       9.92          9
                                                         25
    2 .635 1.27              1             8 .96 7.68        7                    16 .92 14.72            14(E)
    2 .27   .54              0             8 .68 5.44        5                    16 .72 115.2            11(B)
    2 .54 .1.08              1             8 .44 3.52        3                    16 .52       8.32          8
     Basic Computer                                                                                  B.pharm PU




Convert the fractional binary number (1101.1010)2 into decimal

                                  1101             .1010
        1             1              0         1           1           0           1            0
        3             2              1         0           -1          -2          -3          -4
    1*2        1*2                0*21*2       1*2        0*2      1*2                    0*2
       8          4                  0  1        0.5          0    0.125                     0
                                       13                                                0.625
                               (13.625)10
Convert the decimal real number (12.625)10 into binary real number

                                         12                     .625
         1                1               0        0               2        .625        1.25         1
                                                                  2          .25         .50          0
                                                                  2          .50        1.00          1
                                              1100                                                  101
                                       (1100.101)2
Convert real hexadecimal number (6D.3A) to its equivalent binary number
6           D (13)                .3              A (10)
(0110)      (1101)                . (0011)        (1010)
(1101101.00111010)2
Convert hexadecimal number 3DE to its equivalent octal number
(3DE) 16
3           D (13)                E (14)
(0011)      (1101)                (1110)
To obtain octal equivalent
(001)(111)(011)(110)
(1736)8
Convert the real hexadecimal number 5B.3A to its equivalent octal
5           B (11)       .3       A (10)
(0101)      (1011)       . (0011) (1010)
              (01011011.00111010)2
          (01)(011)(011).(001)(110)(100)
                    (133.164)8
Convert the real octal number 46.57 to its equivalent hexadecimal
4           6            .5                7
(100)       (110)        . (101)           (111)
                 (100110.101111)2
            (0010)(0110). (1011)(1100)
                      (26.BC)16


Addition of Binary Numbers
In the binary number system when 1 is added to 1 the sum is zero with a carry 1. If the sum is written up to 2
bits, it is equal to 10 (2 decimal).

                A             B          A+B               26      A         B          A-B
                0             0            0                       0         0            0
                0             1            1                       1         0            1
                1             0            1                       1         1            0
     Basic Computer                                                                 B.pharm PU




Examples:
                   9   1001                14        1110
                  +5   0101                -5        0101
                  14   1110                 9        1001


                  10    1010               13        1101
                 +13    1101               -7        0111                                  7     0111
                  23   10111                6        0110                                 -8     1000
                                                                                          -1     1111
The Use of complements to represents negative number
We know most of today’s computer works on binary number system, (base of 2 0/1).The computer
performs subtraction using complemented number. This is very economic to do Arithmetic and
logical operation is done in the same unit. To represent negative numbers in binary number, we use
2’s complements.
9’s Complement:
The decimal number representation of 9’s complements is calculated by the subtraction from 9’s of
each digit.
Example: 37 in decimal can be represents (99-37) = 62 (9’s complement of decimal number 37).
Similarly 234 in decimal can be represents (999-234) =765(9’s complement of decimal number 234).
10’s Complement:
The 10’s complement of decimal number is equal to 9’s complement and Plus 1.
Example: 37= (99-37) = 62+1=63 so 37 decimal number can be represented in 10’s decimal is 63.
37+63=1 00(if we ignore carry 1 so it become o) so we can conclude that the sum of decimal
number and its 10’s complement is zero.
Addition of 10’s complements
Add 86 and (-21)
9’s complement of (-21) = 99-21=78 then 10’s complement=79
86+79= 1 65 then carry 1 is ignored we get 65
Add 59 and (-84)
9’s complement of (-84) is 99-84=15 then 10’s complement of (-84) is 16
59+16=75 (if you want to checked 99-75=24+1=25)//59-84=25
Add (-26) and (-43)
9’s complement of (-26) =99-26=73 then 10’s complement of 10=73+1=74
9’s complement of (-43) =99-43=56 then 10’s complement of 10’s=56+1=57
74+57=1 31(if we ignore 1 carry then 31 but its 10’s complement is99-31=68+1=69)
Add 34 and 58
34+58=92 just add two numbers (there is no carry and less than 100 sum is correct in decimal
number)
1’s Complement
One’s complement in binary number is similar to 9’s complement in decimal number. To obtain its
1’s complement of binary number we just shift its bits in reversed (0-1/1-0). Example:
1110=0001, 01101=10010
                                                27
     Basic Computer                                                                   B.pharm PU


2’s Complement:
2’s complement in the binary number system is similar to 10’s complement. 2’s complement =one’s
complement +1
Find 2’s complement of 101100 (reversed its bit then we get 1’s complement then add 1 to its to
get 2’s complement)
Example: 101100=010011+1=010100
Find 2’s complement of 111 =000+1=001
Add binary no 1100 and its 2’s complement
1100=0011(1’s complement)+1(to get 2’s)=0100
1100+0100= 10000(if we ignore 1 carry it become again zero) the sum of binary number of 2’s
complement is zero.
Add binary no 1011 and its 2’s complement
1011=0100+1=0101
1011+0101=10000(if we ignore carry 1)
Subtraction using 2’s complement
The addition of 2’s complement of a number is equivalent to its subtraction. This will be clear form
the following example:
Subtract 2 from 6
6(0110) and 2(0010) =1101+1 =1110(2’s complement)
0110+1110=10100(if we ignore 1 then final number become 4)
Subtract 3 from 5
3(0011) 2’s=1100+1=1101
0101+1101=1 0010(if we ignore carry 1) so 10 become 2 in binary
Representation of Sign and Unsigned numbers
In decimal number we use positive or negative to represents its quantity in (+ve/-ve) but in binary
number to represent positive number 0 is taken a head(that implies positive number) similarly
negative number that takes 1 a head to indicate negative number.
Example 9=(01001) and -9=(11001)
Add (+5) and (+3)
    0 0101+0 0011=0 1000(the leading 0 indicate +ve number ie 8 )
Add 9 and (-4)
(-4= 1’s (0100= 1011 then 2’s complement is 1 1100)
0 1001+1 1100=1 00101(+5)
Add (-9) and 3
-9=0110(binary) 1001(1’s) +1=0111
1 0111+0 0011=1 1010 ( ie 2’s complement of -6 (0101+1=-0110))
Add(-12) and (-2)
(12=1 1100 and -2= 1 0010 in binary)
1’s complement 1 0011 and 1 1101
2’s complement 1 0100 and 1 1110
1 0100+1 1110=1 10010(1’s 01101+1=1 1110 =-14)


                                Calculation of Binary Number
    Subtract (10001)2 from (101100)2
                                    101100            Minuend
                                                 28
    Basic Computer                                                                          B.pharm PU



                                    -10001              Subtrahend
                                    (Ans) 011011        Difference

 Subtract (100011)2 from (11001)2                       11001     100011

                                                       -100011     -11001
 Subtract (11001)2 from (100011)2
                                                                    001010
                                                                   (Ans) -1010
                               100011

                                -11001

                        (Ans) 0010010

 Subtract (11101)2 from (10001)2 by using 2’s complement
                      10001

                     +00011
                      10100
                                                                 So the answer become
                                                                           -( 01011+1)
                                                                                 -01100
 Subtract (11101)2 from (10001)2 by using 2’s complement

                                                       10001

                                                   +00011
                                                       10100
                                                                 So the answer become
                                                                           -( 01011+1)
                                                                                 -01100
 Add (101.011)2 and (11.110)2
                                                                      101.011
•     To subtract larger from smaller
•     Make 2’s complement of larger no then add these                 +11.110
      number                                                          1001.001
•     If here is no carry then the answer is –ve with 2’s             Adding starts form right side and take
      complement                                                      carry overflow to the real part if decimal
                                                                      part produce overflow



 Add (11001.1011)2 and (10011.0110)2


                                          1100.1011

                                                  29
     Basic Computer                                                            B.pharm PU



                                         +10011.0110

                                 (Ans) 101101.0001

    Add (101.011)2 and (11.110)2

                                            101.011

                                            +11.110

                                     (Ans) 1001.001

    Add (1011.1010)2 and (1000.011)2

                                         1011.1010

                                         1000.0110

                                (Ans) 10100.0000

    Subtract (0010)2 from (0110)2 by using 2’s complement

                              0110

                           +1101
                          -10011
                               +1
                        (Ans) 100

    Subtract the following

                               101.101          1100.01              1011.1
                               -11.011         -1001.11             -100.11

                               -11.011          1100.01            (1011.10)
                           (- 011.011)         -1001.11              -100.11

                         (Ans) 010.01       (Ans) 10.10      (Ans) 110.11
Subtract 101-0.11
                               101.00

                               -000.01

                         Ans: 100.01
    Subtract 0.11-0.101

                                                          (0.11)
                                                          0.110

                                                     30
     Basic Computer                                                                   B.pharm PU



                                                                   +0.011

                                                      (-ve, ignored) 1.001

                                                 1’2’s complement:0.110
Subtract 101- 0.11


                                    (101)     101.00

                                (0.11)       - 000.11

                                       (+ve) 100.11

    Subtract         0.11- 0.101 /same question can be done in another way


                                     (0.11) 0.110

                                    (0.101) -1.101

                                       (-ve) 0.001

                                         0 .110+1
                                       (ans) 0.110



                                     By using 2’s 0.101 become 1.010+1=1.111
                                                                              1.111
                                                                             +1.011

                                                           Carry ignored 10.110
                                                                             +1
                                                Again converting its bits 0.110
Solved question form B. Ram’s Books
     Q.3 Convert the following binary numbers to equivalent decimal 11010

            1          1       0        1         0
             4         3        2        1        0
           2          2        2        2        2
           16          8        0        2        0

           16          8       0        2         0
                                                26
    Q.4 Convert the following decimal numbers to equivalent Binary 19

             2        19       1
             2         9       1

                                                           31
 Basic Computer                                                                                                   B.pharm PU


             2       4            0
             2       2            0
                     1
                         10011

 Q.5 Convert the following binary fraction to decimal fraction 0.1011

                                       1        0           1              1
                                       -1       -2          -3             -4
                                      2     2               2      2
                                      0.5       0        0.125 0.0625
                                                                   0.6875

 Q.6 Convert the following real binary number to equivalent decimal 1001.101

                                            1        0     0           1            0.1         0            1
                                                                                      1      -2              -3
                                                                                    2-      2            2
                                                                                    0.5         0     0.125
                                                                       9                              0.625

 Q.7 Convert the following real decimal number to equivalent binary 17.71875

                                                                      17        2    0.71875        1.4375        1
                                            1        0         0       1        2        0.4375      0.875        0
                                                                                2         0.875       1.75        1
                                                                                2          0.75        1.5        1
                                                                                2           0.5       1           1
                                                                   1001                       0.10111

 Q.8 Convert the following addition 1100+1001

         1       1       0             0
         1       0       0             1
        10       1       0             1
                              10101

 Q.9 Convert the following addition 101.011+11.110

    1        0       1       .0         1    1
    +        1       1       .1         1    0
   10        0       1       .0         0    1
                                      1001.001

 Q.10 Perform the following subtraction 1101-1001

                                                                 32
     Basic Computer                                                                        B.pharm PU




         1    1        0     1
        -1    0        0     1
         0    1        0     0
                           100

    Q.11 Perform the following subtraction 101.101-11.011

         1        0    1         .1    0    1
         -        1    1         .0    1    1
                  1    0         .0    1    0

    Q.16 Perform the following subtraction using 2’s complements 1101-1001

                                           1101     1    1   0       1
                                           -1001    -    0   0       1
                                                    1
          In this case checked which number is      0    1   0       0
     greater if minuend is greater than subtend
                                    just subtract

               101-111                                                         1   0   1
               111=000+1=001                                                  +0   0   1
                Subtend is grater so do complements then add                   1   1   0

         101- 0.11                                  1    0       1       .0        0
          In this case minuend is greater                                .1        1
         so directly subtract it                    1    0       0       .0        1

                                 Boolean algebra and logic gate
Boolean algebra is algebras of logic, it is one of the most basic tools to analyze and design of electronic
circuits. The original purpose of this algebra was to simplify logical statements and solve logical
problems. Boolean algebra was invented by George Boole an English mathematician in 1854. In the past
his idea was used to design algebra calculation but later his idea was used by Shannon to solved
telephone switching circuits. So those ideas were highly used in electronic circuits design in computer
sciences.
Boolean logic provides the fundamental background for computation in modern binary
computer systems. You can represent any algorithm, or any electronic computer circuit, using a
system of Boolean equations.
Now consider the statement: x= Ram is tall boy in the class.
This statement may have two possible values, either true or false, this statement is remain true
is one case similarly, this statement may be false. The true exists only when nobody overcomes
Ram's height. If Hair is taller than Ram the first statement become false or zero. Therefore each
and every statement has two possible values.


                                                        33
     Basic Computer                                                                   B.pharm PU


Similarly some grammar teacher are argue that there is not present tense because whatever the
tasks had been finished was past action and the remaining tasks are to be done in future will
be the future tense. So there are only two states in the tense (past and future).
Boolean algebra is a logical calculation of truth values, It resembles the algebra of real
numbers, but with the numeric operations of multiplication by, addition x + y, and negation −x
replaced by the respective logical operations of conjunction x∧y, disjunction x∨y, and
complement ¬x. The Boolean operations are these and all other operations that can be built
from these, such as x∧(y∨z). These turn out to coincide with the set of all operations on the set
{0,1} that take only finitely many arguments; there are 22n such operations when there are n
arguments.
Basic operations
The binary computing system is based on algebraic system operations. Whereas elementary
algebra is based on numeric operations multiplication xy, addition x + y, and negation −x,
Boolean algebra is customarily based on logical counterparts to those operations, namely
conjunction x∧y (AND)(A.B), disjunction x∨y (OR)(A+B), and complement or negation ¬x
(NOT)(A=−A). In electronics, the AND is represented as a multiplication, the OR is represented
as an addition, and the NOT is represented with an overbar: x ∧ y and x ∨ y, therefore, become
xy, x + y and x=−x simultaneously.
Conjunction is the closest of these three to its numerical counterpart, in fact on 0 and 1 it is
multiplication. As a logical operation the conjunction of two propositions is true when both
propositions are true, and otherwise is false. The first column of Figure below tabulates the
values of x∧y for the four possible valuations for x and y; such a tabulation is traditionally called
a truth table.
                            XY        X.Y             X          AND        Y         X AND Y
AND Operator
                                1.1        1            TRUE And             TRUE       TRUE
                                1.0        0           TRUE      And         FALSE      FALSE
                                0.1        0           FALSE And             TRUE       FALSE
                                0.0        01.1=1, 1.0=0, 0.1=0, And
The logical multiplication can be defined as           FALSE     0.0=0       FALSE      FALSE
Similarly if we take two statements like; The man is tall=X and the man is wise=Y then X AND Y
may have four possible results. A “.”,"^","U" are used to represent AND operation. So X and Y
will represent as X.Y. The rules for and operation are exactly same as those of simple arithmetic
multiplication. This is just coincidences which enable us to remember those rules with any
efforts.
OR Operation
For example here are two statements: He will give me a pencil and He will give me a pen.
These two statements can be written as compound statements given bellow. X OR Y, both can
be written in the same statement by using OR operations it is understand that it is inclusive OR.
X OR Y means X OR Y OR Both, therefore an inclusive or is simply written as given bellow. Here
X may be true or false similarly Y may be true or false. The compound statement X or Y will be
true when anyone or both, statements are true. The Truth table shows possibilities of OR
operator:
                           XY       X+Y
                                                          X        OR        Y         X OR Y
                          1+1         1
                                                           TRUE     OR        TRUE       TRUE
                          1+0         1
                                                           TRUE     OR        FALSE      TRUE
                          0+1         1
                                                           FALSE    OR        TRUE       TRUE
                          0+0         0
                                                           FALSE    OR        FALSE      FALSE
                                                 34
     Basic Computer                                                                 B.pharm PU


The “+” is used to represent OR operation. So X OR Y can be written as X+Y. Representing true
by 1 and false by 0 and or by + the above table can be presented as above.
NOT Operation
Ram does not have any apple this sentence in English has similar sense Ram has some
apple.
The man is wise (assume it is =X). This statement may be true or false. If this statement is true
the statement given after processing will be false. The man is not wise (=Not X=ˉX=X’)
If the statement the man is wise is false the statement become after inversion is the man is not
wise is true the truth table for NOT operation.
                                                        X (NOT)ˉX                     X          ˉX
                                                     TRUE    FALSE                    1           0
                                                    FALSE     TRUE                    0           1
 Logical negation however does not work like numerical negation at all. Instead it corresponds
to: ¬x = x+1 mod 2. Yet it shares in common with numerical negation the property that applying
it twice returns the original value: ¬¬x = x, just as −(−x) = x.
Examples of switches to illustrate logical operations in Boolean algebra
Electrical switches are very good examples to give clear concept AND and OR operations of
Boolean Algebra. A switch has only two states either closed or open. These are similar to truth
or falsehood of statements. Now consider two switches connected in series as shown fig1 It is
very good example to illustrate AND operation. The bulb will glow only when both the stitches
A and B are Aclosed. B
                                   BULB
                                                A       AND   B       X AND Y
                                                 Closed   And  Closed     Closed
                                                 Closed   And   Open       Open
           -Battery+
                                                  Open    And  Closed      Open
                                                  Open    And   Open       Open


Similarly two switches are connected parallel as shown figure is an example to illustrate OR
operation. The bubs will glow when either or both switches are on/ closed.

               A
                                                        A        OR        B          A OR B
                                                        Open     OR        Open       Open
                             Bul
                                                        Open     OR        Closed     Closed
                             bs                         Closed   OR        Open       Closed
                       B
                                                        Closed   OR        Open       Closed
          -Battery+



       Boolean Postulates (Fundamentals Conditions)
The fundamentals postulation of Boolean algebra originate from the three basic operations
AND, OR, and NOT. The basic operations of Boolean algebra are called Boolean postulations
they are summarized as follows.                              XY X+Y(OR)                    X (NOT)ˉX
    XY      X.Y(AND)                                         1+1           1           TRUE       FALSE
      1.1           1                                        1+0           1          FALSE        TRUE
      1.0           0                                        0+1           1        Derived form NOT
      0.1           0
                                                             0+0           0        operation
      0.0           0                                    Derived form OR
                                               35
   Derived form And
                                                         operation
   operation
     Basic Computer                                                                 B.pharm PU




We will also use the following set of postulates
P1 Boolean algebra is closed under the AND, OR, and NOT operations.
P2 The identity element with respect to • is one and + is zero. There is no identity element with
respect to logical NOT.
P3 The • and + operators are commutative.
P4 • and + are distributive with respect to one another. That is, A • (B + C) = (A • B) + (A • C)
and A + (B • C) = (A + B) • (A + C).
P5 For every value A there exists a value A’ such that A•A’ = 0 and A+A’ = 1. This value is the
logical complement (or NOT) of A.
P6 • and + are both associative. That is, (A•B)•C = A•(B•C) and (A+B)+C = A+(B+C).
Boolean Variable and Function
In general, the variable is the storage area in the memory where we can store some values,
whose values have been changed during program execution/ run. The variable which has only
two values 1 and 0 are called Boolean variable (or logical variables). These variables may be
denoted by any alphabets or characters like (a, b, c, d…etc).
In ordinary algebra we have the concept of expressions or function. Similarly in Boolean
algebra we have the concept of expression. A Boolean function consists of Boolean variables. In
the expression X=A=B.C+C(D’+E) in the above equation the variable x is the function of
A,B,C,D,E. this can be written as: X=ƒ (A,B,C,D,E) this means all the right hand side expression
has calculated with the function or logic then assigned to the X in left hand side(storage
area).Each occurrence of a variable or its complements in the expression is called literal. The
above expressions there are five variables and six literal.
In Boolean expression use Boolean function where each variable has only two values (0 or1) a
truth table specifics the value of a Boolean expression for every possible combination of values
of the variable in the expression.

                                                 A         B         B’       ƒ (A .B)=A+B’
                                                 0         0         1        1
                                                 0         1         0        0
                                                 1         0         1        1
                                                 1         1         0        1

It is to be noted that different Boolean expression may determine the same Boolean function.
Example: A. (B+C) and (A.B)+(A.C) determine the same Boolean function.




Boolean Theorem
We can prove all other theorems in Boolean algebra using these postulates. This text will not go
into the formal proofs of these theorems; however, it is a good idea to familiarize you with some
important theorems in Boolean algebra.

  Theorem1            0.X=0
  Theorem2            X.0=0                   Properties of AND operation
                                               36
   Basic Computer                                                                          B.pharm PU



Theorem3            1.X=X
Theorem4            X.1=X
Theorem5            X+0=X
Theorem6            0+X=X
Theorem7            X+1=1
Theorem8            1+X=1                       Properties of OR operation
Theorem9            X.X=X
Theorem10           X.Xˉ=0
Theorem11           X+X=X
Theorem12           X+Xˉ=1                      Combining a variable with itself or its complements
Theorem13           Xˉ ˉ=X                      Double complement
Theorem14           X+Y=Y+X
Theorem15           X.Y=Y.X                     Commutative laws
Theorem16           X.(Y.Z)=(X.Y)Z=X.Y.Z
Theorem17           (X+Y)+Z=X+(Y+Z)=X+Y+Z       Associative Laws
Theorem18           X(Y.Z)=X.Y+X.Z
Theorem19           X+Y.Z=(X+Y).(X+Z)           Distributive Laws
Theorem20           X+XY=X
Theorem21           X(X+Y)=X
Theorem22           XY+XYˉ=X
Theorem23           (X+Y)(X+Yˉ)=X               Absorption
Theorem24           X+XˉY=X+Y /XZ+ZXˉ=ZX+ZY
Theorem25           X(Xˉ+Y)=XY
Theorem26           (Z+X)(Z+Xˉ+Y)=(Z+X)(Z+Y)
Theorem27           XY+XˉZ+YZ=XY+XˉZ
Theorem28           (X+Y)(Xˉ+Z)(Y+Z)=(X+Y)(Xˉ+Z)
Theorem29           XY+XˉZ=(X+Z)(Xˉ+Z)
Theorem30           (X+Y)(X+Z)=XZ+XY
Theorem31           ˉX.Yˉ.Zˉ=Xˉ+Yˉ+Zˉ
Theorem32           X+Y+Z+..=Xˉ.Yˉˉ.Zˉ           DeMorgans Theorem


Proof THOREAM 1:                                             Proof THOREAM 4: X.1=X
Let X=0, so 0.X=0 = 0.X=0.0=0 by postulate 1                 If X=0 so x.1=0.1=0 by postulate 2 =X
Let X=1 so 0.X=0.1=0 by postulate 2                          If X=1 so X.1=1.1=1 by postulate 4=X
Therefore 0.X=0                                              Therefore X.1=1




  Theorem 5: X+0=X                                            Theorem 8: 1+X=1
  If X=0, X+0=0+0=0 by postulate 5 =X                         If X=0, 1+X=1+0 =1 by postulate7
  If X=1, X+0=1+0=1 by postulate 7 =X                         If X=1, 1+1=1 by postulate 8.
  Therefore X+0=X                                             Therefore 1+X=1
                                                              Similarly up to theorem 13
                                                 37
      Basic Computer                                                                                   B.pharm PU




      Theorem 14: X+Y=Y+X                                                 Theorem: 15 X.Y=Y.X
      If Y=0, X+Y=X+0=X by theorem 5                                      If Y=0, X.Y=X.0=0 BY THOREM 2
      Y+X=0+X=X by theorem 6.                                             Y.X=0.X=0 BY THOREM 1.
      Therefore X+Y=Y+X                                                   SIMILARLY
      If Y=1 X+Y=X+1= X by theorem 7.                                     X.Y=X.1=X BY THOREAM 4.
      Y+X=1+X=X by theorem 8                                              X.Y=1.X=X BY THOREAM 3.
      Therefore X+Y=Y+X                                                   Therefore X.Y=Y.X


          THOREAM 20: X+XY=X                                                  THOREAM 21: X(X+Y)=X
          X+XY=X (1+Y) =X.1 BY THOREAM 8                                      =X.X+X.Y =X (1+Y)
          =X                                                                  =X.1 BY THOREAM 8 =X.


          THOREAM 22:        =X                                          THOREAM 23: (X+Y) (  ) .
                (   ) =X.1 BY THOREAM 12 =X                                  (  )+ 0=X+X.1 =X+X =X



      THOREAM 24:                =X+Y
                                                                             Theorem 27:   ⁻ Z        ⁻Z
                                            =X+XY BY THOREAM 20
                                                                             =    ⁻Z Z      ⁻Z Z(      ⁻)
            (       ) =X+Y
                                                                                  ⁻Z Z    Z ⁻
      X              Y                  ⁻        X+Y
                                                                                (1 Z) ⁻Z(1 )
                0            0               0             0                      ⁻Z
                0            1               1             1
                1            0               1             1
                1            1               1             1

DeMorgan's Theorem

The most important logic theorem for digital electronics, this theorem says that any logical binary expression
remains unchanged if we
     1. Change all variables to their complements.
     2. Change all AND operations to ORs.
     3. Change all OR operations to ANDs.
     4. Take the complement of the entire expression.
A practical operational way to look at DeMorgan's Theorem is that the inversion bar of an expression may be
broken at any point and the operation at that point replaced by its opposite (i.e., AND replaced by OR or vice
versa).
1’s theorem: the theorem states that the complement of the sum (of the binary variables) equals the products
of the complements (of the binary variables).
i.e. (A+B)’=A’.B’ (for 2 inputs)             (A+B+C)=A’.B’.C’ (for 3 inputs)
Proof:
  A             B            A+B             (A+B)' A'              B'        (A'.B')
            0            0              0              1       1         1          1
            0            1              1              0       1         0          0

                                                               38
       Basic Computer                                                                           B.pharm PU


            1           0        1         0        0            1          0
            1           1        1         0        0            0          0
 2’s Theorem: the theorem states that the complement of a product equals to the sum of the complements.             i.e
 (A.B)’=A’+B (for 2 inputs)            (A.B.C)’=A’+B’+C’ (for three inputs)
   A            B           X=(A.B)'               A            B          X=(A'+B')
            0           0            1                      0          0             1
            0           1            1                      0          1             1
            1           0            1                      1          0             1
            1           1            0     =                1          1             0
 De Morgan’s Laws
  If B, a set containing at least two elements, and equipped with the operations +, ×and ′ (complement) , is a Boolean
 algebra, then, for any x and y in B,(x + y)′= x′× y′, and (x × y)′= x′+ y′.
 De Morgan’s laws are readily derived from the ideas of Boolean algebra and indeed are themselves sometimes
 treated as axiomatic. They merit special status because of their role in translating between + and ×, which
 means, for example, that Boolean algebra can be defined entirely in terms of one or the other. This property,
 entirely absent in the arithmetic of numbers, would seem to mark Boolean algebras as highly specialized
 creatures, but they are found everywhere from computer circuitry to the sigma-algebras of probability theory.
 The illustration here shows De Morgan’s laws in their set-theoretic and logic circuit guises. These laws are
 named after Augustus De Morgan (1806-1871) as is the building in which resides the London Mathematical
 Society, whose first president he was.




Simplification of expressions:
Simplification means producing equivalent expression that contains fewer operators. This can be done by two
methods A) Algebraic Method B) Diagrammatic techniques.
Simple Boolean expression by algebraic method X+X¯Y¯+Y¯+(X+Y) (X¯Y)
                                                   = X+X¯Y+Y¯+XX¯Y+Y¯X¯Y
Boolean theorems (Law) are very useful tools for simplification logical expressions. Some examples of
  XY¯Z¯+XY¯Z¯W+XZ¯
  = XY¯Z¯ (1+W) +XZ¯
simplification are given below.                    =X+X¯Y+Y¯ +0+0 by theorem 10(ZZ¯=0)
 =XY¯Z¯.1+XZ¯ by theorem 8(1+w) =1                =Y+Y BY X+XY¯=X+Y BY THOIREM 24
 =XY¯Z¯+XZ¯                                       =X+Y+Y¯ BY THOREM 12
 =XZ¯ (Y¯+1) BY THOREM 8                          =X+1
 =XZ¯                                             =1 BY THIOREM 7
 Z(Y+Z) (X+Y+Z)
 = (ZY+ZZ) (X+Y+Z)                                      X¯Y¯+X¯Y.1+YZ+Y¯ZW¯
 = (ZY+Z) +(X+Y+Z) (ZZ=Z BY TH 9)                       = X¯Y¯+X¯Z(Y+Y¯)+YZ+Y¯ZW¯
 =Z(X+Y+Z) (Z+ZY=Z BY THOREM 20)                        = X¯Y¯+X¯ZY+X¯ZY¯+YZ+Y¯ZW
 =XZ+XY+ZZ                                              =X¯Y¯(1+Z)+YZ(X¯+1)+Y¯ZW¯
 =XZ+ZY+Z (ZZ=Z BY TH 9)                                =X¯Y¯.1+YZ.1+Y¯ZW¯ BY 1+W=1 TH 8
 =ZX+Z (Z+ZX=Z BY TH 20)                                =X¯Y¯+YZ+Y¯ZW¯
 =Z                                                     =X¯Y¯+YZ+Y¯ZW¯
 (X+Y)(X¯+Z)(Y+Z)                                               1.   All. Signs are changed to + Signs
 = (XX¯+XZ+YZ¯+YZ)(Y+Z)                                         2.   All + Signs are changed to. Signs
 = (XZ+YX¯+YX¯) (Y+Z) (XX¯=0 BY TH 9)               39          3.   All 1's Signs are changed to 0's
 =XZY+YYZ¯+YYZ+ZZ+YX¯Z+YZZ                                      4.   All 0's Signs are changed to 1's.
 =XYZ+YX¯+YZ+YZ+YX¯Z+YZ
                                                                5.   All literals are complemented.
 =XYZ+XZ=YX¯+YX¯Z+YZ (YZ+YZ=YZ BY TH 11)
 = YZ(Y+10)+YX¯+YZ(X¯+1)
     Basic Computer                                                                             B.pharm PU




Dual and complement of a Boolean expression
Two expressions are called equivalent only when both are equal to 1 or equal to 0. Two expressions are
complements of each other if one expression is equal to 1 while the other is equal to 0 and vice-versa. To
obtain the complement if a Boolean expression the following changes are made:
     Example: Find complement of 1.x+y¯+0
     The complement of the above expression will be (0+x¯) (y+z¯).1
     The dual of Boolean expression is obtained by performing the following operation:
     1. All. Signs are changed to + Signs
     2. All + Signs are changed to. Signs
     3. All 1's Signs are changed to 0's
     4. All 0's Signs are changed to 1's
In finding a dual of an expression literals are not complemented. The following examples illustrate the
principle. There is no general rule for the values of dual expressions. Both expressions may be equal to 1 to 0.
One may be equal to 1 while the other is equal to 0.
Find dual of Boolean expression 1.x+y¯z+0                                  (0+x)(y¯+z).1
Find the dual of expression                                                x.(x+y) =x.y+y.z =(x+y)(x+z)
Find the dual of x+xy=x                                                    x.(x+y)=x
Find the dual of x+(x¯.y)=x+y                                              x.(x¯+y)=x.y
Find the dual of expression x(y¯+yz)+yz¯                                   x.(x¯+y)=x.y
Find the dual expression of x(y¯+y¯x)+yz¯                                  x+y¯.(y+z)=(x+y¯z)(y+z¯)




                                                      40
     Basic Computer                                                                             B.pharm PU



Sum of Product (SOP) and product of Sum (POS) forms of logical
expressions
The logical expressions having Boolean variables can be combined by using logical operators (add and
multiplication) to one another to formed logical expressions. There are two types A) Sum of Products (POS)
and B) Products of Sums (SOP).
Sum of Products (SOP)
The sum of products of Boolean variable can be achieved by using products of Boolean expression are
logically added. Those variables may or may be complemented. The sum of products expressions consists of
several product terms logically added. Eg : XY+XˉY+YX Eg: AB+ABC+Bˉ+Cˉ similar ACD+D are sum of products
expression.
In the above expression Eg 1 the first term XY is first term of products of Boolean variables of X and Y and XˉY
is second term is the products of same X and Y variables; similarly third product term YX is also the products
of same variables. They are expressed by using + Operator in the expressions. So XY+XˉY+YX is one expression
which has some meanings/output. Thus the output may store in another variable that must have Boolean
type (p= XY+XˉY+YX).
Sometime products term may consist of single element eg: cˉc+c is one expression of same variable.
Product of sums form (POS)
The products of sums expression consist of several terms logically multiplied. The final expression is the
logical addition of several variables and terms. The variables may or may not be complemented. In sometime
a sum may consist of a single variable.
Eg: (A+B)(Aˉ+Bˉ) Eg: A(Bˉ+Cˉ)(B+C)
In the first expression two Boolean variables A and B are first sum with out complemented forms and with
complemented forms then they are logically making products of those intermediated terms by using
multiplied operators. Finally these become one expression of Boolean variables.
Canonical Forms of logical expression
When each term of logical expressions consists of all variables it is said to be in the canonical form. If we
calculate the sum of products of these type of expression of canonical pattern is called min-term or standard
sum of products. Similarly; when a product of sums of these type of logical expression of canonical form is
called max-term. Each max-term also consists of all variables available in expression.
If the logical expression is not in the canonical form it can be converted into canonical form. There is
uniformity in the expression which facilitates to minimize procedure executions and logical calculation.
Examples of canonical form of sum of products (min-term)
Z=XY+XY (here is two Boolean variables are used the maximum possible products will be 4)
F=YZˉX+XYZˉ+XZˉY (here is three Boolean variables are used the maximum possible products will be 8)
When the expression is in the canonical form all terms are mutually exclusive, it means that for a given set of
values of the variables when the terms of equal to 1 all others must be 0.
Example of products of sums (max-term)
Z=(X+Y) (X+Yˉ) (here, X and Y are Boolean variables first sum is calculated then products is operated the each
term in the expression is made up its all available variables).
F=(X+Y+Zˉ) (X+Yˉ+Z)(Xˉ+Yˉ+Zˉ) (here, X, Y and Z are Boolean variables first sum is calculated then products is
operated the each term in the expression is made up its all available variables).
Conversion of sum of products expression into canonical form
                                                                       X+YZˉ into canonical form
    X+XYˉ into canonical form                                          =X(Y+Yˉ)(Z+Zˉ)+YZˉ(X+Xˉ)
    =X.1+XYˉ                                                           =XYZ+XYZˉ+XYˉZ+XYˉZ+XYˉZˉ+XYZˉ+XˉYZˉ
    =X(Y+Yˉ) + XYˉ (BY THOREM Y+Yˉ=1)                                  =XYZ+XYZˉ+XYˉZ+XYˉZˉ+XˉYZˉ (XYZˉ+XYZˉ=XYZˉ)
    =XY+XYˉ+XYˉ
    =XY+XYˉ                                                                     A+B= (A+B+C) (A+B+Cˉ)
                                                                                AA+AB+ACˉ+AB+BB+BCˉ+AC+BC+CCˉ
   XZ+XYˉW +XZWˉ+XZWˉ into canonical form                                       =AA+BB+ACˉ+BCˉ+AC+AB+AB
   =XZ(Y+Yˉ) (W+Wˉ) +XYˉWˉ(Z+Zˉ)+XZWˉ(Y+Yˉ)                                     =(A+B)+Cˉ(A+B)+C(A+B)+AB+AB
                                                          41
   = (XZY+XZYˉ)(W+Wˉ)+XYˉWZ+XYˉWZ+XZWˉY+XZWˉYˉ                                  =(A+B)+(A+B)(C+Cˉ)+AB+AB
   =XZYW+XZYWˉ+XZYˉW+XZYˉWˉ+XYˉWZ+XYˉWZˉ+YZWˉY+XZWˉYˉ                           =A(1+B)+B(1+A)
   =YYZW+XYZWˉ+XYˉZW+XYˉZWˉ+XˉYZWˉ+XˉYZˉW                                       =A+B
     Basic Computer                                                                       B.pharm PU




Conversion of sum of product of sums expression into canonical form
     A=(A+B)(A+Bˉ)
     HERE A=A+A+0
     =A(B+Bˉ)+A.A+B.Bˉ
     =A(A+B)+Bˉ(A+B)
     =(A+B)(A+B) PROVED

Convert the following expression into canonical form    x(yˉ+zˉ)
                                                        we know x=(x+y)(x+yˉ)
 (a+b)(b+c)
                                                        =(x+y)(x+yˉ)(y+zˉ)
 We know x+y=(x+y+z)(x+y+zˉ)
                                                        =(x+y+z)(x+y+zˉ)(x+yˉ+z)(x+yˉ+zˉ)(x+yˉ+zˉ)(xˉ+yˉ+zˉ)
 So (a+b+c)(a+b+cˉ)(a+b+c)(aˉ+b+c )
                                                        =(x+y+z)(x+y+zˉ)(x+yˉ+z)(x+yˉ+zˉ)(xˉ+yˉ+zˉ)
 =(a+b+c)(a+b+cˉ)(aˉ+b+c)

Simplification of Boolean expression by using Karnaugh map
Karnaugh map method is a graphical technique for simplification Boolean functions. The method is a
two dimensional representation of truth table. It provides a simpler method for minimizing logic
expression. This method is suitable for 4 or less variables in expressions. Karnaugh map method is a
diagram consisting of squares. Each square of the map represents a min-term. Any logical
expression can be written as a sum of products I.e. sum of min-terms. Therefore a logic expression
can easily be represented on Karnaugh map.
A Karnaugh map for n variables is made-up of 2n squares. Each square designates of products term
of a Boolean expression. For product terms which are present in the expression 1’s are only written
in the corresponding to products terms not present in the expressions. For clarity of the map writing
of 0’s can be omitted. So the blank square indicates that they contain 0’s.
Simplification of Boolean expression of two variables:
As same as matrix representation
            Aˉ/0        A/ 1                                                 Aˉ/0        A/ 1
    Bˉ/0    AˉBˉ(00)    ABˉ(10)                                       Bˉ/0   AˉBˉ(00)
    B/1     AˉB(01)     A B(11)                                       B/1    AˉB(01)

The expression Y=AˉBˉ+AˉB in K-Map can be represented as
So this can be written as below because each expression has some values. The common become
Y=Aˉ where Aˉ is presents in each terms of Boolean expressions. The adjacent square containing 1
have been grouped together to show the grouping they have been encircled.
                                                                              Aˉ/0      A/ 1
                                                                      Bˉ/0      1
                                                                      B/1       1

Some Examples: Simplify AˉBˉ ABˉ expression by using K-map method                               Aˉ/0     A/ 1
The common terms =Bˉ (Aˉ+A) = Bˉ therefore final expression become Y=Bˉ.                Bˉ/0      1      1
Simplify AˉB AB ABˉ by using K map method                   Aˉ/0  A/ 1                  B/1
Here = Y=AˉB+AB+ABˉ
                                                        Bˉ/0            1
=AˉB+AB+AB+ABˉ
                                                        B/1       1     1
                                                   42
       Basic Computer                                                                      B.pharm PU


  =B (Aˉ+A) + A (B+Bˉ)
  =B+A
                                          Aˉ/0   A/ 1                  Aˉ/0 A/ 1                    Aˉ/0 A/ 1
        Aˉ/0      A/ 1
                                   Bˉ/0          1            Bˉ/0            1            Bˉ/0
 Bˉ/0
                                   B/1           1            B/1        1                 B/1        1   1
 B/1       1                 Simplify Z ABˉ AB by            Simplify AˉBˉ ABˉ AˉB        Simplify y AˉB AB by
Simplify AˉBˉ AˉB by using K                                 By using K map (AˉBˉ         using K map Y=B
                             using K map Y=A
map (AˉBˉ become ) Aˉ                                        become )
  Karnaugh Map for Three Variables
  Karnaugh map for three variables is the alternative ways to representing the Boolean variables. The
  order of the variables i.e. 00,01,11,10 is in code. You could not write straight binary code like
  00,01,10,11 which was the further modification of Veitch diagram. The matrix representation of
  three variables is as follows.
               AB        A⁻B⁻   A⁻B       AB     AB⁻                AB      00      01        11        10
               C⁻(0)     A⁻B⁻C⁻ A⁻BC⁻     ABC⁻   AB⁻C⁻              C⁻/0    000     010       110       100
               C(1)      A⁻B⁻C A⁻BC       ABC    AB⁻C               C/1     001     011       111       101


  There are some rules to convert Karnaugh map
     1. No of squares in a group must equal to 2n, such as 2, 4, 8, 16 etc. it cannot be 3, 5, 7 etc.
     2. The map is considered to be folded or cylindrical therefore squares at the end of row or
         column are treated as adjacent squares.
     3. Before drawing k map the logical expression must be in canonical forms.
  Simplification the function ABC⁻ ABC by Karnaugh map method
     AB      00   01     11     10
     C⁻/0                1
     C/1                 1
    The common of this expression is Y=AB
  Simplification the function      A⁻B⁻C⁻ A⁻BC⁻ by Karnaugh map method
     AB      00    01    11   10
     C⁻/0    1     1
     C/1
    The common of this expression is row wise A⁻
    and column wise C⁻or A⁻C⁻(B⁻+B), so Y=A⁻C⁻
  Simplification the function      A⁻B⁻C⁻ A⁻BC⁻ A⁻B⁻C by Karnaugh map method
     AB      00    01    11   10
     C⁻/0    1     1
     C/1     1
    The common of this expression is Y=A⁻B⁻+A⁻C⁻
    =A⁻(B⁻+C⁻)
  Simplification the function      A⁻B⁻C⁻ A⁻B⁻C⁻ by Karnaugh map method
     AB      00    01    11   10
     C⁻/0    1                1
     C/1
                                                        43
    The common of this expression is Y=B⁻C⁻
     Basic Computer                                                                           B.pharm PU




Simplification the function       A⁻B⁻C⁻ A⁻BC⁻ ABC⁻ by Karnaugh map method
  AB       00    01   11     10
  C⁻/0     1     1    1
  C/1
 The common of this expression
 is Y=A⁻C⁻+BC⁻

Simplification the function       ABC⁻ AB⁻C⁻ ABC AB⁻C by Karnaugh map method
  AB       00    01   11     10
  C⁻/0                1      1
  C/1                 1      1                                            AB      00     01    11    10
 The common of this expression                                            C⁻/0    1      1     1     1
 is Y=A⁻C⁻+BC⁻                                                            C/1
                                                                         The common of this expression
Find out the Boolean function and simplify
                                                                         is Y=C⁻ and expression is
                                                                         Y=A⁻B⁻C⁻+A⁻BC⁻+ABC⁻+AB⁻C⁻
Karnaugh map for four variables
The four Boolean variables can be representation on K map in following matrix pattern.

     AB            00           01       11           10    Simplify Y=A⁻BC⁻D+AB⁻CD+A⁻BCD+ABCD+A⁻B⁻C⁻D⁻
  CD 00      A⁻B⁻C⁻D⁻      A⁻BC⁻D⁻   ABC⁻D⁻      AB⁻C⁻D⁻          AB       00     01     11    10
      01     A⁻BC⁻D        A⁻BC⁻D    ABC⁻D       AB⁻C⁻D      CD 00 1
      11     A⁻B⁻CD        A⁻BCD     ABCD        AB⁻CD             01          1      1
      10     A⁻B⁻CD⁻       A⁻BCD⁻    ABCD⁻       AB⁻CD⁻            11          1      1
                                                                   10
 Find the logical function and simplify it                  Y=BD+A⁻B⁻C⁻D⁻
        AB        00       01      11       10
                                                            Find the logical function and simplify it
  CD 00
                                                                   AB        00       01      11       10
         01 1         1         1         1
                                                             CD 00               1
         11
                                                                    01 1                             1
         10                     1         1
 Y=C⁻D+ACD⁻                                                         11 1                             1
                                                                    10           1
 Find the logical function and simplify it                  Y=A⁻BD⁻+B⁻D
        AB        00       01      11       10              Find the logical function and simplify it
  CD 00 1                                 1                        AB        00       01      11       10
         01                                                  CD 00               1
         11                                                         01           1
         10 1                             1                         11           1         1         1
 Y=B⁻D⁻
                                                                    10
                                                            Y=A⁻BC⁻+BCD+ACD
 Find the logical function and simplify it
        AB        00       01      11       10
  CD 00               1                                44
         01           1
         11           1         1         1
     Basic Computer                                                                        B.pharm PU




         Logic Gate
         A digital computer uses binary number system for it’s operation in the binary system these are
only two digits 0, 1. The computer receives, store understand and manipulates information composed
of only 0’s 1’s. The manipulation of binary information is done by logic a circuit is known as logic
gate.
         An electronic circuit, which has one or more inputs but only one output is called logic gate.
The logic gates are used for binary operation and are basic components of digital computers and
embodied into integrated circuit(IC). Each gate has a distinct graphical symbol and its operation can
be described by means of logic operation.
         A collection of transistors and resistors that implement Boolean logic operations in a circuit.
Transistors make up logic gates. Logic gates make up circuits. Circuits make up electronic systems.
The truth tables and symbols follow. A logic gate performs a logical operation on one or more logic
inputs and produces a single logic output. The logic normally performed is Boolean logic and is most
commonly found in digital circuits. Logic gates are primarily implemented electronically using diodes or
transistors, but can also be constructed using electromagnetic, optics, molecules, or even mechanical
elements.
In electronic logic, a logic level is represented by a voltage or current, (which depends on the type of
electronic logic in use). Each logic gate requires power so that it can source and sink currents to
achieve the correct output voltage. In logic circuit diagrams the power is not shown, but in a full
electronic schematic, power connections are required.
Logic gates process signals which represent true or false. Normally the positive supply voltage +Vs
represents true and 0V represents false. Other terms which are used for the true and false states are
shown in the table on the right. It is best to be familiar with them all.
Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Capital
letters are normally used to make it clear that the term refers to a logic gate. Note that logic gates are
not always required because simple logic functions can be performed with switches or diodes:
      Switches in series (AND function)
      Switches in parallel (OR function)
                                                                                 Logic states
      Combining IC outputs with diodes (OR function)                        True         False
         The boolean functions may be practically implemented by                                    using
                                                                                1           0
         electronic gates. The folloing points are important to
         understand.                                                          High        Low
         Electrinic gates requires a power sypply.                            +Vs          0V
         Gete inputs are driven by voltages having two norminal                                     values
         zeor or 1                                                             On          Off

                                                   45
     Basic Computer                                                                           B.pharm PU


       The output of a gate provides two norminal values of voltage only o and 1 representing
       logical singlasn that produces one output to a locig gate except some special cases.
       There is always dime delay betwreen an input being applied and thje output responding.
Logic gate symbols
There are two series of symbols for logic gates:
    The traditional symbols have distinctive shapes making them easy to recognise so they are
       widely used in industry and education.



Truth table
A truth table is a table that describes the behavior of a logic gate. It lists the value of the output for
every possible combination of the inputs and can be used to simplify the number of logic gates and
level of nesting in an electronic circuit. In general the truth table does not lead to an efficient
implementation; a minimization procedure, using Karnaugh maps, heuristic algorithm is required for
reducing the circuit complexity.
Logic Gates
Logic gates serve as the building blocks to digital logic circuits using combinational logic. We're
going to consider the following gates: NOT gates (also called inverters), AND gates, OR gates,
NAND gates, NOR gates, XOR gates, and XNOR gates.

AND gates
The AND gate requires two inputs and has one output. The AND gate is an electroniccircuits that
only produces an output of 1 when BOTH the inputs are a 1, otherwise the output is 0. The output of
AND gate is 1 only if both inputs are 1. Otherwise, the output is 0. The dot is used to show AND operation.
                                                                            Input A Input B Output Q
                                                                               0          0        0
The truth table defines the behavior of this gate.                         0       1        0
The function implemented by AND gates has interesting properties:          1       0        0
    The function is symmetric. Thus, x * y == y * x. This can be
                                                                           1       1        1
        verified by using truth tables. We use * to represent AND.
    The function is associative. Thus, (x * y) * z == x * (y * z). This can be verified by using truth
        tables.
Because of these properties, it's easy to define ANDn, which is an n-input AND gate.
That is, an AND gate with n-inputs is the AND of all the bits. This is not ambiguous because the
AND function is associative (all parenthesization of this expression are equivalent).

OR gate The OR gate is an electornic circuits that gives a high output if one or more of its
inputs are high. A plus sign is used to show the OR OPERATION
The output Q is true if input A OR input B is true (or both of them are true): Q = A OR B
An OR gate can have two or more inputs, its output is true if at least one input is true.

                                                               Input A Input B Output Q
                                                                  0        0          0
                                                                  0        1          1
                                                                  1        0          1

                                                     46
     Basic Computer                                                                     B.pharm PU




                                                              1       1         1

OR gates have two bits of input and a single bit of output. The output of OR gate is 0 only if both
inputs are 0. Otherwise, the output is 1. The truth table defines the behavior of this gate.
The function implemented by OR gates has interesting properties:
    The function is symmetric. Thus, x + y == y + x. This can be verified by using truth tables.
        We use "+" to represent OR.
    The function is associative. Thus, (x + y) + z == x + (y + z). This can be verified by using
        truth tables.
Because of these properties, it's easy to define ORn, which is an n-input OR gate.
That is, an AND gate with n-inputs is the AND of all the bits. This is not ambiguous because the
AND function is associative (all parenthesization of this expression are equivalent).

NOT gate (inverter)
The NOT gete is an electronic circuit that produces an inverted version of the input at its
output. It is also called as incerter. If input variable is A the inversion output is known as NOT
A.
The output Q is true when the input A is NOT true, the output is the inverse of the input: Q = NOT A
A NOT gate can only have one input. A NOT gate is also called an inverter.

                                                                                    Input    Output
                                                                                    A        Q
                                                                                       0         1
                                                                                       1         0

NOT gates or inverters have a single bit input and a single bit of output. This is a diagram of a NOT
gate. It is a triangle with a circle on the right. The circle indicates "negation".
The truth table defines the behavior of this gate.
where x is the input and z is the output.

NAND gate (NAND = Not AND)

Thie is NOT AND gate which is equal to aand gollowed by not gaTE. The output of all NAND
gates are high if any of the inputs are low. The symbol is an AND gete with a small circle on the
output . The small circle represents inversion. This is an AND gate with the output inverted, as
shown by the 'o' on the output. The output is true if input A AND input B are NOT both true:
Q = NOT (A AND B)
A NAND gate can have two or more inputs, its output is true if NOT all inputs are true.


                                                 Input A Input B Output Q
                                                    0       0         1
                                                    0       1         1
                                                    1       0         1


                                                  47
     Basic Computer                                                                           B.pharm PU




                                                        1        1         0

NAND gates have two bits of input and a single bit of output. A NAND gate is defined unusually.
Since NAND is not associative, the definition is based on AND.
In particular
                        NANDk(x1, x2,...,xn) = NOT( ANDk(x1, x2,...,xn) )

Thus, NAND is the negation of AND.
The truth table defines the behavior of this gate. It's the negation of AND.
The function implemented by NAND gates has interesting properties:
    The function is symmetric. Thus, x NAND y == y NAND x. This can be verified by using
       truth tables.
    The function is not associative. This can be verified by using truth tables.
Because of these properties, NAND is defined from AND, and not built from NAND gates.

NOR gate (NOR = Not OR)
This is nOT OR gate which is equal to an OR gate followed by a not gate. The outputs of all
NOR gates are low if any of the inputs are high. The symbol is an or gate with a small on
the output. The small circle represents inversion. OR gates have two bits of input and a
single bit of output.
The output of NOR gate is the negation of OR. The truth table defines the behavior of this gate.
The function implemented by NOR gates has interesting properties:
    The function is symmetric. Thus, x NOR y == y NOR x. This can be verified by using truth
        tables.
    The function is not associative. This can be verified by using truth tables.
Because of these properties, NOR is defined from OR, and not built from NOR gates.
This is an OR gate with the output inverted, as shown by the 'o' on the output. The output Q is true if
NOT inputs A OR B are true: Q = NOT (A OR B) . A NOR gate can have two or more inputs, its
output is true if no inputs are true.

                                                    Input A Input B Output Q
                                                        0        0         1
                                                        0        1         0
                                                        1        0         0
                                                        1        1         0

EXOR
The exclusive or gate is circuit which will give a high output if either , but not both of its
two inputs are high . An encircled plus is used to show the EOR operation
XOR gates have two bits of input and a single bit of output. The output of XOR gate is 1 only if the inputs
have opposite values. That is, when one input has value 0, and the other has value 1. Otherwise, the output is
0.
This is called exclusive-or. The definition of OR is inclusive-or, where the output is 1 if either input is
1, or if both inputs are 1. XOR can be defined using AND, OR, and NOT.

                                                                            Input A Input B Output Q
                                                                               0         0         0
                                                     48
     Basic Computer                                                                           B.pharm PU


x XOR y == ( x AND (NOT y) ) OR ( (NOT x) AND y ) == x\y +                 0           1           1
y\x
                                                                           1           0           1
Here's a diagram of the XOR gate.
                                                                           1           1           0



If you look carefully at the drawing of the gate, there is a second arc behind the first one near the
inputs. Since this second arc is hard to see, it's usually a good idea to write the word "XOR" inside
the gate.
The truth table defines the behavior of this gate.
The function implemented by XOR gates has interesting properties:
     The function is symmetric. Thus, x (+) y == y (+) x. This can be verified by using truth tables.
        (We use (+) to denote logical XOR--ideally, we'd draw it with a + sign inside a circle, but
        HTML doesn't seem to have a symbol for this).
     The function is associative. Thus, [ x (+) y ] (+) z == x (+) [ y (+) z ]. This can be verified by
        using truth tables.
Because of these properties, it's easy to define XORn, which is an n-input XOR gate.
                               XORn(x1, x2,...,xn) = x1 (+) x2 (+) ... (+) xn
That is, an XOR gate with n-inputs is the XOR of all the bits. This is not ambiguous because the
XOR function is associative (all parenthesization of this expression are equivalent).


EX-NOR (Exclusive-NOR) gate
The exclusive NOR gate circuits does the positive to the EOR gate. IT will give a low output if
either, but not both, of its two inputs are high. The symbol is an ExOR gate with s small circle on the
output. The small circle represents inversion.. The NAND and NOR gates are called universal
functions since with either one the AND and OR functions and not can be generated.. A function
sum of products form can be implemented using NAND gate by replacing all AND and OR gates by
NAND gates. A function in products of sums form can be implemented using NOR gates by
replacing all and OR gates by NOR gates.
This is an EX-OR gate with the output inverted, as shown by the 'o' on the output.
The output Q is true if inputs A and B are the SAME (both true or both false):
Q = (A AND B) OR (NOT A AND NOT B)
EX-NOR gates can only have 2 inputs.

                                                                               Input       Input   Output
                                                                               A           B       Q
                                                                                 0           0         1
                                                                                 0           1         0
                                                                                 1           0         0
                                                                                 1           1         1

XNOR2 gates have two bits of input and a single bit of output.
The output of XNOR gate is the negation of XOR2 and has 1 when both inputs are the same.
If you look carefully at the drawing of the gate, there is a second arc behind the first one near the
inputs. Since this second arc is hard to see, it's usually a good idea to write the word "XNOR" inside
the gate.
                                                  49
       Basic Computer                                                                     B.pharm PU


The truth table defines the behavior of this gate.
The function implemented by XNOR gates has interesting properties:
    The function is symmetric. Thus, x XNOR y == y XNOR x. This can be verified by using
        truth tables.
    The function is associative. Thus, (x XNOR y) XNOR z == x XNOR (y XNOR z). This can
        be verified by using truth tables.
Because of these properties, it's easy to define XNORn, which is an n-input XNOR gate.
                       XNORn(x1, x2,...,xn) = x1 XNOR x2 XNOR ... XNOR xn
That is, an XNOR gate with n-inputs is the XNOR of all the bits. This is not ambiguous because the
XNOR function is associative (all parenthesization of this expression are equivalent).

Summary truth tables

The summary truth tables below show the output states for all types of 2-input and 3-input
gates.
              Summary for all 2-input gates                  Summary for all 3-input gates
  Inputs                    Output of each gate               Inputs      Output of each gate
   A B AND NAND OR NOR EX-OR EX-NOR                          A B C AND NAND OR NOR
   0     0     0        1      0     1     0      1          0   0   0    0       1         0      1
   0     1     0        1      1     0     1      0          0   0   1    0       1         1      0
   1     0     0        1      1     0     1      0          0   1   0    0       1         1      0
   1     1     1        0      1     0     0      1          0   1   1    0       1         1      0
                                                             1   0   0    0       1         1      0
               Note that EX-OR and EX-NOR                    1   0   1    0       1         1      0
               gates can only have 2 inputs.                 1   1   0    0       1         1      0
                                                             1   1   1    1       0         1      0

Combinations of logic gates

Logic gates can be combined to produce more complex functions. They can also be
combined to substitute one type of gate for another.
For example to produce an output Q which is true only when input Input A Input B Output Q
A is true and input B is false, as shown in the truth table on the
                                                                    0       0       0
right, we can combine a NOT gate and an AND gate like this:
                                                                    0       1       0
                                                                              1       0            1
                                                                              1       1            0

Q = A AND NOT B

A.B¯
Working out the function of a combination of gates

Truth tables can be used to work out the function of a combination of gates.
                                                  50
    Basic Computer                                                                B.pharm PU


For example the truth table on the right show the intermediate outputs   Inputs       Outputs
D and E as well as the final output Q for the system shown below.
                                                                         A B C D E Q
                                                                         0   0   0    1   0    1
                                                                         0   0   1    1   0    1
                                                                         0   1   0    0   0    0
                                                                         0   1   1    0   1    1
                                                                         1   0   0    0   0    0
                                                                         1   0   1    0   0    0
                                                                         1   1   0    0   0    0
                                                                         1   1   1    0   1    1
D = NOT (A OR B)
E = B AND C
Q = D OR E = (NOT (A OR B)) OR (B AND C)

A  B + B.C

Substituting one type of gate for another

Logic gates are available on ICs which usually contain several gates of the same type, for
example four 2-input NAND gates or three 3-input NAND gates. This can be wasteful if only
a few gates are required unless they are all the same type. To avoid using too many ICs you
                      can reduce the number of gate inputs or substitute one type of gate for
                      another.

                     Reducing the number of inputs

The number of inputs to a gate can be reduced by connecting two (or more) inputs together.
The diagram shows a 3-input AND gate operating as a 2-input AND gate.


                     Making a NOT gate from a NAND or NOR gate

                    Reducing a NAND or NOR gate to just one input creates a NOT gate.
The diagram shows this for a 2-input NAND gate.


Any gate can be built from NAND or NOR gates

As well as making a NOT gate, NAND or NOR gates can be combined to create any type of
gate! This enables a circuit to be built from just one type of gate, either NAND or NOR. For
example an AND gate is a NAND gate then a NOT gate (to undo the inverting function).
Note that AND and OR gates cannot be used to create other gates because they lack the
inverting (NOT) function.

To change the type of gate, such as changing OR to AND, you must do three things:

                                             51
       Basic Computer                                                       B.pharm PU


        Invert (NOT) each input.
        Change the gate type (OR to AND, or AND to OR)
        Invert (NOT) the output.

For example an OR gate can be built from NOTed inputs fed into a NAND (AND + NOT)
gate.

NAND gate equivalents

The table below shows the NAND gate equivalents of NOT, AND, OR and NOR gates:
                        Gate                 Equivalent in NAND gates

           NOT


           AND




            OR




           NOR




                                                 Substituting gates in an example
                                                 logic system

                                                 The original system has 3 different
                                                 gates: NOR, AND and OR. This requires
                                                 three ICs (one for each type of gate).

                                                   To re-design this system using NAND
gates only begin by replacing each gate with its NAND gate equivalent, as shown in the
diagram below.




                                            52
     Basic Computer                                                                        B.pharm PU




                                                                   Then simplify the system by
                                                                   deleting adjacent pairs of NOT
                                                                   gates (marked X above). This
                                                                   can be done because the second
                                                                   NOT gate cancels the action of
                                                                   the first.

                                                             The final system is shown on the
                                                             right. It has five NAND gates and
                                                             requires two ICs (with four gates
on each IC). This is better than the original system which required three ICs (one for each
type of gate).

Substituting NAND (or NOR) gates does not always increase the number of gates, but when
it does (as in this example) the increase is usually only one or two gates. The real benefit is
reducing the number of ICs required by using just one type of gate.


Building Blocks

We can use logic gates to build circuits. While we've described 6 gates, you can do with only three
gates to build all possible circuits: AND, OR, and NOT. In fact, you don't even need all three gates.
It can be done in two kinds of gates of less. We'll explain in a future section.
These circuits can implement any truth table.
Gate Delay
Real gates have delay. In other words, if you change the value of the inputs, say from 0 and 0 to 0 and
1, then the output takes some small amount of time before it changes. This delay is called gate delay.
This delay is due to the fact that information can travel at most, the speed of light, and in reality, the
time it takes to do the computation is not infinitely quick.
This delay limits how fast the inputs can change and yet the output have meaningful values. It also
allows certain kinds of circuits to be created that don't follow the rules from the previous section. In
particular, flip flops (to be discussed later) can be generated from gates that use cycles.


                                                   53
      Basic Computer                                                                       B.pharm PU




Implementing logic expressions with logic gate
        Logic expressions in sum of products form: if logic expressions are given in sum of products
form the logic network can be realized using AND-OR gates or only NAND gates. Take a simple
expression given below. Z=AB+CD.
        The given expression will require two AND gates and one OR gate. The logic circuit is shown
in fig1. As NAND gates are universal gates, they are used as building block for the realization of
logic networks. An AND and OR network in fig 1 can be represented by an equivalent NAND
network as shown fig 2. Similarly sum of products expression having more variables can be realized
using AND –OR or equivalent NAND network.
                                                                    A¯.B¯=A¯+B¯
                                                    NAND
                 A.B
                                AB+CD
 AND
                         OR                                                   NAND
    AND                                                                              ( A¯  B ¯ ).( C ¯  D ¯ )
               C.D                                  NAND

                                                                  C¯.D¯=C¯+D¯



       Logic expressions in products of sums form:
       If logic expressions are given in products of sums forms, the logic network can be realized
using OR-And gates or only NOR gates. Take an example
       W=(A+B+C)(X+Y+Z)

                                          OR
                                                    A+B+C



                                                            AND

                                                                  (A+B+C)(X+Y+Z)


                                         OR        X+Y+Z




          Prove the following Boolean expression with the help of truth tables
          1.) X+X¯.Y=X+Y
          2.) (X+Y¯Z)(X¯Y+Z)=XZ+Y¯Z
          3.) ZX¯+XYZ=ZX¯+ZY
X    Y X¯ X¯Y X+X¯Y X+Y
0    0 1    0     0   0
0    1 1    1     1   1
1    0 0    0     1   1

                                                    54
    Basic Computer                                                                        B.pharm PU


1 1      0         0          1   1

X   Y   Z X¯ ZX¯ ZXY ZY ZX¯+ZXY ZX¯+ZY
0   0   0 1    0   0 0        0      0
0   0   1 1    1   0 0        1      1
0   1   0 1    0   0 0        0      0
0   1   1 1    1   0 1        1      1
1   0   0 0    0   0 0        0      0
1   0   1 0    0   0 0        0      0
1   1   0 0    0   0 0        0      0
1   1   1 0    0   1 1        1      1

Y   Z X¯ Y¯ Y¯Z X+Y¯Z X¯Y X¯Y+Z X¯Z XZ+Y¯Z (X¯Y+Z)(X¯Y+Z)
0   0 1 0     0     0   0     0   0      0              0
0   1 1 1     1     0   0     1   0      1              1
1   0 1 0     0     0   1     1   0      0              0
1   1 1 1     0     0   1     1   0      0              0
0   0 0 0     0     1   0     0   0      0              0
0   1 0 0     0     1   0     1   1      1              1
1   0 0 0     1     1   0     0   0      0              0
1   1 0 0     0     1   0     1   1      1              1

        Write down the circuits
        1.) AB¯+ABC+C¯D
        2.) (A+B)C¯+A¯B¯+A¯BC                                         AB¯
        3.) ABC+A¯BC+A¯B¯C¯                                                     AB¯+ABC+C¯
                                                                                D
                                                           AB
                                                           C

                                                                C¯D


             A+B
                                      (A+B)C¯
                                                                               ABC
              C¯
                                                                       A¯BC
                   A¯BC               (A+B)C¯+A¯B¯+
                                      A¯BC
                                                                      A¯B¯C¯
                                                                                     ABC+A¯BC+A¯B¯C¯

                       A¯BC




                                                      55
      Basic Computer                                                                             B.pharm PU




Arithmetic and Logic Unit /Memory Unit
Any arithmetic operation such as Add, Subtraction, Multiplication and Division etc are done by digital
computer or digital devices. The logic circuits are designed to get accurate operation to get real values. So the
operations exists in those operation are an adder, and the summer. While calculating it is very tedious job to
take carry and test all the operation simultaneously. In electronics, an adder or summer is a digital circuit
that performs addition of numbers. In modern computers adders reside in the arithmetic logic unit (ALU)
Although adders can be constructed for many numerical representations, such as Binary-coded decimal the
most common adders operate on binary numbers. In cases where two's complement or one's complement is
being used to represent negative numbers, it is trivial to modify an adder into an adder-subtractor. Other
signed number representations require a more complex adder.

Half Adder
A half adder is a logical circuit that performs an addition operation on two one-bit binary numbers.
The half adder outputs a sum of the two inputs and a carry value. It has two inputs, generally labeled
A and B, and two outputs, the sum S and carry C. S is the two-bit XOR of A and B, and C is the AND
of A and B. Essentially the output of a half adder is the sum of two one-bit numbers, with C being the
more significant of these two outputs.
Half adder circuit diagram                                    Schematic Symbol of Half Adder

                 ___________
       A ------|             |
               |    Half     |----- SUM
               |    Adder    |
               |             |----- Carry
       B ------|___________|
The drawback of this circuit is that in case of a multibit addition, it cannot include a carry. Therefore
a half adder cannot add 3 bits because it has only two bits input terminals.
Following is the logic table for a half adder:
 A          B          C(A.B)(AND)            S(A+B)(OR)

  0          0                  0                    0

  0          1                  0                    1

  1          0                  0                    1

  1          1                  1                    0

As a first example of useful combinational logic, let's build a device that can add two binary digits
together. We can quickly calculate what the answers should be: 0 + 0 = 0          0+1=1          1+0=
1       1 + 1 = 10. So we well need two inputs (a and b) and two outputs. The low order output will
be called Σ because it represents the sum, and the high order output will be called Cout because it
represents the carry out.
Form the table it is concluded that the sum is equal to A XOR B. It means that the outputs of an
exclusive OR gate will give the sum. The carry is equal to A AND B. The output of an And gate will
the carry.
                                                         56
     Basic Computer                                                                        B.pharm PU


Simplifying Boolean equations or making some Karnaugh map will produce the same circuit shown
below, but start by looking at the results. The Σ column is our familiar XOR gate, while the Cout
column is the AND gate. This device is called a half-adder for reasons that will make sense in the
next section.


                                                           S=A‫־‬B+AB‫־‬




                                                              C=AB

Full adder
Full adder circuit diagram
 nputs: {A, B, Carry n} → Outputs: {Sum, CarryOut}

Schematic symbol for a 1-bit full adder

A full adder is capable of adding three bits: two bits and one carry bit. It has three inputs - A, B, and
carry C, such that multiple full adders can be used to add larger numbers. To remove ambiguity
between the input and output carry lines, the carry in is labeled Ci or Cin while the carry out is labeled
Co or Cout.
The full adder produces a sum of the two inputs and a carry value. It can be combined with other full
adders (see below) or work on its own. A full adder can be constructed from two half adders by
connecting A and B to the input of one half adder, connecting the sum from that to an input to the
second adder, connecting Ci to the other input and OR the two carry outputs. Equivalently, S could be
made the three-bit XOR of A, B, and Ci, and Co could be made the three-bit majority function of A, B,
and Ci.
    Input             Output


A B         Ci   Co        S

0   0       0    0         0

0   1       0    0         1

1   0       0    0         1

1   1       0    1         0

0   0       1    0         1

0   1       1    1         0

1   0       1    1         0

                                                     57
     Basic Computer                                                                      B.pharm PU



1   1     1      1        1

It will be easy to write logic expression if we assume An=A, Bn=B and Cn-1=C write the product of
terms when logic circuit Sn=A‾B‾C+A‾BC‾+AB‾C‾+ABC
=A‾(B‾C+BC‾)+A(B‾C‾+BC)
=A‾(B‾®C)+A(B®C)
=A®B®C=An®Bn®Cn-1.
Similarly, carry=A‾BC+AB‾C+ABC‾+ABC.
If we add two more terms we have
 =A‾BC+ABC+AB‾C+ABC+ABC‾+ABC
=BC(A+A‾)+AC(B+B‾)+AB(C+C‾)=
BC+AC+AB
= AnBn+BnCn+AnCn-1
Note that the final OR gate before the carry-out output may be replaced by an XOR gate without
altering the resulting logic. This is because the only difference between OR and XOR gates occurs
when both inputs are 1; for the adder shown here, this is never possible. Using only two types of gates
is convenient if one desires to implement the adder directly using common IC chips.




Flip-Flops (bi-stable)

An electronic circuit or mechanical device capable of assuming either of two stable states, especially
a computer circuit used to store a single bit of information. A device is said to be bi-stable which has
only two states i.e High or Low state. The high state 1 is called SET and low state is called RESET.
Its property is remaining unchanged until the input signal to switch over its state. So it can store
binary bit either 1 or 0.

An electronic circuit element that is capable of storing either of two stable states or of switching
between these states in a reproducible manner. When used in logic circuits the two states are made
to correspond to logic 1 and logic 0. Flip-flops are therefore one-bit memory elements and are
frequently used in digital circuits.

Various forms of flip-flop are available to perform specific functions; these include JK, D, T, and
master-slave flip-flops. Flip-flops are important as memory devices in digital counters. The RS flip-
flop is often considered to be the universal flip-flop since it forms the basic building block for more
sophisticated implementations. JK, master-slave, and D flip-flops are all available in the standard
TTL and CMOS series of integrated-circuit components.

Flip flops symbols and bit storing process:
                                                                                          A   B       NOR

                                                                                          0       0     1

                                                  58                                      0       1     0

                                                                                          1       0     0
     Basic Computer                                                                         B.pharm PU




                                                                               1/
                                                                               0




When S=high (1) and R=low (0) Q‾=0 both inputs of upper AND gate are low so Q=High thus flip flop
store 1 bit. Even if S is removed and Q is feedback for lower NOR gate.

When R= High (1) and S=Low (0) Q =0 so flip-flop store 0. Q one inputs for lower NOR gate. As both
inputs for lower gate are low Q‾ is high.

When R=0, and S=0 the flip flop remain unchanged.

When R and S both are high, it will produce low values form flip-flop is invalid condition.




Clocked R-S Flip-flops

A clock signal is added the flip-flop to control the instant at which the flip-flop changes the state of its
output. The two additional and gates are used to apply the clock signals. When clock is low the
outputs of and gates will be forced to be low hence the state of the flip-flop is not changed. It remains
unchanged. At that time the change in R and S has not effect on the flip-flop output. Thus the flip-flap
is disable when clock is low. When clock is high the outputs of and gates will respond to the changes
in inputs R and S. The flip-flop will now change its output according to the set or reset input. Thus
the flip-flop is enable when clock is high. The R-S FF is used to temporarily hold or store information
                                                    59
     Basic Computer                                                                           B.pharm PU


until it is needed. A single R-S FF will store one binary digit, either a 1 or a 0. Storing a four-digit
binary number would require four R-S FFs.




The simplest form is the RS flip-flop; an implementation using NAND gates is shown in the diagram
together with the flip-flop's truth table. A logic 1 on one of the two inputs either sets the Q output to
logic 1 or resets Q to logic 0. Output Q is the logical complement of Q. When R and S are both logic 1
(which is equivalent to R and S both logic 0), Q does not change state. The situation of both R and S
at logic 0 is ambiguous and is avoided in more complex flip-flop implementations. The outputs of this
(and other) flip-flops are not just functions of the inputs but depend on both inputs and outputs. The
device is thus a simple sequential circuit.
Extra logic gating may be included in the RS device, and in more complex flip-flops, to allow a clock
signal to be input to the flip-flop, so producing a clocked flip-flop. The Q output will not then change
state until an active edge of the clock pulse occurs (edge-triggered device) or a complete clock cycle
has occurred (pulse-triggered device). Provision may also be made to set up a given output
regardless of the state of the inputs.




                                                     60
       Basic Computer                                                                            B.pharm PU




RS Flip-Flop
        A RS-flipflop is the simplest possible memory element.
        It is constructed by feeding the outputs of two NOR gates back to the other NOR gates input.
        The inputs R and S are referred to as the Reset and Set inputs, respectively.
        To understand the operation of the RS-flipflop (or RS-latch) consider the following scenarios:
               o S=1 and R=0: The output of the bottom NOR gate is equal to zero, Q'=0.
               o Hence both inputs to the top NOR gate are equal to one, thus, Q=1.
               o Hence, the input combination S=1 and R=0 leads to the flipflop being set to Q=1.
               o S=0 and R=1: Similar to the arguments above, the outputs become Q=0 and Q'=1.
               o We say that the flipflop is reset.
               o S=0 and R=0: Assume the flipflop is set (Q=0 and Q'=1), then the output of the top NOR gate
                  remains at Q=1 and the bottom NOR gate stays at Q'=0.
               o Similarly, when the flipflop is in a reset state (Q=1 and Q'=0), it will remain there with this
                  input combination.
               o Therefore, with inputs S=0 and R=0, the flipflop remains in its state.
               o S=1 and R=1: This input combination must be avoided.
        We can summarize the operation of the RS-flipflop by the following truth table.
           R            S      Q          Q'       Comment

            0           0      Q          Q'       Hold state

            0           1       1          0       Set

            1           0       0          1       Reset

            1           1       ?          ?       Avoid

        Note, the output Q' is simply the inverse of Q.
        An RS flipflop can also be constructed from NAND gates.


                             Figure 3.10: RS Flip-Flop composed of two NOR Gates.




                                                         61
Basic Computer                                                                 B.pharm PU




                                                                   FM-50
                                                                   PM-20

  Subject Basic Computer (B.Pharm) First Year
  Attempt all questions

  1.   What is computer? Justify the statement computer is not just calculating machine?
                                                                                  6
  2. What do you mean by canonical form of Boolean expression? State and proof De-
              Morgan’s theorem?                                                          7
  3. What do you understand by logic gates? Describe different logic gates with their
              symbols, algebraic expression and truth table?                      7
  4. Simplify the following Boolean expression by Karnaught method                2*4=8
         i. Y=ABC‾+AB‾C‾+ABC+AB‾C
         ii. Y=A‾BC‾D+ABC‾D+A‾BCD+ABCD+A‾B‾C‾D‾
  5. Convert the following expression into canonical form                  2*4=8
        I. XZ+X‾YW+XZW‾
       II. X+YZ‾
  6. Convert these numbers                                                        7*2=14

          i.   (46.57)8                 =(?)16
         ii.   (12.625)10               =(?)2
        iii.   (5D.3A)16        =(?)10
        iv.    (101011101)2             =(?)8
         v.    (0.5A6B)16               =(?)hex
        vi.    Add (-14) and (-9) by using 2’s complement
       vii.    Perform the following subtractions 101.101-11.011
                                                 62
     Basic Computer                                                                       B.pharm PU




                           Unit 5 & 6: Computer System

4.1 Introduction
Computer System is a group of physical parts that are integrated to achieve the objectives. A computer
system needs to do the following operations:

    i. Input: Obtain the data / instructions (program)
    ii. Process: Process data, based on the instructions/ programs.
    iii. Output: Gives the final result for users.
This cycle of operation of a computer is referred as Input-Process-Output or IPO cycle.



Computer System Architecture (Anatomy) is concerned with the structure of computer. It consists of the
various functional components such as

    1.   Input Unit
    2.   Central Processing Unit
    3.   Memory Unit and
    4.   Output Unit




                                CPU




     Input                ALU
                                                             Output


                                      Registers



                            Control Unit



                                                     63
     Basic Computer                                                                         B.pharm PU




                       Main memory




                      Secondary memory




Fig: Block diagram of computer system architecture




4.2 Input Unit
The devices which, read the data and program into the computer, are called input devices, i.e., data and
programs are entered into the computer system for processing through input device. An input device
converts input data into suitable form acceptable to a computer. So, it is a means of communication between
user and the computer. Examples of input devices are keyboard, mouse, joysticks, optical character reader,
light pen, touch panel.



4.2.1 Keyboard
Keyboard is the friendliest input device. It enables users to enter data into a computer. Computer keyboards
are similar to typewriter keyboards but contain additional keys.




                                                    64
     Basic Computer                                                                            B.pharm PU




A keyboard contains different keys



                                 Letters and numbers along with Tab, Caps Lock, Backspace and Enter
 Alphanumeric Keys
 Modifier Keys                   Shift, Ctrl, Alt
 Function keys                   F1, F2, F3, and so on
 Numeric Keypad                  Ten digits and mathematical operators
 Cursor-Movement Keys            Arrow keys, Home/End and Page Up/Page Down
                                 Insert, Delete, Esc, Print Screen, Scroll Lock Pause, Start and Shortcut
 Special-Purpose Keys


How the Computer Accepts Input From the Keyboard?
A tiny computer chip, called the keyboard controller, notes that a key has been pressed. The
Keyboard controller places a code into part of its memory, called the keyboard buffer, indicating
which key was pressed. (A buffer is a temporary storage area that holds data until it can be
processed.) This code is called the key’s scan code. The keyboard controller then signals the
computer’s system software that something has happened at the keyboard. It does not specify what
has occurred just that something has.
                                                    65
      Basic Computer                                                                           B.pharm PU




The signal the keyboard sends to the computer is a special kind of message called an interrupt request. (An
interrupt is a signal; it notifies a program that an event has occurred) the keyboard controller sends an
interrupt request to the system software when it receives a complete keystroke. For example, if you type the
letter r, the controller immediately issues an interrupts request. If you hold down the shift key before typing
the letter R, the controller waits until the whole key combination has been entered.



When the system software receives an interrupt request, it evaluates the request to determine the
appropriate response. When a keypress has occurred, the system reads the memory location in the keyboard
buffer that contains the scan code of the key that was pressed. It then passes the key’s scan code to the CPU.



The keyboard buffer can store many keystrokes at one time. This capability is necessary because some time
elapsed between the pressings of a key and computer’s reading of that key from the keyboard buffer. With
the keystrokes stored in the buffer the program can react to them when it is convenient.




                 Keyboard                   Keyboard                         System

                 Controller                   Buffer                        Software




4.2.2 Mouse
Mouse is one of the most widely used input devices of the computer. A mouse is a small had held device
whose relative motion across the surface can be measured. Because mice are the relative deices, they can be
picked up; move and then put down again without any changes in reported position. For this the computer
maintains the current mouse position, which is incremented or decremented by the mouse movement. It is a
small plastic box with two or three buttons on the top and a ball at the bottom, which rolls on a flat surface.
As the ball moves across flat surface (pad, table), the visible indicator (called pointer/cursor) on the screen
moves in the direction of mouse movement. We can select the commands, draw pictures, and edit text etc.
by pressing the mouse button.



There are different types of mouse:

    i)      Mechanical Mouse
    ii)     Optical Mouse and

                                                       66
         Basic Computer                                                                          B.pharm PU


    iii)       Optomechanical Mouse


Mechanical Mouse
Mechanical mouse has a rubber ball at the bottom that can roll in all direction. When a roller in the
base of this mechanical mouse is moved, pair of the orthogonally arrange toothed wheels, each placed
in-between a LED and the photo detectors, interrupts the light path. The numbers of interrupts so
generated are used to report the mouse movement to the computer.


Optical Mouse
The optical mouse is used on a special pad having grids of altering light and dark lines. A LED on the
bottom of the mouse directs a beam of light down onto the pad, from which it is reflected and sensed
by the detectors on the bottom of the mouse. As the mouse is moved, the reflected light beam is
broken each time a dark line is crossed. The number of pulses so generated, which is equal to the
number of lines crossed, is used to report mouse movements to the computer.
Optomechanical Mouse
Optomechanical mice are same as a mechanical mouse but uses optical sensors to detect motion of the ball.
A ball rolls on two shafts. The shaft turns optical shaft-angle encoders to convert motions to electrical signals.
This type of mouse is easier to clean as compared to clean a mechanical mouse.



Beside these 3D indication mice also have been developed which is used for 3D-simulation. A mouse
may have two or three buttons. Two-button mouse are common. Scroll mouse and cordless mouse
have also been developed.


Mouse can be connected to PCs in different ways:

          They can be connected either to serial port (9-pin) or PS/2 port (6-pin) or USB port.
          Cordless/Wireless mice are not connected physically. They use infrared or radio waves to
           communicate with computer.
.



4.2.3 Scanner
Scanner is an input device that can read text or illustration printed on paper and translates the information
into a form that the computer can use. The resulting image (text or illustration) can be stored in a file as Bit
Map or JPEG (Joint Photographic Experts Group), displayed on a screen, and manipulated by programs.

A light source is moved across a printed page. The light bounces off the page and is passed through the lens
and onto light-sensitive diodes, which convert the light to electricity. A circuit board converts the electricity
to numbers and sends the information to the computer.

There are two types of scanners:

    i)         Hand held scanner and
                                                       67
         Basic Computer                                                                           B.pharm PU


    ii)        Flat bed scanner

Hand-held Scanner
A hand held scanner is around 13cm long and 15 cm wide with a handle
to enable it to be held conveniently in hand. A set of light emitting
diodes is enclosed in it. It is placed over the material to be scammed and
slowly dragged from the top to the bottom.

Flatbed Scanner
                            A flat bed scanner consists of a box with a glass plate on top and cover, which
                            covers the glass plate. The document to be scanned is placed above the glass plate.
                            The light beam is situated below the glass plate and is moved from left to right
                            horizontally.




Beside these, scanners differ from one another in the following respects:

    i)   Scanning Technology: Most scanners use charge-coupled device (CCD) array, which consist of tightly
         packed rows of light receptors that can detect variations in light intensity and frequency. Industry-
         strength drum scanners use a different technology that relies on a photo multiplier tube (PMT), but
         this type of scanner is much expensive.
    ii) Resolution: The denser the bit map, the higher the resolution. Typically, scanners support resolution
         from 72 to 600dpi(dots per inch)
    iii) Bit depth: The number of bits used to represent each pixel. The grater the bit depth, the more colors
         can be represented.




4.2.4 Optical Character Reader (OCR)
OCR is an input device, which is used to read an image, characters of different fonts printed on any paper.
The printed characters are examined by passing them under a light and lens system. A light source converts
the alphabets, number and special characters into electrical pulses, which are then sent to the computer for
processing. If there is no dark spot it is represented by 0 and if there is a dark spot it is represented by 1.Such
representation is called the bit map of the image. Nowadays, advanced OCR system can also read
handwritten text.



4.2.5 Optical Mark Reader (OMR)
It is an input device that can detect the presence or absence of a pencil or pen
mark on a paper. Light is shown onto the marked paper and the reflected light is



                                                        68
        Basic Computer                                                                        B.pharm PU


observed. The presence of a mark is confirmed due to lesser light being reflected from that portion of the
paper. OMRs are mostly used for

         Objective type answer papers in examinations.
         Order forms containing a small choice of items
         Market survey, population survey etc.
         Time sheets of factory employees in which start and stop time may be marked.



4.2.6 Magnetic Ink Character Reader (MICR)
MICR is an input device, which reads the characters printed using magnetic ink.
Magnetic ink is a special type of ink containing iron-oxide particles, which is
used to write characters. MICRs are mostly used in banks for processing cheque.
MICR reads the cheque by first magnetizing the magnetic characters printed on
the cheque and then sensing the signal induced by each passing character under                              a
reading head.




4.2.7 Some other Forms of Input Devices
Microcomputers or microprocessor-based systems are now widely used in industry for automatic control.
Physical quantities like temperature, pressure, speed, stress, force, vibration etc. are measured and
controlled by microcomputers. An electrical or electronic device called transducer is used to sense physical
quantity and give proportional electrical signal. The electrical signals are amplified and then converted to
digital signals. The digital signals are fed to the processor for measurement, display and control purpose.
Transducers, amplifiers, analog-to-digital converter etc. form a circuitry called data acquisition system. The
data acquisition system acts as an input device.

In many applications it is desired that a computer should be able to see its environment. For example, a robot
must be able to see to perform its job; a computer-controlled security system must be able to see its
environment etc. To provide vision to computers, sensors like video cameras, CCD cameras, OPTICRAM
cameras etc. are employed. These cameras act as sensors to provide signal proportional to the intensity of
light falling on the various spots of the image of an object. The computer can process these signals and
recognize and display the image of the object. Such sensing devices which provide the required signals to
computers act as input devices.




4.3 Central Processing Unit (CPU)
The part of the computer that executes program instructions stored in the main memory is called the
                                                      69
     Basic Computer                                                                             B.pharm PU


processor or central processing unit (CPU). It is the brain of computer. The CPU has three units:
    a. Arithmetic and Logic Unit (ALU)
    b. Control Unit (CU)
    c. Registers
The purpose of CPU is to execute the programs stored in the main memory by performing the
following tasks:
        1.   Fetch instruction from memory
        2.   Understand the fetched instruction to determine what is needed.
        3.   Perform arithmetic or logical operation on data
        4.   Write data, if required, either to a memory location or an output device.




Arithmetic and Logic Unit (ALU)

The ALU performs all four arithmetical (+, -, *, /), relational (<, >, =, <=, >=) and logical (AND, OR, NOT, XOR
etc.) operations. When two numbers are required to be added, these numbers are sent from memory to ALU,
where addition takes place and the result is put back in the memory.

For relational operations also, the numbers to be compared are sent from memory to ALU, where
comparison takes place and the result is returned to the memory. The result of a relational/logical operation
is true or false. So, these operations provide the capability of decision making to the computer.



Control Unit (CU)

The CU controls all the activities of the computer. It co-ordinates and controls the interpretation, flow and
manipulation of all data and information. The CU sends control signals until the required operations are done
properly by ALU and memory. CU gets program instructions from memory and executes them one after the
other. It also controls the flow of data from input devices to memory and from memory to output device.

In this way, combine function of ALU and CU is considered as the function of CPU.



 Registers

Registers are primarily used to store data temporarily during the execution of a program. Some registers are
special purpose registers and some are general-purpose registers. General purpose registers store data and
intermediate results during the execution of a program. General-purpose registers are also accessible to
programmer through instructions. Special purpose registers like PC (Program Counter) holds the address of
the next instruction to be executed and SP (Stack Pointer) holds the address of the first location of the stack.




4.4 Memory
                                                      70
        Basic Computer                                                                            B.pharm PU


  Memory is a part of computer (device) that is used to store data as well as instructions (programs). It is also
  known as storage device. There are mainly two types of memory.

       a. Primary (or Main) Memory and
       b. Secondary (or Auxiliary) Memory




                                    MEMORY



              Main memory                                     Secondary Memory



       Volatile            Nonvolatile              Optical                            Magnetic

        (RAM)                 (ROM)

SRAM         DRAM                                                        Disk          Drum              Tape


                    PROM              EEPROM
                                                                Floppy          Hard disk
                           EPROM


                                         CDROM                CDR           CDRW              DVD




                                                        71
       Basic Computer                                                                   B.pharm PU




                                            Fig: Types of memory

4.4.1 Primary (Main) Memory
The semiconductor memory is employed as the main memory (or primary memory) of the computer. It stores
programs and data which are currently needed by the CPU. The information which is needed by the CPU for
current processing is transferred from the secondary memory to the main memory. The CPU communicates
directly with main memory. It is faster, smaller and expensive than the secondary memory. There is no
rotating part in it.

They are of two types:

   a. Random Access Memory (RAM)
   b. Read Only Memory (ROM)


4.4.1.1 Random Access Memory (RAM)
The read and write memory of a computer is known as RAM. The users of the
computer can write information into RAM and read information from RAM. In
RAM any memory location can be accessed in a random manner
without going through any other memory locations or preceding
locations. The main drawback of RAM memory is that it is a volatile
memory, i.e., when the power goes off, the contents of RAM gets
erased. RAM is available in the form of a chip with different memory
capacity ranging, from 64 Kilobytes to 1 Gigabytes. Increasing RAM
capacity improves system perform. For example, a computer with 8 MB
RAM has approximately 8 million bytes of memory that programs can use.

There are two types of RAM:

   a. Static RAM (SRAM)
   b. Dynamic RAM (DRAM)


Static RAM (SRAM)

        A static RAM retains stored data and programs as long as power supply is on.
        It is more expensive. (Cost is high)
        Made up of flip flops and it stores the bit as a voltage.
        Speed is high.
        Produce more heat.
        Larger than DRAM


Dynamic RAM (DRAM)

                                                      72
        Basic Computer                                                                           B.pharm PU


         It loses the stored information in a very short time even though the power supply is on.
         Cost of DRAM is less (low price)
         Made up of transistors and logic gates, and stores the bit as a charge.
         Speed is lower than SRAM.
         Produce less heat.
         Smaller than SRAM.
4.4.1.2 Read Only Memory (ROM)
The read only memory (ROM) is a memory unit that performs the read operation only; it does not have write
capabilities. The information stored in a ROM is made permanent during the hardware production and
cannot be altered. ROMs are non-volatile memory, i.e. information stored in ROM is not lost even if the
power supply goes off. So, ROMs are used for storing the programs to boot the computer handling the
operating system and monitor program controlling a machine. They are slower than RAM. There are various
types of ROM:

    a. PROM (Programmable ROM)
    b. EPROM (Erasable PROM)
    c. EEPROM (Electrically EPROM)


PROM (Programmable ROM)

A PROM is a memory chip on which data can be written only once. Once a program has been written onto a
PROM, it remains there forever and cannot be changed.

They are manufactured as blank memory. To write data onto a PROM chip, you need a special device called a
PROM programmer or PROM burner. The process of programming a PROM is sometimes called burning the
PROM.



EPROM (Erasable PROM)

EPROM is a special type of memory that retains its contents until it is exposed to ultraviolet light for 10 to 20
minutes. The ultra-violet light clears its contents, making it possible to reprogram the memory. For erasing
purpose, the EPROM chip has to be removed from computer.



EEPROM (Electrically EPROM)

It is a special type of PROM that can be erased by exposing it to an electrical charge. The time required to
erase this type of PROM is very short (few seconds). Unlike EPROM chips, EEPROMS do not need to be
removed from the computer to be modified.



4.4.2 Secondary Memory

                                                       73
     Basic Computer                                                                               B.pharm PU


The secondary memory is used to store data, information and programs permanently. The capacity of
secondary memory is larger than the main memory. The two main categories of storage technology used
today are magnetic storage and optical storage. The common secondary or auxiliary memories used in
computer are floppy disks, hard disks and compact disk.



4.4.2.1 Magnetic storage
Magnetic storage devices uses surface coated with a
magnetically sensitive material, such as iron oxide, which reacts
                                                                                                 Sector
to a magnetic field. The orientation of a magnetic filed can be
used to represent data. A magnet has one important advantage
over transistor; it can be represent 0 and 1 without a continual
source of electricity. The surfaces are coated with millions of                                    Tracks
tiny particles so that data can be stored on them. Each of these                               particles
can act as a magnet, taking on a magnetic field when subjected to an
electromagnet. The read/write heads contain electromagnets, which generate magnetic fields in the
surface and thus magnetize the surface of the disk below the head. When binary 1 is to be stored, the
information is sent to the head, and it magnetizes a spot below with left to right pole alignment SN.
Similarly the binary 0 is stored with right to left pole alignment NS.

When formatting a disk, a set of magnetic concentric circles, called tracks are created. Most high-
density diskettes have 80 tracks on each side of the disk. The tracks are numbered from the outermost
circle to the innermost, starting with zero. Each track on a disk is also split into smaller parts known
as sectors. Most high-density diskettes have 18 sectors on each track. All the sectors on the disk are
numbered in one long sequence. Each sector can store up to 512 bytes.



4.4.2.1.1 Magnetic Tape
A magnetic tape is the most popular and least expensive medium for storing
data and files. It is available in the form of cassettes, reels etc. Reels are mostly
used in mainframe and minicomputers. The magnetic tape is a plastic ribbon Frames
(Mylar) coated on one side with an iron-oxide material, which can be
magnetized. The width of a tape may vary, but ½ inch wide tape is most common. The length of tape
varies from 50 to 2400 feet. Data are recorded in the magnetic tape in the form of vertical frames. The
recording density of a system is measured in BPI (Bytes Per Inch). One byte stores one character.
1600 BPI means that 1600 characters or frames can be stored on 1 length of the tape.

As the data in the magnetic tape is accessed sequentially, it is slow to access selected data, i.e., direct access
or random access to records is not possible.



4.4.2.1.2 Magnetic Disks
Magnetic disks are the most important and common secondary storage devices in a computer system.
They are direct access or random access devices. A magnetic disk is a circular disk, which is made of

                                                       74
     Basic Computer                                                                               B.pharm PU


metal (Aluminium) or a thin plastic (Mylar) coated with metallic oxide on both sides that can be
magnetized. It allows the recording of data in the form of magnetized spots.
The data is stored on the disks in a number of invisible concentric circles called tracks. Tracks are divided into
sectors and the number of sectors per track varies from computer to computer.

The read/write head is fixed to an arm that can move in and out over the surface of the disk, i.e., head can be
moved quickly and directly to any disk location to store or retrieve data. So access of data in magnetic disk is
faster than magnetic tape.



Magnetic disks are available in the following two forms: (i) Floppy disk & (ii) Hard disk




Floppy disk
Floppy disks, popularly known as diskettes, are commonly used as secondary
storage device. They are very thin (about 0.64 mm), flexible and easily
transportable (remove from drive). A floppy is a single disk packaged inside a
protective plastic envelope, called jacket. A floppy disk is made of a thin plastic
(Mylar) coated with Ferric oxide (brown coating), which can be magnetized. The
read/write head direct contact with the surface. The read/write open area in
the jacket exposes the disk to the driver’s head to read and write the
information.

Floppy disks are small, convenient and inexpensive. They are of 5.25” and 3.5” in diameter and come
with different storage capacities like 1.44 MB, 2 MB, and 2.88 MB etc. The speed of floppy disk is
generally 360 rpm.
Floppy disk capacity can be calculated as

No. of bytes per sector X No. of sector per track X No. of tracks X No. of side


Calculate the storage capacity of a 3.5” double-sided double disk (number of bits that can be stored per inch
is the density).

No. of bytes per sector = 512            Disk capacity = 512 x 18 x 80 x 2

No. of sector per track = 18                                 = 1474560 Bytes

No. of tracks = 80                                           = 1440 KB

No. of side = 2                                      = 1.44 MB (approx)




                                                       75
     Basic Computer                                                                               B.pharm PU




Hard disk
Hard disk is a secondary storage medium that stores large amount of data, is made from Aluminum metal. It
holds more data and is faster than floppy disk (capacity- 10 GB, 20 GB, 40 GB etc. and speed – 5400 rpm to
10,000 rpm).

A single hard disk may consist of single or multiple platters (disks). Each platter requires two read/write
heads, one for each side. All the heads are attached to a single access arm (comb like structure) so that they
cannot move independently. Each platter has the same number of tracks and a track location that cuts across
all platters is called a cylinder.

The read/write head along with arm does not physically touch the disk surface; it floats above the surface of
the disk and detects the data.

If there are 100 tracks per surface in a disk having 8 surfaces, then the number of cylinders is equal to
100 and each cylinder will have 8 tracks. If a certain amount of data is to be stored on the hard disk,
the recording always starts from the first sector of the first track of the first cylinder. When the system
has filled the track with data, it moves to the next surface on the same track i.e. from surface 1 to
surface 2 at the same arm position. Thus no time is wasted because switching from one head to
another is done electronically and no seek time is involved.
Hard disk capacity is calculated as:

No. of bytes per sector X No. of sector per track X No. of track per cylinder X No. of cylinder



Calculate the storage capacity of Hard disk having 4092 CYL, 16 tracks and 63 sectors.

Disk capacity = 512 x 63 x 16 x 4092

                 = 2111864832 Bytes

                = 2062368 KB

                = 2014.03 MB

                = 2 GB (approx.)




4.4.2.1.3 Magnetic Drum
The drum on which magnetic oxide coating is made is called magnetic drum. It is basically used to store a
large amount of binary information. One read/write head controls each track in the drum. As the drum
rotates, the binary data can be stored along the tracks of the drum or the data can be read from the tracks.
Out of all the tracks one track is taken as timing track due to which reading or writing related to any
particular track is controlled.

                                                        76
     Basic Computer                                                                              B.pharm PU




4.4.2.2 Optical Disk
Optical disk is a secondary storage medium from which data is read and to
which it is written by lasers. These storage devices works on a principle
similar to magnetic storage devices, however, they use laser technology to
read and write data. A laser beam is projected on the reflecting surface to
read data from the disk. By detecting the light intensity reflected from the
surface, the information stored on the disk. By detecting the light intensity                          reflected
from the surface, the information stored on the disk can be accessed.                                Spiral Groove

Data is laid out on a CD-ROM disk in a long, continuous spiral that starts at the outer edge and winds
inward to the center. Data is stored in the form of lands, which are flat areas on the metal surface, and
pits, which are depressions or hollows. A land reflects the laser light into the sensor indicating 1 and a
pit scatters the light indicating 0.
Optical disks have very high storing capacities. There are three basic types of optical disks.




                        Land                                                      Pits




                                             Sensor




                                           Prism


                                                 Laser


              Reading 0                                                           Reading 1




                                                         77
     Basic Computer                                                                            B.pharm PU




4.4.2.2.1 CD-ROM (Compact Disk- Read Only Memory)
CD-ROM is a type of optical disk capable of storing large amount of data. A single CD-ROM has the storage
capacity of 600 floppy disks. It contains pre-recorded data that can be read only (i.e., can not be erased and
modified/changed). A laser beam is used to write into and read data from CD-ROM. The head of CD-ROM
drive does not touch the disk surface.

CD-ROM disks are plastic disks coated with Aluminum on the surface. A layer of thin transparent plastic is
further deposited on the disk. Information on a CD-ROM is written as a single continuous spiral, unlike
magnetic disks with discrete cylinders and tracks.

The CD-ROMs take longer time to read data as compared to hard disks (slower than hard disk). These disks
are specially used for software and multimedia system (to store data, sound and pictures).

A CD-ROM is prepared by using a high power laser to burn 1-micron (10 –6 of a meter) holes in a master disk.

4.4.2.2.2 CD-R (CD- Recordable)
Also known as WORM (Write Once Read Many). With a WORM disk drive, you can write data onto a WORM
disk, but only once. The writing process is normally slower than the reading process. After writing onto a
WORM disk, it behaves just like a CD-ROM.

4.4.2.2.3 CD-R/W (Compact Disk- Read/Write)
CD-R/W disk is a new type of CD disk that enables the users to read and write data many times. With CD-R/W
drives and disks, you can treat the optical disk just like magnetic disk, writing data onto it again and again.

4.4.2.2.4 DVD (Digital Versatile Disk)
                                                      78
     Basic Computer                                                                         B.pharm PU


DVD-ROM is a high-density medium capable of storing a full-length movie on a single disk. DVD-ROM
achieves such high storage capacities by using

          both sides of the disk
          special data-compression technologies and
          extremely small tracks for storing data.
          layers of data tracks

4.5 Cache Memory (Cash Memory)
A high-speed memory is to be placed in between central processing unit (CPU) and the main memory to
increase the speed of processing. The speed of processor is faster than the main memory; hence the cache
memory is used in between CPU and main memory so that the speed of operation of main memory and
cache memory together can meet the speed requirement of the high speed CPU. The cache memory is very
small, expensive and has high speed. The capacity of cache memory ranges from 1 KB to 512 KB (or 1MB).
Cache memory is a part of processor


                                          Cache
           CPU                           Memory                       Main Memory
                             Fig: Use of cache memory




4.6 Output Unit
The output devices receive results and other information from the computer and provide them to the users.
The output device receives the information from the computer in the binary form and it converts that binary
information into a suitable form, which a user can understand easily. For example, output device provides
printed form or it displays on the screen or interprets in voice. The examples of output devices are monitor
(screen), printer, speaker etc. There are two types of output devices.



Softcopy Output: Softcopy output refers to the output displayed on the screen. The output on the screen is
lost when computer is turn off. The most common output device is monitor. Sound produced by voice output
device (speaker) is also softcopy output.

Hardcopy Output: Hardcopy output refers to recording letters, graphics or pictures on a permanent medium
such as paper. Such output can be read immediately or stored and read latter. The most commonly used
hardcopy output devices are printer and plotters.



4.6.1 Monitors


                                                    79
      Basic Computer                                                                            B.pharm PU


Monitor, also known as display screen, is an output device that is used to display text (letters, numbers and
special characters) and graphics (pictures), allowing users to view the result of processing. The monitor is the
most commonly used output device on most personal computer systems.

There are two basic types of monitors:

                        i)      Cathode Ray Tube (CRT) Monitors and
                        ii)     Flat-Panel Monitors
All monitors can be categorized by the way they display colours:
 Monochrome Monitors: displays only one color such as green, amber                                 or white
  against a contrasting background, which is usually black. These                                     monitors
  are used for text-only displays.
 Color Monitors: can display anywhere from 16 colors to 16 million colors.

CRT Monitors
The CRTs operate much like those in television sets. A single electron gun (negatively charged
heated metal) in a monochrome CRT sends a beam of electrons towards (the positively charged)
phosphor coated screen surface as shown in figure. When the electrons strike on the phosphor-coated
screen, it emits visible lights. Varying the intensity of the beam produces screen images.
The color CRT system uses three electron guns to scan dots of Red, Green and Blue. So color
monitors (using color CRT technology) are sometimes called RGB monitors.
CRT has major disadvantages:
    i)      Because they are big, they take up desktop space and can be difficult to move.
    ii)     CRT monitors require a lot of power & iii) occasional flickering of images


    Cathode      Control      Focusing     Accelerating    Deflecting                                 Phosphor
                                                                                                       Coated
                       Grid       Anode                Anode            System                         Screen




                                                                                                       Electron
                                                                                                        Beam




Heating Filament
                                                     Interior metallic coating
                                                                  at high voltage

                                                      80
         Basic Computer                                                                        B.pharm PU




                                Fig: Basic design of Monochromatic CRT



Flat-Panel Monitors
There are several types of flat-panel monitors, but the most common is the liquid crystal display (LCD)
monitor. CRT is more reliable but it is bulky and consumes a lot of power. LCD does not have a picture tube.
So LCD consumes less power, small in size and does not flicker, thereby avoided eyestrain and fatigue caused
by CRTs.

LCD produces images by aligning molecular crystals (Nematic liquid crystal). When a voltage is applied, the
crystals line up in a way that block light from passing through them and this absence of light is seen as
characters or images on screen. The point of blocked light is the pixel.

Disadvantage:

          The image has very little contrast(contrast ratio)
          Problems with viewing angle
          Response time is more than CRT
          The resolution is not as good as that of CRT


Comparing Monitors
Some of the parameters for monitor comparison are:
            Screen Size: Screen sizes are measured in diagonal inches, the distance from one corner to the
             opposite corner diagonally. Bigger the screen is better.
            Resolution: Resolution is the number of pixels on the screen, expressed as a matrix. For example,
             a resolution of 800 X 600 means that there are 800 pixels horizontally across the screen and 600
             pixels vertically down the screen. The more the pixels, the sharper the image.
            Refresh Rate: Refresh rate is the number of times per second that the electron guns scan every
             pixel on the screen and is measured in Hertz (Hz). A refresh rate at 72 Hz is necessary to avoid
             flicker.
            Dot Pitch: It is the distance between adjacent pixels on a computer monitor measured in
             millimeters. Smaller dot pitch means clearer and sharper pictures. In general dot pitch should not
             be greater than 0.28mm




4.6.2 Printer
Printer is a peripheral device used to print different texts, pictures (illustrations or figures) etc. They are
different types of printer:

    i)     Impact Printer and         ii) Nonimpact Printer



                                                          81
         Basic Computer                                                                          B.pharm PU


Impact Printer
In impact printer, the hammer of the printer strikes against an ink ribbon to make marks on the paper. This
includes Dot-Matrix printers, Daisy-Wheel printers and Line printer.



Nonimpact Printer
In Non-Impact printer, the ink is sprayed to the paper so that the letters or objects get printed. This
includes Ink-Jet printer, Laser printer and Thermal printer.


When evaluating printers, three criteria are important:

    i)         Image Quality: Image quality, also known as print resolution, is usually measured in dots per inch
               (dpi). The more dots per inch a printer can produce, the higher its image quality. Most common
               print resolution is 300 or 600 dpi.
    ii)        Speed: Printer speed is measured in the number of pages per minute (ppm) the device can print.
               A print speed goes up, so does cost
    iii)       Cost of Operation: The cost of ink or toner and maintenance varies with the types of printer.
               Many different types of printer paper are available, too, and the choice can affect the cost of
               operation.


4.6.2.1 Dot Matrix Printer
Dot matrix printer creates characters by striking pins against an ink ribbon. Each pin
makes a dot and combination of dots form characters and illustration. The speed of dot
matrix printer can vary from 30 to 300 cps (character per second). There are two types
of dot matrix printers: with 9-pin and 24-pin heads.

Advantages
    1. They are inexpensive.
    2. They can print to multi-page forms (i.e. it is possible to use carbon papers to get extra copies of the
       same document simultaneously)
Disadvantages
    1. The quality of print is poor.
    2. They are noisy.
    3. Not good for continuous printing.


4.6.2.2 Line Printer
This special type of impact printer works like a dot matrix printer but uses a
special wide print head that can print an entire line of the text at a time. It is
mostly used with mainframes and minicomputers. It can print 300 to 3000
lines per minute. They cannot print graphics; the print quality is low and is
very noisy. There are three types of line printer:
    i) Drum Printer
    ii) Chain Printer

                                                        82
        Basic Computer                                                                         B.pharm PU


    iii) Band Printer
Drum Printer
The drum printer uses a rotating drum or cylinder. A complete character set is embossed around the
circumference of a drum at every print position. One complete revolution of the drum is required to print
each line. The character is printed, when the hammer hits the paper and ribbon against the desired character
on the drum. It can print upto 3000 lines per minute.



Chain Printer
Chain printer uses chain that rotates horizontally in front of paper. The rotating chain, called print chain,
contains the characters to be printed. Printing is performed when the required character comes in the print
position. Immediately the hammer strikes the ribbon and paper against the character. It can print from 400
to 2400 lines/min.



Band Printer
A band printer features a rotating band that is embossed with alphanumeric characters. To print a
character, the machine rotates the band to the desired character, and then a small hammer taps the
band, pressing the character against a ribbon. Although this sound likes a slow process, band printers
are very fast and very robust. Depending on the character set used, a good-quality band printer can
generate 2000 lines of text per minute.



4.6.2.3 Daisy Wheel Printer
Daisy–Wheel printers are a type of printer that produces letter-quality type. The characters are arranged on
the ends of the spokes (each of the rods running from the hub to the rim of a wheel) of a wheel. To print a
character, the printer rotates the hub until the desired letter is facing the paper. Then a hammer strikes the
appropriate character to hit an ink ribbon, leaving an impression of the character on the paper.

         They give better quality of print than dot- matrix printer.
         They cannot print graphics, are noisy and slow, printing 75 characters per second.

4.6.2.4 Ink Jet Printer
Ink Jet printers work by spraying ionized ink from a nozzle onto the paper.
Magnetized plates in the ink’s path direct the ink onto the paper in the desired
shapes. The ink-jet printer provides a resolution of 300 dpi or more (upto 720
dpi). They require a special type of ink (ink with Isopropyl Alcohol).

Advantages
    o     High quality print.
    o     Price is lower than Laser printer
    o     Color ink-jet printers provide an inexpensive way to print full color documents.

                                                        83
        Basic Computer                                                                               B.pharm PU


Disadvantages
    o     Expensive than dot–matrix printer.
    o     It needs special type of ink.
    o     Ink clogging (blocking) in the printer head is the main problem with an ink-jet printer.


4.6.2.5 Laser Printer
Laser – Light Amplification Stimulated Emission and Radiation

Laser printer uses a laser beam to produce an image on a drum, coated with
photosensitive material. With this, certain parts of the drum surface get
electrically charged and special ink (ink + developer) is sprinkled on the                            drum,
which sticks electro statically to the charged area of the drum, forming the image. As the drum rotates, the
image is transferred onto the paper through a combination of heat and pressure.

Print resolution ranges from 300 to 2400 dpi. So, laser printer produces extremely high quality text and
graphics (including colors). They are expensive than other printers. The speed of laser printers can be upto 10
– 15 pages per minute.




4.6.2.6 Thermal-Wax Printer
Thermal-wax printers are used primarily for presentation graphics and handouts.
They use special heat-sensitive ribbon that holds ink in a wax binder. When the hot
print head press the ribbon against the paper, the wax melts and ink is transferred to
the paper. Thermal printers use dot-matrix approach to print characters. Color
thermal printers are also available. Color printer operates with a ribbon coated with
panels of colored wax that melts and adheres to plain paper as colored dots when
passed over a focused heat source.




4.6.3 Plotters
Plotter is a device that draws pictures on paper based on commands from a
computer. Plotters differ from printers in that they draw lines using a pen. As
a result, they can produce continuous lines, whereas printers can only simulate
lines by printing a closely spaced series of dots. Multi color plotters use
different colored pens to draw different colors. There are two types of plotters:
    i)       Drum Plotters
    ii)      Flat-Bed Plotters
                                                         84
     Basic Computer                                                                               B.pharm PU


Plotters are more expensive than printers. They are used to print large-format images, such as
construction or engineering drawing.


Drum Plotters
In a drum plotter, the paper on which the graph is to be drawn is mounted on a rotating drum. A pen, which
can move linearly, i.e. perpendicular to the direction of drum rotation, is mounted on a carriage. The drum
can rotate in either clockwise or anti-clockwise direction under the control of the plotting instructions sent by
the computer. The pen can move left to right or right to left. The pen can also move up or down. The graph-
plotting program controls the movement of the pen and drum. The program can thus draw various graphs an
also annotate them by using the pen to draw characters.



Flat-Bed Potters
A flat bed plotter has a stationary horizontal plotting surface on which paper is fixed. The pen is mounted on
a carriage which can move in either X or Y direction. The pen can also be moved up or down. A graph plotting
computer program is used to move the pen to trace the desired graph.

keyboard and mouse which need small amount of power get power from USB cable. The devices, which
requires larger amount of power for example a big loud speaker, must have a local power supply. And other
two wires are used to send data and commands. It can operate in two modes: low-speed and medium-speed
mode. In low-speed mode data transfer rate is 1.5 Mbps. At medium-speed mode data transfer rate is 12
Mbps.




4.6.4 Peripherals
The input/output (I/O) devices and secondary storage units of a computer are called peripherals. The term
peripheral is used in a wider sense; it also includes interfacing devices such as I/O port, floppy disk controller,
hard disk controller, communication interface, DMA controller, keyboard interface etc.




                                                        85
     Basic Computer                                                                            B.pharm PU




                                                 Software
Software is the collection of programs, codes or instructions for the hardware to perform some specific
works. For example: MS word, C, C++, Java, FoxPro etc.



    Types of software

    There is thousand of software written for computers which are used for different applications. This
    software can be divided into two basic types:

         I. System software
        II. Application software


    I. System Software

    The programs that direct the internal operations of a computer system such as controlling input and
    output devices or managing storage area within computer, are called System Software.

     This software is normally supplied by the computer manufacturers with the computers. This manages
    the resources of a computer system. This software is usually designed for one type of computer and
    cannot be used in other computers without modifications. These programs are written by computer
    professionals called System Programmers. The system software consists of operating system, assembler,
    compiler, interpreter, debugging programs, text editors etc.



  II. Application Software

   The program that directs a computer to solve a user-oriented problems, such as              preparing bills,
calculating efficiency of engine, preparing mark-sheet, etc are called Application Software.




                                                      86
        Basic Computer                                                                            B.pharm PU


Application software is specially prepared to do specific tasks for the user. They are prepared and supplied by
software companies and computer manufactures. This software is available for applications that are common
to many users and organizations.



A further classification of application software is:

         Tailored Software
         Packaged Software


Tailored Software: Tailored softwares are specially designed and developed to solve a specific job or task. As
a tailor measures the dimensions of a person for sewing his clothes, a tailor software is made on the basis of
the specific requirements, for example – for processing and printing of SLC result; billing school fees; running
school accounts, etc. For different purposes different programs are to be written. High level languages such
as C, C++, Java, and Visual basic are used to prepare tailored softwares.



Packaged Software: Packaged software are those software which are generalized set of programs, designed
and developed for general purposes. Usually packaged software suits to most of the user’s organizations. The
following types of packages are widely used nowadays:

         Word Processing Package (e.g. MS WORD, Word Perfect etc.)
         Spreadsheet Package (e.g. MS EXCEL, Lotus 1-2-3 etc.)
         Database Package (e.g. MS ACCESS, Oracle etc.)
         Graphic and Animation Package (Photoshop, MS Paint, 3D Studio Max etc.)
         Engineering design package (Auto CAD/CAM, 3D Home etc.)


Advantages of Packages

    a.    Using these packages, we can save time, expense and effort of programming.
    b.    They are reliable i.e. the programs are well tried and tested. Thus are good quality and error free.
    c.    The packages are relatively fast in work and easy to access.
    d.    They are user friendly.


Disadvantages of Packages



    a. It is designed to meet the needs of number of different users. So it may not be exactly suitable for
       one’s need.
    b. The user of the package will be help less, if the package or anything in the package goes wrong.
    c. Since there is a possibility of coming up of new versions of a package every time, it is difficult to keep
       track and bear the expense of buying new version.



                                                        87
     Basic Computer                                                                        B.pharm PU




                                    Computer Networks
1. Introduction


Network consists of two or more computers connected to each other by a media so that they can share data.
All network no matter how sophisticated, steams from that simple system. A group of computers and other
devices connected together is called a network and the concept of connected computers sharing resources is
called networking.


                      Sender               Medium                   Receiver

                               Fig: Basic elements of a communication system
                                                    88
     Basic Computer                                                                         B.pharm PU




Advantages of Networking
   a) Sharing of resources: If the computers are connected in a networking, it is possible to share resource
      like files, data or hardware. For example same file can be shared among multiple users and whole
      network members can use one printer.
   b) Centralized Control: Network provides the centralized control. The entire computer in the network is
      connected to a server, which define the policy and security measure for the resources used by the
      network members.
   c) Faster and Cheaper Communication: Since the entire computers are connected, message can be
      send from one computer to another within a second.
   d) Backup and Recovery: Data are securely handled by the server and provide the mechanism for the
      backup.
Disadvantages of Networking
   a) Expensive: For connecting computers, some extra devices and resources like NIC, Hubs, cables etc
      are required, which increases the cost of operation.
   b) Security of data: Data are shared in a public medium so extra precaution is needed for the secure
      transmission and storage.
   c) Needs special technical knowledge: To operate a networking system special skilled manpower is
      required.




2. Types of Networks

LAN
Local area network is a small group of computers running in small geographical area, usually a building or
even a department. The technology limited the size of the network, including the number of computers
connected as well as the physical distance that could be covered by the network. Security and resources are
centrally managed.

MAN
Networks, which are bigger than LANs are known as Metropolitan Area Network. MAN covers a wide
geographical area than LAN. Network between two buildings in different locations within a medium sized city
can be referred as a MAN.

WAN
Local area networks works well but have physical and distance limitation. Because they are not adequate for
all business communication, there must be connectivity between LANs and other type of environment. A
network can support data communication over a state, a country or even a globe. When a network does this
it is called a Wide Area Network. WAN is expanded over a very big geographical area.




                                                    89
        Basic Computer                                                                         B.pharm PU




                                               Exercise – 5


Self-test



         The four main components of a computer are: Input Unit, __________.__________ and________.
         The purpose of CPU is to _____________ the programs stored in the _____________ memory.
         The sub units of CPU are: ALU, _____________ and___________.
         Calculations are made in computer with the help of its_______ (Memory/ALU/CU)


Long Answer Questions:



              1. Draw a block diagram of basic organization of computer architecture. Explain the function of
                 various unit with relation each other.
              2. Explain the basic organization structure of magnetic disk? Explain the similarity and
                 differences between hard disk and optical disk (CD).
              3. What are the different types of memory? Discuss their merits, demerits and area of
                 applications.
              4. What do you understand by Networking? Write down its advantages and disadvantages.
                 Explain the types of Networking.


Short Answer Question:



    1. What is memory? Differentiate between main and auxiliary storage.
    2. Define the term ‘computer peripherals’. Discuss about different types of printers with their merit and
        demerits.
    3. Elaborate the use of backing device ‘Magnetic Tape’.
    4. What is softcopy and hardcopy output?
    5. Differentiate between impact and non-impact printer.
    6. What is cache memory? Why is it useful in computer system?
    7. Distinguish between the terms ‘hardware’, ‘software’ and ‘firmware’.
    8. What do you mean by ‘Volatility’? Explain RAM and ROM with concept and term.
    9. What is Read Only Memory (ROM)? List and briefly explain different kinds of ROM.
    10. What do you mean by Main Storage or Memory? Write down its feature and usage.


                                                      90
     Basic Computer                                                                         B.pharm PU


   11. Distinguish between system software and application software and give further sub-classifications of
       each.
   12. What is microprocessor? Is CPU and a microprocessor same? If not, then why?
   13. What is a CPU? What are three sub units of CPU? Explain the functions of each unit?
   14. List out three input and three output devices?
   15. What role does the input unit play in a computer?


   16. Differentiate between:
           a) DRAM and SRAM
           b) RAM and ROM
           c) Optical and magnetic storage


   17. Explain the following:
           a) Keyboard
           b) Mouse
           c) Scanner
           d) VDU




                                              UNIT - 10

 INTERNET
      The Internet is a computer network made up of thousands of networks worldwide. No one
knows exactly how many computers are connected to the Internet. It is certain, however, that these
number in the millions and are increasing at a rapid rate.

No one is in charge of the Internet. There are organizations which develop technical aspects of this
network and set standards for creating applications on it, but no governing body is in control. The
Internet backbone, through which Internet traffic flows, is owned by private companies.

         All computers on the Internet communicate with one another using the Transmission Control
Protocol/Internet Protocol suite, abbreviated to TCP/IP. Computers on the Internet use client/server
architecture. This means that the remote server machine provides files and services to the user's
local client machine. Software can be installed on a client computer to take advantage of the latest
access technology.

An Internet user has access to a wide variety of services: electronic mail, file transfer, vast
information resources, interest group membership, interactive collaboration, multimedia displays,
real-time broadcasting, shopping opportunities, breaking news, and much more.

       The Internet consists primarily of a variety of access protocols. Many of these protocols
feature programs that allow users to search for and retrieve material made available by the
protocol.

                                                    91
     Basic Computer                                                                  B.pharm PU



HOW THE INTERNET WORKS
The Internet works in the following way: Suppose, for example, that you request data from a server
in another state:

        1) Your request must be broken into packets.
        2) The packets are routed through your local network, and possibly through one or more
            subsequent networks, to the Internet backbone.
        3) After leaving the backbone, the packets are then routed through one more networks
            until they reach the appropriate server and are reassembled into the complete request.
        4) Once the destination server receives your request, it begins sending you the requested
            data, which winds its way back to you- possibly over a different route.
Between the destination server and your PC, the request and data may travel through several
different servers, each helping to forward the packets to their final destination.




The Internet: Key Technology Concepts
IP Addresses: Internet addresses, known as IP addresses, are 32-bit numbers that appear as a series
of four separate numbers marked off by periods, such as 192.168.0.100. Each of the four numbers can
range from 0-255. This “dotted quad”-addressing addressing scheme contains up to 232 = 4 billion
addresses.

Domain Names: Most people cannot remember 32-bit numbers. IP addresses can be represented by a
natural language convention called domain names. The domain name system (DNS) allows
expressions such as pu.edu to stand for numeric IP address.

URLs: Uniform resource locators (URLs), which are the addresses used by Web browsers to identify
the location of content on the Web, also use domain names as part of the URL. A typical URL
contains the protocol to be used when accessing the address, followed by its location.

For instance, the URL http://www.megacorp.com/content/features/082602.html
            http  the protocol used to display Web pages
            www.megacorp.com  domain name
            content/features the directory path that identifies where on the domain Web server
                the page is stored
            082602.html document name and its format (an html page)

The most common domain extensions currently available and officially sanctioned by The Internet
Corporation for Assigned Names and Numbers (ICANN) are shown in the list below.
                       Domains                 Type of organization

                      .com        Business (commercial)

                      .edu        Educational institutions

                                                 92
     Basic Computer                                                                     B.pharm PU


                       .gov         Government

                       .mil         Military

                       .net         Netwrok computers

                       .org         Other organization(typically nonprofit)


FEATURES OF INTERNET


WORLD WIDE WEB



The World Wide Web (abbreviated as the Web or WWW) is the most popular and promising method
of accessing the Internet. The main reason for its popularity is the use of a concept called hypertext.
Hypertext enables authors to structure information in novel ways. An effectively designed hypertext
document can help user rapidly locate the desired type of information from the vast amount of
information on the Internet. Hypertext documents enable this by using a series of links. In the
context of the Web, words or graphics may serve as links to other documents, images, video, and
sound. Links may or may not follow a logical path, as the creator of the source document programs
each connection. Overall, the WWW contains a complex virtual web of connections among a vast
number of documents, graphics, videos, and sounds.

Hypertext documents on the Internet are known as Web Pages. Using a special language called
Hyper Text Markup Language, or HTML creates Web Pages.

The WWW uses the client-server model, and an Internet Protocol called HTTP for interaction
between the computers on the Internet. Any computer on the Internet, which uses the HTTP
protocol, is called a Web Server, and any compute, which can access that server, is called a Web
Client The use of the client-server model and the HTTP allows different kind of computers on the
Internet to interact with each other. For example a UNIX system may be the web server and a
Windows PC may be the web client, if both of them use the HTTP protocol for transmission and
receiving information



E-Mail: Electronic mail, or e-mail, allows computer users locally and worldwide to exchange
messages. Each user of e-mail has a mailbox address to which messages are sent. Messages sent
through e-mail can arrive within a matter of seconds.

A powerful aspect of e-mail is the option to send electronic files to a person's e-mail address. Non-
ASCII files, known as binary files, may be attached to e-mail messages. These files are referred to as
MIME attachments. MIME stands for Multimedia The Internet Mail Extension, and was developed to
                                                   93
     Basic Computer                                                                   B.pharm PU


help e-mail software handle a variety of file types. For example, a document created in Microsoft
Word can be attached to an e-mail message and retrieved by the recipient with the appropriate e-
mail program. Examples of e-mail program are Eudora, Microsoft Outlook Express e.t.c.

       Advantages:

        1. It is faster than paper mail
        2. Unlike the telephone, the persons communicating need not be available at the same
           time.
        3. Unlike fax, email documents can be stored in a computer and can be easily edited using
           editing programs.
 Usenet News: Usenet News is a global electronic bulletin board system in which millions of
computer users exchange information on a vast range of topics. Usenet messages are stored on
central computers and users must connect to these computers to read or download the messages
posted to these groups.

Search Engines: Search engines can be Web site themselves, such as Google and AltaVista, or a
service within a site that allows users to ask for information about various topics. A search engine
identifies Web pages that appear to match keywords, also called queries, typed by the user and
provides a list of the best matches.

 Chat & Instant Messaging: Chat programs allow users on the Internet to communicate with each
other by typing in real time. They are sometimes included as a feature of a Web site, where users can
log into the "chat rooms" to exchange comments and information about the topics addressed on the
site. For example, MSN messenger, Google talks etc.
Music, Video and Other Standard Files: Internet has made possible for audio and video files for
sending and receiving in better-than-broadcast quality.

 Streaming Media: Streaming media enables music, video and other large files to be sent to users in
chunks so that when received and played, the file comes through uninterrupted. Streamed files
must be viewed “live”: They cannot be stored on client hard drives. RealAudio and RealVideo are the
most widely used streaming tools.

 Internet Telephony: IP telephony is a general term for the technologies that use the Voice Over
Internet Protocol (VOIP) and the Internet’s packet-switched network to transmit voice, fax and other
forms of audio communication over the Internet. The major advantage, of course, is the cost. It is
free. VOIP avoids the long distance charge imposed by phone companies.

The problem with VOIP has been that breaking calls into packets in order to transmit them via the
Internet often result in poor voice quality


Limitation of the Internet
   1. Bandwidth limitations: today’s Internet is slow and incapable of effectively sharing and
      displaying large files, such as video and voice files.

                                                 94
     Basic Computer                                                                        B.pharm PU


   2. Quality of service limitations: Data packets don’t all arrive in the correct order, at the same
      moment, causing latency; latency creates jerkiness in video files and voice messages.
   3. Network architecture limitations: Servers can’t keep up with demand.
   4. Language development limitations: The nature of HTML restricts the quality of “rich”
      information that can be shared online.

                         UNIT – 11 (Programming Concepts)



11.1 Characteristics of a good program
To be a good program, the program should have following characteristics:

   1. Integrity: This refers to the accuracy of the calculations. It should be clear that all other program
      enhancements would be meaningless if the calculations were not carried out correctly.
   2. Clarity: If a program is clearly written, it should be possible for another programmer to flow the
      program logic without undue effort.
   3. Simplicity: Keeping things as simple as possible usually enhance the clarity & accuracy of a program,
      consistent with the overall program objectives.
   4. Efficiency: This is concerned with the execution speed & memory utilization. The program execution
      speed should be fast & the program should not use unnecessary memory.
   5. Modularity: Many programs can be broken down into a series of understandable subtasks. It is a
      good programming practice to implement each of these subtasks as a separate program module
   6. Maintainability: The program will be easy to change or modify when the need arises.
   7. Portability: The program will be transferable to a different computer with minimum of modification.
      A program written in high-level language is more portable than an assembly language.
   8. Security: A program must be secure enough so as to avoid tampering from unauthorized people.
      Loopholes in the program must be avoided as much as possible.



11.2 Computer Languages
A language that is acceptable to a computer system is called a computer language or programming
language. And the process of writing instructions in such a language for an already planned program
is called programming or coding. All computer languages can be broadly classified into the following
categories:
     Machine Language (1st Generation)
     Assembly Language (2nd Generation)
     High-Level Language
            o Procedural-oriented Language (3rd Generation)
            o Problem-oriented Language (4th Generation)
            o Natural Language (5th Generation)


11.2.1 Machine Language
It is a language computer can understand. It is composed of 0’s and 1’s. The machine language of a
computer is normally written as strings of binary 1s and 0s. A machine language instruction normally
has a two-part format
                                                    95
       Basic Computer                                                                    B.pharm PU


     Operation code, which tells the computer what function to perform and
     Oprand, which tells the computer where to find or store the data or other instruction, which
      are to be manipulated
Example: To write an instruction ADD 2 and 3 then we may have to write 01100001(i.e. ADD)
00000010(i.e. 2) and 00000011(i.e. 3)              OPCODE                 OPERAND

                                                   (Operation Code)       (Address/Location)

Advantages and Limitation of Machine Language
Program written in machine language can be executed very fast by the computer because no
translation is required. But difficult to write, even if one bit change whole meaning may change. Lots
of inputs required even for doing very small program. Because the internal design of every type of
computer is different from every other type of computer, the machine language also differs from
computer to computer. in short, writing a program in machine language is so difficult and time
consuming that it is rarely used today.


11.2.2 Assembly Language
Use alphanumeric mnemonic codes, instead of numeric codes for the instruction in the instruction set.
For example, using ADD instead of 1110(binary) or 14(decimal). Since CPU doesn’t understand the
assembly language, it needs conversion, which is done by Assembler.

Assembler: The assembler is software, which translates an assembly
language program into an equivalent machine language.
But assembly languages have advantage over machine language, they are easier to understand and
use. But are machine dependent.

   Assembly language                                                  Machine language
       program                 Assembler                                 program


High-Level Language
Both machine and assembly languages are often referred to as low-level programming languages.
High-level languages were designed to overcome their limitation such as machine dependent and
machine level coding. They are similar to written English. Using high-level language any one without
computer science and engineering background can be programmer.


11.2.3 Procedural-Oriented Languages
General-purpose programming languages are called procedural languages or third generation
language. They are languages such as Pascal, BASIC, COBOL and FORTAN, which are designed to
express the logic, the procedure, of a problem. Because of their flexibility, procedural languages are
able to solve a variety of problems.
Procedural languages have many advantages over machine and assembly languages:
     The program statements resemble English and hence are easier to work with.

                                                 96
     Basic Computer                                                                      B.pharm PU


     Because of there English-like nature, less time is require to program a problem.
     Once coded, programs are easier to understand and to modify.
     The programming languages are machine-independent.
However, procedure-oriented languages still have some disadvantages compared to machine and
assembly languages:
     Programs execute more slowly.
     The languages use computer resource less efficiently.


11.2.4 Problem-Oriented Language
This is also known as 4GL. This is one step ahead from 3GL. These are result oriented and included
database query language. There are fewer options for programmers, but the programs are mush easier
to write than in lower level languages. 4GL programs are also needed to be translated either by
compiler or interpreter. In fact, 4GL cannot be used for all-purpose. They are dedicated for some
particular application developments. Example of 4GL is SQL (structured Query language).

       Third Generation Languages                Fourth Generation Languages
Intended for use by professional May be used by a non-programming end
programmers.                               user as well as a professional
Requires specification of how to perform System determines how to perform the
tasks.                                     task.
Require large number of procedural Require far fewer instructions.
instruction
Code may be difficult to read, understand Code is easy to understand and maintain
and maintain.                              because of English-like commands.
Can be difficult to learn                  Easy to learn
                            Table: Difference between 3GL and 4GL

Compiler
Since computer can directly execute only machine language programs, a high-level language program
must be converted into its equivalent machine language program before it can be executed on the
computer. This is done with the help of translator program, which is known as a compiler. A compiler
is a translator program, which translates a high-level languages program into its equivalent machine
language program. Compiler is language dependent. FORTAN compiler can’t compile COBOL
program. In additional to translating, compiler also automatically detects and indicates certain type of
errors in source programs.

Interpreter
An interpreter is another type of translator, which is used for translating programs written in high-
level languages. The working principle is different from that of compiler in the sense that interpreter
reads each line at a time and execute. As compared to compiler, error is detected and brought to the
attention as soon as the program is interpreted. The main disadvantage of the interpreter is that they
are slower than compiler.




                                                  97
       Basic Computer                                                                      B.pharm PU



Advantages of High-level language
   1. Machine independence: A program written in a high-level language can be executed on
      many different types of the computers.
   2. Easier to learn and use: High-level languages are easier to learn, because they are similar to
      the natural language used by us in our day-to-day life.
   3. Fewer errors: While programming in a high-level language, a programmer need not worry
      about how and where to store the instructions and data of the program, and need not write
      machine-level instructions for the steps carried out by the computer.
   4. Better documentation: The statements of program written in a high-level language are very
      similar to the natural language statement use d by us in our day-to-day life. Hence a
      programmer familiar with the problem domain can easily understand them. As a result, very
      few, or practically no separate comment is required in program written in high-level language.
   5. Easier to maintain: Programs written in high-level language are easier to maintain, they are
      easier to understand, and hence , it is easier to locate, correct and modify instructions as and
      when desired.

Disadvantages of High-level language
   1. More time to execute
   2. No direct mechanism to control computer hardware.

11.2.5 Natural Language
Also known as 5th generation language. It is still in development and most probably is the language of 5th
generation computer. In such a language we would write statements that look like normal sentence. Natural
languages have two characteristics:

        They are designed to make the connections that humans have with computer more natural – more
         humanlike.
        They are designed to allow the computer to become “smarter” – to actually simulate the learning
         process by remembering and improving upon earlier information.



11.3 Programming Tools
11.3.1 Algorithm
Algorithm is a step-by-step description of how to solve a particular problem.
The desirable features of an algorithm are:
   1. Each step of the algorithm should be simple.
   2. It should be unambiguous in the sense that the logic should be clear.
   3. It should be effective.
   4. It must end in finite number of steps.
   5. It should be an efficient as possible.
   6. One or more instructions should not be repeated infinitely.
   7. Desirable result must be obtained on the algorithm termination

Example: Algorithm to multiply two numbers a, b.
                                                   98
       Basic Computer                                                                 B.pharm PU


   Step      1:    Start
   Step      2:    Input numbers a & b
   Step      3:    Multiply a & b & store on c, i.e. c = a*b
   Step      4:    Display the value of c
   Step 5: Stop




11.3.2 Flowchart


A flow chart is a pictorial representation that uses symbol to show the operations & decision to be
followed by a computer in solving a problem.
Flowchart is also a very effective & inexpensive analytical tool. With the help of a flowchart,
programmer can quickly show a series of alternative approaches to a program.

Symbols used in flow chart:
The various flowchart symbols suggested by ANSI are as follows:

  TERMINAL
                            PROCESSING                      INPUT/OUTPUT


         DECISION                                                  FLOW

                                         CONNECTOR

        Terminal Symbol: It is used to indicate a point at which the flowchart begins or ends. The
         words START & STOP are written within the terminal symbol.
        Processing Symbol: This symbol represents some operations on data.
        I/O symbol: It is used to represent the logical positioning of input/output operation.
        Decision symbol: This symbol represents a logical operation showing a decision point in a
         program. The two main components of a decision symbol are:
             o A question that defines the logical operation.
             o The result of the decision (yes, no)
        Connector symbol: It is used to indicate a junction at whom the flowchart comes from a part
         of the flowchart on another page.
        Flow symbol: A flow symbol is an arrow that shows the flow of program logic in a flowchart.

Advantages
   1. A flowchart is a pictorial representation of a program. Hence it is easier for a programmer to
      explain the logic of a program through flowchart.
   2. Easy to convert flowchart to programming language
   3. Easy to detect, locate and remove bugs in a program
Limitation
   1. Very time consuming and laborious job
   2. Redrawing a flowchart is a tedious task
                                                 99
     Basic Computer                                          B.pharm PU


   3. How much to include in flowchart is unclear.



Example: Flowchart to calculate the product of two numbers


                                 START




                               READ a and b




                                 c=a*b




                             PRINT c




                                 STOP




                                              100
     Basic Computer                                                                         B.pharm PU



11.4 Basic Logic Structures
Any program logic, no matter how complex, could be expressed by using only the following three simple
control structures:

           a. Sequence Logic
           b. Selection Logic and
           c. Iteration (or Looping) Logic

11.4.1 Sequence Logic
Sequence logic is used for performing instruction one after another in sequence. The logic flow is
from top to bottom



                                                         Statement 1
                       Statement1
                                                         Statement 2

                       Statement2                        …………..

                                                         …………..

                                                         …………..

                       Statement3                        Statement n

                                                         …………….
    Fig: Sequential statement
                                                         Fig: Pseudocode




11.4.2 Selection Logic
Selection is a special kind of branching, in which one group of statements is selected from several
available groups, i.e., it allows alternative actions to be taken according to the conditions that exist at
particular stages in program executions. Conditions are normally in the form of expressions that when
evaluated give Boolean results (true or false). Selection logic is depicted as
    a. IF … THEN
    b. IF … THEN … ELSE
    c. Nested IF

               T                        F                         IF (CONDITION)
                       IF condition
                                                                  THEN

     Statement1                                                           Statement1
                                                   101
                                                                  ENDIF
Basic Computer                                                                            B.pharm PU




              Fig: Flowchart and Pseudocode for IF … THEN selection structure

                                                                  IF (CONDITION)

          T          IF condition      F                          THEN
                                                                          Statement1

                                                                  ELSE
Statement1                                 Statement2
                                                                          Statement2

                                                                  ENDIF




                 Fig: Flowchart and Pseudocode for IF … THEN … ELSE selection structure




                       IF                     Yes
                                                          Statement 1
                    Condition1

                            No


                       IF
                                                          Statement 2
                    Condition2                Yes


                            No




                                                          Statement n
                       IF                    Yes

                    Condition n
                     No
                                                    102
Basic Computer                                                       B.pharm PU




                                               IF (CONDITION) THEN

                                                       Statement 1

                                               ELSE IF (CONDITION)

                                                       Statement 2

                                               ELSE
                                                       Statement 3

                                               ENDIF


                 Fig: Flowchart and Pseudocode for Nested IF




                                    103
     Basic Computer                                                                          B.pharm PU



11.4.3 Iteration Logic
Many programs require that a group of instructions to be executed repeatedly, until some logical conditions
has been satisfied i.e., the same sequence of statements needs to be performed again and again for a
number of times. The repeated performance of the same statements is called looping.

There are number of statements used to carry out looping operations such as

   a. WHILE loop
   b. DO WHILE


        Initialization
                                                                               Statement 1



           Logical       F

         Expression
                                                                               Statement n
             T


         Statements                                                            Condition

                                                                                   ?


          Increment

         Decrement




                                                                    DO
 Initialization
                                                                              Statement 1
 WHILE (EXPRESSION)
                                                   104                        Statement 2
          Statement1
                                                                              ……………
          Statement2
Basic Computer                                                                         B.pharm PU




            Fig: Flowchart and Pseudocode for WHILE and DO WHILE selection structure




                                           The End




                                              105

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:286
posted:5/8/2011
language:English
pages:105