Sei sulla pagina 1di 57

Module 1

Computer Fundamentals
A computer is a high speed electronic data processing machine. It accepts data as input,
process the data and generates output.
The basic components of a modern digital computers are:
 Input device
 Output device
 Central Processing Unit (CPU)
 Mass storage device and memory
Functionalities of a Computer
1. Takes raw data as input
2. Stores the data and instructions in its memory and uses them as required
3. Processes the data and converts it into useful information
4. Generates the output
5. Controls all the above four steps
Advantages of Computers
 SPEED: In general, no human being can compete to solving the complex
computation, faster than computer.
 ACCURACY: Since Computer is programmed, so whatever input we give it gives
result with accurately.
 STORAGE: Computer can store mass storage of data with appropriate format.
 DILIGENCE: Computer can work for hours without any break and creating error.
 VERSATILITY: We can use computer to perform completely different type of work
at the same time.
 RELIABILITY: A Computer is a reliable machine. Modern electronic computers
have long lives and their maintenance is quite easy
 REDUCTION IN PAPER WORKS AND COST:The use of computers for data
processing in an organization leads to reduction in paper work and results in speeding
up the process.
Disadvantages of Computers
 NO IQ: Computer does not work without instruction.
 DEPENDENCY: It can function only as per the user’s instruction, thus it is fully
dependent on humans.
 ENVIRONMENT:The operating environment of the computer should be dust free
and suitable.

1
 NO FEELING: Computer does not have emotions, knowledge, experience, and
feeling.
Every computer is composed of two basic components: hardware and software.
Hardware includes the Physical features, which are every part that you can either see or
touch, for example: monitor, case, keyboard, mouse, and printer.
The part which activates the physical components are called software. It includes the features
that responsible for directing the work to the hardware. Software can be divided into the
programs and data.
COMPUTER GENERATIONS
First Generation: Vacuum Tubes (1940-1956)
The first computer systems used vacuum tubes for circuitry and magnetic drums for memory,
and were often enormous, taking up entire rooms. These computers were very expensive to
operate and in addition to using a great deal of electricity, the first computers generated a lot
of heat, which was often the cause of malfunctions.
First generation computers relied on machine language, the lowest-level programming
language understood by computers, to perform operations, and they could only solve one
problem at a time. It would take operators days or even weeks to set-up a new problem. Input
was based on punched cards and paper tape, and output was displayed on printouts.
The UNIVAC and ENIAC computers are examples of first-generation computing devices.
The UNIVAC was the first commercial computer delivered to a business client, the U.S.
Census Bureau in 1951.

Second Generation: Transistors (1940-1956)


The transistor was invented at Bell Labs in 1947 but did not see widespread use in computers
until the late 1950s.
The transistor was far superior to the vacuum tube, allowing computers to become smaller,
faster, cheaper, more energy-efficient and more reliable than their first-generation
predecessors. Though the transistor still generated a great deal of heat that subjected the

2
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.
Third Generation: Integrated Circuits (1964-1971)
The development of the integrated circuit was the hallmark of the third generation of
computers. Transistors were miniaturized and placed on silicon chips, called semiconductors,
which drastically increased the speed and efficiency of computers.
Instead of punched cards and printouts, users interacted with third generation computers
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.
Fourth Generation: Microprocessors (1971-Present)
The microprocessor brought the fourth generation of computers, as thousands of integrated
circuits were built onto a single silicon chip. What in the first generation filled an entire room
could now fit in the palm of the hand. The Intel 4004 chip, developed in 1971, located all the
components of the computer—from the central processing unit and memory to input/output
controls—on a single chip.
In 1981 IBM introduced its first computer for the home user, and in 1984 Apple introduced
the Macintosh. Microprocessors also moved out of the realm of desktop computers and into
many areas of life as more and more everyday products began to use microprocessors.
As these small computers became more powerful, they could be linked together to form
networks, which eventually led to the development of the Internet. Fourth generation
computers also saw the development of GUIs, the mouse and handheld devices.
Fifth Generation: Artificial Intelligence (Present and Beyond)
Fifth generation computing devices, based on artificial intelligence, are still in development,
though there are some applications, such as voice recognition, that are being used today. The
use of parallel processing and superconductors is helping to make artificial intelligence a
reality.
Quantum computation and molecular and nanotechnology will radically change the face of
computers in years to come. The goal of fifth-generation computing is to develop devices that
respond to natural language input and are capable of learning and self-organization.
CLASSIFICATION OF COMPUTERS
Super Computer
The fastest and most powerful type of computer Supercomputers are very expensive and are
employed for specialized applications that require immense amounts of mathematical
calculations. For example, weather forecasting requires a supercomputer. Other uses of
supercomputers include animated graphics, fluid dynamic calculations, nuclear energy
research, and petroleum exploration.

3
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.
Mainframe Computer
A very large and expensive computer capable of supporting hundreds, or even thousands, of
users simultaneously. In the hierarchy that starts with a simple microprocessor (in watches,
for example) at the bottom and moves to supercomputers at the top, mainframes are just
below supercomputers. 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.
Mini Computer
A midsized computer. In size and power, minicomputers lie
between workstations and mainframes. 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 4 to about 200 users simultaneously.
Micro Computer or Personal Computer
• Desktop Computer: a personal or micro-mini computer sufficient to fit on a desk.
• Laptop Computer: a portable computer complete with an integrated screen and keyboard.
It is generally smaller in size than a desktop computer and larger than a notebook computer.
• Palmtop Computer/Digital Diary /Notebook /PDAs: a hand-sized computer. Palmtops
have no keyboard but the screen serves both as an input and output device.
Workstations
A terminal or desktop computer in a network. In this context, workstation is just a generic
term for a user's machine (client machine) in contrast to a "server" or "mainframe."
COMPUTER LANGUAGE AND ITS TYPES
 Machine Level Language: This is low level programming language. Computer or any
electronic device only understand this language. i.e. Binary number i.e 0 and 1.
 Assembly Level Language: This is a low level programming language which is
converted into executable machine code by a utility programmer referred to as an
assembler.
 High Level Language: High level language is a programming language which is
easily understandable/readable by human.

4
 Program Translators: A computer can only understand programs defined using
machine code. Consequently, a program written in a high level language such as Java
cannot be run directly. To execute a computer program written in high or low level
language, it must be translated.
 Interpreter: This is a convertor which converts high level language programme to
low level language programme line by line.
 Compiler: This is also a convertor which converts whole high level language
programme to low level language programme at a time.
Features of a Good Language
1) Simplicity, Clarity, and Unity:
A conceptual framework for Algorithm planning is offered by the programming language and
it implies of expressing them. A simple, clear unified set of concepts are offered by it which
uses primitives in algorithms development.
It must have: This has less number of various concepts with rules for integration being simple
and regular. Conceptual integrity is caused by the attribute.
2) Orthogonality:
It is regarded as one of the famous features and it means Changing A does not change B. An
orthogonal system would be a radio for real-world example where changing the station does
not modify the volume and it is the same in reverse direction.
It is easy to learn the programs when the features are orthogonal as there are only a few
exceptions that are special and must be noted.
3) Support for Abstraction:
You can find a substantial gap that can be found present between the operations and abstract
data structure that characterize the solution to a specific data structure and operations
constructed into a language.
4) Programming Environment:
An extra utility is added by the appropriate programming environment and makes the
language for getting implemented in an easy way. Well documentation which is reliable
efficient and is quite available.
BASICS OF COMPUTER ORGANIZATION
Von-Neumann proposed his computer architecture design in 1945 which was later known as
Von-Neumann Architecture. It consisted of a Control Unit, Arithmetic, and Logical Memory
Unit (ALU), Registers and Inputs/Outputs.
Von Neumann architecture is based on the stored-program computer concept, where
instruction data and program data are stored in the same memory. This design is still used in
most computers produced today.

5
A Von Neumann-based computer:
o Uses a single processor
o Uses one memory for both instructions and data.
o Executes programs following the fetch-decode-execute cycle

Components of Von-Neumann Model:


o Central Processing Unit
o Buses
o Memory Unit
Central Processing Unit
The part of the Computer that performs the bulk of data processing operations is called the
Central Processing Unit and is referred to as the CPU.
The Central Processing Unit can also be defined as an electric circuit responsible for
executing the instructions of a computer program.
The CPU performs a variety of functions dictated by the type of instructions that are
incorporated in the computer.
The major components of CPU are Arithmetic and Logic Unit (ALU), Control Unit (CU) and
a variety of registers.

6
Arithmetic and Logic Unit (ALU)
The Arithmetic and Logic Unit (ALU) performs the required micro-operations for executing
the instructions. In simple words, ALU allows arithmetic (add, subtract, etc.) and logic
(AND, OR, NOT, etc.) operations to be carried out.
Control Unit
The Control Unit of a computer system controls the operations of components like ALU,
memory and input/output devices.
The Control Unit consists of a program counter that contains the address of the instructions to
be fetched and an instruction register into which instructions are fetched from memory for
execution.
Registers
Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are
fetched from the registers.
Following is the list of registers that plays a crucial role in data processing.

Buses
Buses are the means by which information is shared between the registers in a multiple-
register configuration system.
A bus structure consists of a set of common lines, one for each bit of a register, through
which binary information is transferred one at a time. Control signals determine which
register is selected by the bus during each particular register transfer.
Von-Neumann Architecture comprised of three major bus systems for data transfer.

7
Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to
transfer information in and out of the storage. The memory stores binary information in
groups of bits called words. The internal structure of a memory unit is specified by the
number of words it contains and the number of bits in each word.
Two major types of memories are used in computer systems:
1. RAM (Random Access Memory)
2. ROM (Read-Only Memory)
INPUT UNIT
This unit contains devices with the help of which we enter data into the computer.
Input Devices
Keyboard
Keyboard is the most common and very popular input device which helps to input data to the
computer. The layout of the keyboard is like that of traditional typewriter, although there are
some additional keys provided for performing additional functions.

Keyboards are of two sizes 84 keys or 101/102 keys, but now keyboards with 104 keys or
108 keys are also available for Windows and Internet.
Mouse
Mouse is the most popular pointing device. It is a very famous cursor-control device having a
small palm size box with a round ball at its base, which senses the movement of the mouse
and sends corresponding signals to the CPU when the mouse buttons are pressed.
Generally, it has two buttons called the left and the right button and a wheel is present
between the buttons. A mouse can be used to control the position of the cursor on the screen,
but it cannot be used to enter text into the computer.

8
Advantages
 Easy to use
 Not very expensive
 Moves the cursor faster than the arrow keys of the keyboard.
Joystick
Joystick is also a pointing device, which is used to move the cursor position on a monitor
screen. It is a stick having a spherical ball at its both lower and upper ends. The lower
spherical ball moves in a socket. The joystick can be moved in all four directions.

The function of the joystick is similar to that of a mouse. It is mainly used in Computer Aided
Designing (CAD) and playing computer games.
Light Pen
Light pen is a pointing device similar to a pen. It is used to select a displayed menu item or
draw pictures on the monitor screen. It consists of a photocell and an optical system placed in
a small tube.

9
When the tip of a light pen is moved over the monitor screen and the pen button is pressed, its
photocell sensing element detects the screen location and sends the corresponding signal to
the CPU.
Track Ball
Track ball is an input device that is mostly used in notebook or laptop computer, instead of a
mouse. This is a ball which is half inserted and by moving fingers on the ball, the pointer can
be moved.

Since the whole device is not moved, a track ball requires less space than a mouse. A track
ball comes in various shapes like a ball, a button, or a square.
Scanner
Scanner is an input device, which works more like a photocopy machine. It is used when
some information is available on paper and it is to be transferred to the hard disk of the
computer for further manipulation.

10
Scanner captures images from the source which are then converted into a digital form that
can be stored on the disk. These images can be edited before they are printed.
Digitizer
Digitizer is an input device which converts analog information into digital form. Digitizer can
convert a signal from the television or camera into a series of numbers that could be stored in
a computer. They can be used by the computer to create a picture of whatever the camera had
been pointed at.

Digitizer is also known as Tablet or Graphics Tablet as it converts graphics and pictorial data
into binary inputs. A graphic tablet as digitizer is used for fine works of drawing and image
manipulation applications.
Microphone
Microphone is an input device to input sound that is then stored in a digital form.

The microphone is used for various applications such as adding sound to a multimedia
presentation or for mixing music.
Magnetic Ink Card Reader (MICR)
MICR input device is generally used in banks as there are large number of cheques to be
processed every day. The bank's code number and cheque number are printed on the cheques
with a special type of ink that contains particles of magnetic material that are machine
readable.

11
This reading process is called Magnetic Ink Character Recognition (MICR). The main
advantages of MICR is that it is fast and less error prone.
Optical Character Reader (OCR)
OCR is an input device used to read a printed text.

OCR scans the text optically, character by character, converts them into a machine readable
code, and stores the text on the system memory.
Bar Code Readers
Bar Code Reader is a device used for reading bar coded data (data in the form of light and
dark lines). Bar coded data is generally used in labelling goods, numbering the books, etc. It
may be a handheld scanner or may be embedded in a stationary scanner.

Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which is
then fed to the computer that the bar code reader is connected to.
Optical Mark Reader (OMR)
OMR is a special type of optical scanner used to recognize the type of mark made by pen or
pencil. It is used where one out of a few alternatives is to be selected and marked.

12
OUTPUT UNIT
The output unit consists of devices with the help of which we get information from the
computer.
Output Devices
Monitors
Monitors, commonly called as Visual Display Unit (VDU), are the main output device of a
computer. It forms images from tiny dots, called pixels that are arranged in a rectangular
form. The sharpness of the image depends upon the number of pixels.
There are two kinds of viewing screen used for monitors.
 Cathode-Ray Tube (CRT)
 Flat-Panel Display
Cathode-Ray Tube (CRT) Monitor
The CRT display is made up of small picture elements called pixels. The smaller the pixels,
the better the image clarity or resolution. It takes more than one illuminated pixel to form a
whole character, such as the letter ‘e’ in the word help.

A finite number of characters can be displayed on a screen at once. The screen can be divided
into a series of character boxes - fixed location on the screen where a standard character can
be placed. Most screens are capable of displaying 80 characters of data horizontally and 25
lines vertically.
There are some disadvantages of CRT −
 Large in Size
 High power consumption
Flat-Panel Display Monitor

13
The flat-panel display refers to a class of video devices that have reduced volume, weight and
power requirement in comparison to the CRT. You can hang them on walls or wear them on
your wrists. Current uses of flat-panel displays include calculators, video games, monitors,
laptop computer, and graphics display.

The flat-panel display is divided into two categories −


 Emissive Displays − Emissive displays are devices that convert electrical energy into
light. For example, plasma panel and LED (Light-Emitting Diodes).
 Non-Emissive Displays − Non-emissive displays use optical effects to convert
sunlight or light from some other source into graphics patterns. For example, LCD
(Liquid-Crystal Device).
Printers
Printer is an output device, which is used to print information on paper.
There are two types of printers −
 Impact Printers
 Non-Impact Printers
Impact Printers
Impact printers print the characters by striking them on the ribbon, which is then pressed on
the paper.
Characteristics of Impact Printers are the following −
 Very low consumable costs
 Very noisy
 Useful for bulk printing due to low cost
 There is physical contact with the paper to produce an image
These printers are of two types −

14
 Character printers
 Line printers
Character Printers
Character printers are the printers which print one character at a time.
These are further divided into two types:
 Dot Matrix Printer(DMP)
 Daisy Wheel
Dot Matrix Printer
In the market, one of the most popular printers is Dot Matrix Printer. These printers are
popular because of their ease of printing and economical price. Each character printed is in
the form of pattern of dots and head consists of a Matrix of Pins of size (5*7, 7*9, 9*7 or
9*9) which come out to form a character which is why it is called Dot Matrix Printer.

Advantages
 Inexpensive
 Widely Used
 Other language characters can be printed
Disadvantages
 Slow Speed
 Poor Quality
Daisy Wheel
Head is lying on a wheel and pins corresponding to characters are like petals of Daisy
(flower) which is why it is called Daisy Wheel Printer. These printers are generally used for
word-processing in offices that require a few letters to be sent here and there with very nice
quality.

15
Advantages
 More reliable than DMP
 Better quality
 Fonts of character can be easily changed
Disadvantages
 Slower than DMP
 Noisy
 More expensive than DMP
Line Printers
Line printers are the printers which print one line at a time.

These are of two types −


 Drum Printer
 Chain Printer

16
Drum Printer
This printer is like a drum in shape hence it is called drum printer. The surface of the drum is
divided into a number of tracks. Total tracks are equal to the size of the paper, i.e. for a paper
width of 132 characters, drum will have 132 tracks. A character set is embossed on the track.
Different character sets available in the market are 48 character set, 64 and 96 characters set.
One rotation of drum prints one line. Drum printers are fast in speed and can print 300 to
2000 lines per minute.
Advantages
 Very high speed
Disadvantages
 Very expensive
 Characters fonts cannot be changed
Chain Printer
In this printer, a chain of character sets is used, hence it is called Chain Printer. A standard
character set may have 48, 64, or 96 characters.
Advantages
 Character fonts can easily be changed.
 Different languages can be used with the same printer.
Disadvantages
 Noisy
Non-impact Printers
Non-impact printers print the characters without using the ribbon. These printers print a
complete page at a time, thus they are also called as Page Printers.
These printers are of two types −
 Laser Printers
 Inkjet Printers
Characteristics of Non-impact Printers
 Faster than impact printers
 They are not noisy
 High quality
 Supports many fonts and different character size

17
Laser Printers
These are non-impact page printers. They use laser lights to produce the dots needed to form
the characters to be printed on a page.

Advantages
 Very high speed
 Very high quality output
 Good graphics quality
 Supports many fonts and different character size
Disadvantages
 Expensive
 Cannot be used to produce multiple copies of a document in a single printing
Inkjet Printers
Inkjet printers are non-impact character printers based on a relatively new technology. They
print characters by spraying small drops of ink onto paper. Inkjet printers produce high
quality output with presentable features.

18
They make less noise because no hammering is done and these have many styles of printing
modes available. Color printing is also possible. Some models of Inkjet printers can produce
multiple copies of printing also.
Advantages
 High quality printing
 More reliable
Disadvantages
 Expensive as the cost per page is high
 Slow as compared to laser printer
MEMORY HIERARCHY

1. Internal register is for holding the temporary results and variables. Accessing data from
these registers is the fastest way of accessing memory.
2. Cache is used by the CPU for memory which is being accessed over and over again.
Instead of pulling it every time from the main memory, it is put in cache for fast access. It is
also a smaller memory, however, larger than internal register.
Cache is further classified to L1, L2 and L3:
a) L1 cache: It is accessed without any delay.
b) L2 cache: It takes more clock cycles to access than L1 cache.
c) L3 cache: It takes more clock cycles to access than L2 cache.
3) Main memory or RAM (Random Access Memory): It is a type of the computer memory
and is a hardware component. It can be increased provided the operating system can handle
it.

19
There are two main types of RAM:
1. DRAM (Dynamic Random Access Memory)
2. SRAM (Static Random Access Memory)

DRAM (Dynamic Random Access Memory) – The term dynamic indicates that the
memory must be constantly refreshed or it will lose its contents. DRAM is typically used for
the main memory in computing devices. If a PC or smartphone is advertised as having 4-GB
RAM or 16-GB RAM, those numbers refer to the DRAM, or main memory, in the device.
More specifically, most of the DRAM used in modern systems is synchronous DRAM, or
SDRAM. Manufacturers also sometimes use the acronym DDR (or DDR2, DDR3, DDR4,
etc.) to describe the type of SDRAM used by a PC or server. DDR stands for double data
rate, and it refers to how much data the memory can transfer in one clock cycle.
In general, the more RAM a device has, the faster it will perform.
SRAM (Static Random Access Memory) – While DRAM is typically used for main
memory, today SRAM is more often used for system cache. SRAM is said to be static
because it doesn't need to be refreshed, unlike dynamic RAM, which needs to be refreshed
thousands of times per second. As a result, SRAM is faster than DRAM. However, both types
of RAM are volatile, meaning that they lose their contents when the power is turned off.
ROM (Read Only Memory) - ROM stands for Read Only Memory. The memory from
which we can only read but cannot write on it. This type of memory is non-volatile. The
information is stored permanently in such memories during manufacture. A ROM stores such
instructions that are required to start a computer. This operation is referred to as bootstrap.
ROM chips are not only used in the computer but also in other electronic items like washing
machine and microwave oven.

20
Types of ROMs and their Characteristics.
MROM (Masked ROM)
The very first ROMs were hard-wired devices that contained a pre-programmed set of data or
instructions. These kind of ROMs are known as masked ROMs, which are inexpensive.
PROM (Programmable Read Only Memory)
PROM is read-only memory that can be modified only once by a user. The user buys a blank
PROM and enters the desired contents using a PROM program. Inside the PROM chip, there
are small fuses which are burnt open during programming. It can be programmed only once
and is not erasable.
EPROM (Erasable and Programmable Read Only Memory)
EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes.
Usually, an EPROM eraser achieves this function. During programming, an electrical charge
is trapped in an insulated gate region. The charge is retained for more than 10 years because
the charge has no leakage path. For erasing this charge, ultra-violet light is passed through a
quartz crystal window (lid). This exposure to ultra-violet light dissipates the charge. During
normal use, the quartz lid is sealed with a sticker.
EEPROM (Electrically Erasable and Programmable Read Only Memory)
EEPROM is programmed and erased electrically. It can be erased and reprogrammed about
ten thousand times. Both erasing and programming take about 4 to 10 ms (millisecond). In
EEPROM, any location can be selectively erased and programmed. EEPROMs can be erased
one byte at a time, rather than erasing the entire chip. Hence, the process of reprogramming is
flexible but slow.
Advantages of ROM
 Non-volatile in nature
 Cannot be accidentally changed
 Cheaper than RAMs
 Easy to test
 More reliable than RAMs
 Static and do not require refreshing
 Contents are always known and can be verified
SECONDARY MEMORY
You know that processor memory, also known as primary memory, is expensive as well as
limited. The faster primary memory are also volatile. If we need to store large amount of data
or programs permanently, we need a cheaper and permanent memory. Such memory is
called secondary memory. Here we will discuss secondary memory devices that can be used
to store large amount of data, audio, video and multimedia files.

21
Characteristics of Secondary Memory
These are some characteristics of secondary memory, which distinguish it from primary
memory −
 It is non-volatile, i.e. it retains data when power is switched off
 It is large capacities to the tune of terabytes
 It is cheaper as compared to primary memory

4) Hard disk: A hard disk is a hardware component in a computer. Data is kept permanently
in this memory. Memory from hard disk is not directly accessed by the CPU, hence it is
slower. As compared with RAM, hard disk is cheaper per bit.
TERTIARY STORAGE
Tertiary storage refers storage designed for the purpose of data backup. Examples of tertiary
storage devices are tape drives are robotic driven disk arrays. They are capable of petabyte
range storage, but have very slow access speed with data access latency in seconds or
minutes. Magnetic tape memories are usually used as tertiary storage devices.
5) Magnetic tape: Magnetic tape memory is usually used for backing up large data. When
the system needs to access a tape, it is first mounted to access the data. When the data is
accessed, it is then unmounted. The memory access time is slower in magnetic tape and it
usually takes few minutes to access a tape.
COMPUTER HARDWARE COMPONENTS
Some individual computer hardware components are the following:
1. SMPS
2. Motherboard
3. Add-on Cards
4. Hard Drive (HDD)
5. Solid State Drive (SSD)
6. Optical Drive (e.g., BD/DVD/CD drive)
7. Card Reader (SD/SDHC, CF, etc.)
SMPS
Switched-Mode Power Supply (SMPS) is an electronic circuit which converts the power
using switching devices that are turned on and off at high frequencies, and storage
components such as indicators or capacitors to supply power when the switching device is in
its non-conduction state. It can be abbreviated as SMPS.
MOTHERBOARD
A motherboard is one of the most essential parts of a computer system. It holds together
many of the crucial components of a computer, including the central processing unit (CPU),
memory and connectors for input and output devices. The base of a motherboard consists of a
very firm sheet of non-conductive material, typically some sort of rigid plastic. Thin layers of

22
copper or aluminium foil, referred to as traces, are printed onto this sheet. These traces are
very narrow and form the circuits between the various components. In addition to circuits, a
motherboard contains a number of sockets and slots to connect the other components.
ADD-ON CARD
An Add-on card is a PCB that fits into an expansion slot on a desktop computer. An
expansion card is used to give a computer additional capabilities, such as enhanced video
performance via a graphics card. Most Commonly used Add-on Cards are Network Card,
Sound Card, and Expansion Card and Display card.
Network Card
Short for network interface card, the NIC is also referred to as an Ethernet
card and network adapter. A NIC is a computer expansion card for connecting to
a network (e.g., home network or Internet) using an Ethernet cable with an RJ-
45 connector.Due to the popularity and low cost of the Ethernet standard, nearly all new
computers have a network interface build directly into the motherboard.
Sound Card
Alternatively referred to as an audio output device, sound board, or audio card. A sound
card is an expansion card or IC for producing sound on a computer that can be heard
through speakers or headphones. Although the computer does not need a sound device to
function, they are included on every machine in one form or another, either in an expansion
slot or built into the motherboard (onboard).

Display Card
Alternatively known as a display adapter, graphics card, video adapter, video board,
or video controller, a video card is an expansion card that connects to a computer
motherboard. It is used to create a picture on a display; without a video card, you would not
be able to see this page. More plainly, it's a piece of hardware inside your computer that
processes images and video, some of the tasks normally handled by the CPU. Video cards are
used by gamers in place of integrated graphics due to their extra processing power and video
ram.

23
Computer Ports
A port is a physical docking point using which an external device can be connected to the
computer. It can also be programmatic docking point through which information flows from a
program to the computer or over the Internet.
Characteristics of Ports
A port has the following characteristics −
 External devices are connected to a computer using cables and ports.
 Ports are slots on the motherboard into which a cable of external device is plugged in.
 Examples of external devices attached via ports are the mouse, keyboard, monitor,
microphone, speakers, etc.

Let us now discuss a few important types of ports −


Serial Port
 Used for external modems and older computer mouse
 Two versions: 9 pin, 25 pin model
 Data travels at 115 kilobits per second
Parallel Port
 Used for scanners and printers
 Also called printer port
 25 pin model
 IEEE 1284-compliant Centronics port

24
PS/2 Port
 Used for old computer keyboard and mouse
 Also called mouse port
 Most of the old computers provide two PS/2 port, each for the mouse and keyboard
 IEEE 1284-compliant Centronics port
Universal Serial Bus (or USB) Port
 It can connect all kinds of external USB devices such as external hard disk, printer,
scanner, mouse, keyboard, etc.
 It was introduced in 1997.
 Most of the computers provide two USB ports as minimum.
 Data travels at 12 megabits per seconds.
 USB compliant devices can get power from a USB port.
VGA Port
 Connects monitor to a computer's video card.
 It has 15 holes.
 Similar to the serial port connector. However, serial port connector has pins, VGA
port has holes.
Power Connector
 Three-pronged plug.
 Connects to the computer's power cable that plugs into a power bar or wall socket.
Firewire Port
 Transfers large amount of data at very fast speed.
 Connects camcorders and video equipment to the computer.
 Data travels at 400 to 800 megabits per seconds.
 Invented by Apple.
 It has three variants: 4-Pin FireWire 400 connector, 6-Pin FireWire 400 connector,
and 9-Pin FireWire 800 connector.
Modem Port
 Connects a PC's modem to the telephone network.
Ethernet Port

25
 Connects to a network and high speed Internet.
 Connects the network cable to a computer.
 This port resides on an Ethernet Card.
 Data travels at 10 megabits to 1000 megabits per seconds depending upon the
network bandwidth.
Game Port
 Connect a joystick to a PC
 Now replaced by USB
Digital Video Interface, DVI port
 Connects Flat panel LCD monitor to the computer's high-end video graphic cards.
 Very popular among video card manufacturers.
Sockets
 Sockets connect the microphone and speakers to the sound card of the computer.
Adapter
An adapter is a physical device that allows one hardware or electronic interface to be adapted
(accommodated without loss of function) to another hardware or electronic interface. In a
computer, an adapter is often built into a card that can be inserted into a slot on the
computer's motherboard. The card adapts information that is exchanged between the
computer's microprocessor and the devices that the card supports.
Network Cables
Network cable acts like a medium through which information travels from one network
device to the other. The type of cable selected for a network depends on the network’s size,
topology, and procedure. The various types of network cables act as the backbone of the
network infrastructure.
Selecting the correct type of network cabling can effect various business functions because
enterprise network admins employ new technologies. The type of network cable used in any
network infrastructure is one of the most vital aspect of networking in various industries.
Coaxial Cable
It has a single copper conductor in the middle. A plastic layer provides insulation between the
braided metal shield and center conductor. The metal shield blocks outer interference from
motors, fluorescent lights, and other computers.
Coaxial cabling is extremely resistant to signal obstruction though it is complex to install. It
can handle great cable lengths between network devices than the twisted pair cable. The two
types of coaxial cables are thin coaxial and thick coaxial.
Shielded Twisted Pair (STP) Cable

26
It is a special kind of copper telephone wiring used in business installations. An external
shield which functions as a ground is added to the normal twisted pair telephone wires.
Shielded twisted pair may be the answer if you want to place the cable in an area with
potential interference and risk to the electrical current in the UTP. Shielded cables can also
help in expanding the distance between the cables.
Unshielded Twisted Pair
It is the most admired type of network cable in the world. UTP cable is used for both
conventional telephone and computer networking.
Fiber Optic Cable
Fiber optic cabling consists of a center glass core surrounded by many layers of protective
materials. It removes the problem of electrical obstruction by transmitting light rather than
electronic signals. This makes them perfect for certain atmospheres which contain huge
amount of electrical interference. It has become the standard for connecting networks
between buildings because of its resistance to lighting and moisture.
USB Cables
There are a number of different types of USB connector that are used on different types of
equipment and in different situations. As USB has developed, new connectors have been
introduced, generally reducing the connector size.
Serial and Parallel Cables
A data channel that transfers digital data in a serial fashion: one bit after the other over one
wire or fiber. Serial interfaces may have multiple lines, but only one line is used for data. The
otherlines are used for control.
On earlier PCs, the serial port was a serial interface for attaching modems and data
acquisition terminals, and sometimes mice.
A series of metal wires that enable multiple bits of data to be transferred simultaneously.
Parallel cables have mostly given way to serial cables, where data is transferred one bit after
another.
Crossover Cables
A crossover cable is a type of cable installation that is used for the interconnection of two
similar devices. It is enabled by reversing the transmission and receiving pins at both ends, so
that output from one computer becomes input to the other, and vice versa.
Basic Computer Configuration
Configuration refer to either hardware or software, or the combination of both. For example,
a typical configuration for a PC consists of 8 GB main memory, a hard disk, a modem, a CD
ROM drive, a VGA monitor and an operating system.

27
MODULE 2
NUMBER SYSTEMS AND BOOLEAN ALGEBRA
Number Systems
When we type some letters or words, the computer translates them in numbers as computers
can understand only numbers. A computer can understand the positional number system
where there are only a few symbols called digits and these symbols represent different values
depending on the position they occupy in the number.
The value of each digit in a number can be determined using −
 The digit
 The position of the digit in the number
 The base of the number system (where the base is defined as the total number of digits
available in the number system)
Decimal Number System
The number system that we use in our day-to-day life is the decimal number system. Decimal
number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the
successive positions to the left of the decimal point represent units, tens, hundreds, thousands,
and so on.
Each position represents a specific power of the base (10). For example, the decimal number
1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds
position, and 1 in the thousands position. Its value can be written as

(1 x 1000)+ (2 x 100)+ (3 x 10)+ (4 x l) =


(1 x 103)+ (2 x 102)+ (3 x 101)+ (4 x l00) =
1000 + 200 + 30 + 4 =
1234
As a computer programmer or an IT professional, you should understand the following
number systems which are frequently used in computers.

28
Binary Number System
Characteristics of the binary number system are as follows −
 Uses two digits, 0 and 1
 Also called as base 2 number system
 Each position in a binary number represents a 0 power of the base (2). Example 20
 Last position in a binary number represents a x power of the base (2). Example
2x where x represents the last position - 1.
Example
Binary Number: 101012
Calculating Decimal Equivalent −

Note − 101012 is normally written as 10101.


Octal Number System
Characteristics of the octal number system are as follows −
 Uses eight digits, 0,1,2,3,4,5,6,7
 Also called as base 8 number system
 Each position in an octal number represents a 0 power of the base (8). Example 80
 Last position in an octal number represents a x power of the base (8). Example
8x where x represents the last position - 1
Example
Octal Number: 125708
Calculating Decimal Equivalent –

Note − 125708 is normally written as 12570

29
Hexadecimal Number System
Characteristics of hexadecimal number system are as follows −
 Uses 10 digits and 6 letters, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
 Letters represent the numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E =
14, F = 15
 Also called as base 16 number system
 Each position in a hexadecimal number represents a 0 power of the base (16).
Example, 160
 Last position in a hexadecimal number represents a x power of the base (16). Example
16x where x represents the last position - 1
Example
Hexadecimal Number: 19FDE16
Calculating Decimal Equivalent –

Note − 19FDE16 is normally written as 19FDE.


NUMBER CONVERSION
There are many methods or techniques which can be used to convert numbers from one base
to another. In this chapter, we'll demonstrate the following −
 Decimal to Other Base System
 Other Base System to Decimal
 Other Base System to Non-Decimal
 Shortcut method - Binary to Octal
 Shortcut method - Octal to Binary
 Shortcut method - Binary to Hexadecimal
 Shortcut method - Hexadecimal to Binary
Decimal to Other Base System
Step 1 − Divide the decimal number to be converted by the value of the new base.

30
Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant digit) of the
new base number.
Step 3 − Divide the quotient of the previous divide by the new base.
Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the new base
number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in
Step 3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base
number.
Example
Decimal Number: 2910
Calculating Binary Equivalent −

As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so
that the first remainder becomes the Least Significant Digit (LSD) and the last remainder
becomes the Most Significant Digit (MSD).
Decimal Number : 2910 = Binary Number : 111012.
Other Base System to Decimal System
Step 1 − Determine the column (positional) value of each digit (this depends on the position
of the digit and the base of the number system).
Step 2 − Multiply the obtained column values (in Step 1) by the digits in the corresponding
columns.
Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in decimal.
Example
Binary Number: 111012
Calculating Decimal Equivalent –

31
Binary Number : 111012 = Decimal Number : 2910
Other Base System to Non-Decimal System
Step 1 − Convert the original number to a decimal number (base 10).
Step 2 − Convert the decimal number so obtained to the new base number.
Example
Octal Number : 258
Calculating Binary Equivalent −
Step 1 - Convert to Decimal

Octal Number : 258 = Decimal Number : 2110


Step 2 - Convert Decimal to Binary

Decimal Number : 2110 = Binary Number : 101012


Octal Number : 258 = Binary Number : 101012

32
Shortcut Method ─ Binary to Octal
Step 1 − Divide the binary digits into groups of three (starting from the right).
Step 2 − Convert each group of three binary digits to one octal digit.
Example
Binary Number : 101012
Calculating Octal Equivalent −

Binary Number : 101012 = Octal Number : 258


Shortcut Method ─ Octal to Binary
Step 1 − Convert each octal digit to a 3-digit binary number (the octal digits may be treated
as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
Example
Octal Number : 258
Calculating Binary Equivalent –

Octal Number : 258 = Binary Number : 101012


Shortcut Method ─ Binary to Hexadecimal
Step 1 − Divide the binary digits into groups of four (starting from the right).
Step 2 − Convert each group of four binary digits to one hexadecimal symbol.
Example
Binary Number : 101012

33
Calculating hexadecimal Equivalent –

Binary Number : 101012 = Hexadecimal Number : 1516


Shortcut Method - Hexadecimal to Binary
Step 1 − Convert each hexadecimal digit to a 4-digit binary number (the hexadecimal digits
may be treated as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 4 digits each) into a single binary
number.
Example
Hexadecimal Number : 1516
Calculating Binary Equivalent −

Hexadecimal Number : 1516 = Binary Number : 101012


Binary Arithematic
Binary arithmetic is essential part of all the digital computers and many other digital system.
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary
addition.

In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given
column and a carry of 1 over to the next column.

34
Example − Addition

Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary
subtraction. There are four rules of binary subtraction.

1’s Complement
The 1's complement of a number is found by changing all 1's to 0's and all 0's to 1's. This is
called as taking complement or 1's complement. Example of 1's Complement is as follows.

2’s Complement
The 2's complement of binary number is obtained by adding 1 to the Least Significant Bit
(LSB) of 1's complement of the number.
2's complement = 1's complement + 1
Example of 2's Complement is as follows.

35
1’s Complement Subtraction
Let's consider how we would solve our problem of subtracting 110 from 710 using 1's
complement.
1. First, we need to convert 00012 to its negative
0111 (7)
equivalent in 1's complement.
- 0001- (1)

2. To do this we change all the 1's to 0's and 0's to 1's.


Notice that the most-significant digit is now 1 since the
0001 ->1110
number is negative.

3. Next, we add the negative value we computed to 01112. 0111 (7)


This gives us a result of 101012. + 1110+(-1)
10101 (?)
4. Notice that our addition caused an overflow bit.
Whenever we have an overflow bit in 1's complement, 0101
we add this bit to our sum to get the correct answer. If + 1
there is no overflow bit, then we leave the sum as it is. 0110 (6)

0111 (7)
5. This gives us a final answer of 01102 (or 610).
- 0001- (1)
0110 (6)

Now let's look at an example where our problem does not generate an overflow bit.
We will subtract 710 from 110 using 1's complement.

1. First, we state our problem in binary. 0001 (1)


- 0111- (7)
2. Next, we convert 01112 to its negative equivalent and 0001 (1)
add this to 00012. + 1000+(-7)
1001 (?)
3. This time our results does not cause an overflow, so we
do not need to adjust the sum. Notice that our final 0001 (1)
answer is a negative number since it begins with a 1. + 1000+(-7)
Remember that our answer is in 1's complement 1001 (-6)
notation so the correct decimal value for our answer is -

36
610 and not 910.

2’s Complement Subtraction


Now let's consider how we would solve our problem of subtracting 110 from 710 using 2's
complement.

1. First, we need to convert 00012 to its negative 0111 (7)


equivalent in 2's complement. - 0001- (1)

0001 -> 1110


2. To do this we change all the 1's to 0's and 0's to 1's and
add one to the number. Notice that the most-significant 1
digit is now 1 since the number is negative.
1111

0111 (7)
3. Next, we add the negative value we computed to 01112.
+ 1111+(-1)
This gives us a result of 101102.
10110 (?)

4. Notice that our addition caused an overflow bit. 0111 (7)


Whenever we have an overflow bit in 2's complement,
- 0001- (1)
we discard the extra bit. This gives us a final answer of
01102 (or 610). 0110 (6)

Binary Multiplication
Binary multiplication is similar to decimal multiplication. It is simpler than decimal
multiplication because only 0s and 1s are involved. There are four rules of binary
multiplication.

Example − Multiplication

37
Binary Division
Binary division is similar to decimal division. It is called as the long division procedure.
Example − Division

OCTAL ARITHEMATIC
Octal Number System
Following are the characteristics of an octal number system.
 Uses eight digits, 0,1,2,3,4,5,6,7.
 Also called base 8 number system.
 Each position in an octal number represents a 0 power of the base (8). Example: 80
 Last position in an octal number represents an x power of the base (8). Example:
8x where x represents the last position - 1.
Example
Octal Number − 125708

38
Calculating Decimal Equivalent −

Step Octal Number Decimal Number

Step 1 125708 ((1 × 84) + (2 × 83) + (5 × 82) + (7 × 81) + (0 × 80))10

Step 2 125708 (4096 + 1024 + 320 + 56 + 0)10

Step 3 125708 549610

Note − 125708 is normally written as 12570.

Octal Addition
Following octal addition table will help you to handle octal addition.

To use this table, simply follow the directions used in this example: Add 68 and 58. Locate 6
in the A column then locate the 5 in the B column. The point in 'sum' area where these two
columns intersect is the 'sum' of two numbers.
68 + 58 = 138.
Example − Addition

Octal Subtraction

39
The subtraction of octal numbers follows the same rules as the subtraction of numbers in any
other number system. The only variation is in borrowed number. In the decimal system, you
borrow a group of 1010. In the binary system, you borrow a group of 210. In the octal system
you borrow a group of 810.
Example − Subtraction

HEXADECIMAL ARITHEMATIC
Hexadecimal Number System
Following are the characteristics of a hexadecimal number system.
 Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
 Letters represents numbers starting from 10. A = 10, B = 11, C = 12, D = 13, E = 14,
F = 15.
 Also called base 16 number system.
 Each position in a hexadecimal number represents a 0 power of the base (16).
Example − 160
 Last position in a hexadecimal number represents an x power of the base (16).
Example − 16x where x represents the last position - 1.
Example
Hexadecimal Number − 19FDE16
Calculating Decimal Equivalent −

Step Hexadecimal Number Decimal Number

Step 1 19FDE16 ((1 × 164) + (9 × 163) + (F × 162) + (D × 161) + (E × 160))10

Step 2 19FDE16 ((1 × 164) + (9 × 163) + (15 × 162) + (13 × 161) + (14 × 160))10

Step 3 19FDE16 (65536 + 36864 + 3840 + 208 + 14)10

40
Step 4 19FDE16 10646210

Note − 19FDE16 is normally written as 19FDE.


Hexadecimal Addition
Following hexadecimal addition table will help you greatly to handle Hexadecimal addition.

To use this table, simply follow the directions used in this example − Add A16 and 516. Locate
A in the X column then locate the 5 in the Y column. The point in 'sum' area where these two
columns intersect is the sum of two numbers.
A16 + 516 = F16.
Example − Addition

Hexadecimal Subtraction
The subtraction of hexadecimal numbers follow the same rules as the subtraction of numbers
in any other number system. The only variation is in borrowed number. In the decimal
system, you borrow a group of 1010. In the binary system, you borrow a group of 210. In the
hexadecimal system you borrow a group of 1610.
Example - Subtraction

41
Binary Coded Decimal (BCD) code
In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to
express each of the decimal digits with a binary code. In the BCD, with four bits we can
represent sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used
(0000 to 1001). The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

Advantages of BCD Codes


 It is very similar to decimal system.
 We need to remember binary equivalent of decimal numbers 0 to 9 only.
Disadvantages of BCD Codes
 The addition and subtraction of BCD have different rules.
 The BCD arithmetic is little more complicated.
 BCD needs more number of bits than binary to represent the decimal number. So
BCD is less efficient than binary.

Excess-3 code

The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express
decimal numbers. The Excess-3 code words are derived from the 8421 BCD code words
adding (0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as
follows −

42
Example

Gray Code

It is the non-weighted code and it is not arithmetic codes. That means there are no specific
weights assigned to the bit position. It has a very special feature that, only one bit will
change each time the decimal number is incremented as shown in fig. As only one bit
changes at a time, the gray code is called as a unit distance code. The gray code is a cyclic
code. Gray code cannot be used for arithmetic operation.

Application of Gray code

 Gray code is popularly used in the shaft position encoders.

43
 A shaft position encoder produces a code word which represents the angular position of the shaft.

ASCII Code

Unicode

44
BOOLEAN ALGEBRA
Boolean Algebra is used to analyze and simplify the digital (logic) circuits. It uses only the
binary numbers i.e. 0 and 1. It is also called as Binary Algebra or logical Algebra. Boolean
algebra was invented by George Boole in 1854.
Rule in Boolean Algebra
Following are the important rules used in Boolean algebra.
 Variable used can have only two values. Binary 1 for HIGH and Binary 0 for LOW.
 Complement of a variable is represented by an overbar (-). Thus, complement of
variable B is represented as . Thus if B = 0 then = 1 and B = 1 then = 0.
 ORing of the variables is represented by a plus (+) sign between them. For example
ORing of A, B, C is represented as A + B + C.
 Logical ANDing of the two or more variable is represented by writing a dot between
them such as A.B.C. Sometime the dot may be omitted like ABC.

45
Logic Gates
It is an electronic circuit having one or more than one input and only one output. The
relationship between the input and the output is based on a certain logic.Based on this, logic
gates are named as AND gate, OR gate, NOT gate etc.
AND Gate
The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are
high. A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is
sometimes omitted i.e. AB.

OR Gate
The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are
high. A plus (+) is used to show the OR operation.

NOT Gate
The NOT gate is an electronic circuit that produces an inverted version of the input at its
output. It is also known as an inverter. If the input variable is A, the inverted output is
known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the
outputs.

NAND Gate
This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The
outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate
with a small circle on the output. The small circle represents inversion.

NOR Gate
This is a 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 circle on the output. The small circle represents
inversion.

46
EXOR Gate
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its
two inputs are high. An encircled plus sign ⊕ is used to show the EXOR operation.

EXNOR Gate
The 'Exclusive-NOR' gate circuit does the opposite 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 a small
circle on the output. The small circle represents inversion.

The NAND and NOR gates are called universalgates since with either one the AND and OR
functions and NOT can be generated.

Boolean Laws
There are six types of Boolean Laws.
Commutative law
Any binary operation which satisfies the following expression is referred to as commutative
operation.

Commutative law states that changing the sequence of the variables does not have any effect
on the output of a logic circuit.
Associative law
This law states that the order in which the logic operations are performed is irrelevant as their
effect is the same.

47
Distributive law
Distributive law states the following condition.

AND law
These laws use the AND operation. Therefore they are called as AND laws.

OR law
These laws use the OR operation. Therefore they are called as OR laws.

INVERSION law
This law uses the NOT operation. The inversion law states that double inversion of a variable
results in the original variable itself.

Important Boolean Theorems


Following are few important boolean Theorems.

Boolean function/theorems Description

Boolean Functions Boolean Functions and Expressions, K-Map and NAND Gates
realization

De Morgan's Theorems De Morgan's Theorem 1 and Theorem 2

Postulates and Theorems of Boolean Algebra


Assume A, B, and C are logical states that can have the values 0 (false) and 1 (true).
"+" means OR, "·" means AND, and 𝑨 means Complement A

Postulates

48
(1) A + 0 = A A·1=A identity

(2) A + 𝑨 = 1 A·𝑨=0 complement

(3) A + B = B + A A·B=B·A commutative law

(4) A + (B + C) = (A + B) + C A · (B · C) = (A · B) · C associative law

(5) A + (B · C) = (A + B) · (A + C) A · (B + C) = (A · B) + (A · C) distributive law

Theorems

(6) A+A=A A·A=A

(7) A+1=1 A·0=0

(8) A + (A · B) = A A · ( A + B) = A

(9) A + (𝑨 · B) = A + B A · (𝑨 + B) = A · B

(A · B) + (𝑨 · C) + (B · C) = (A · B) A · (B + C) = (A · B) +
(10)
+ (𝑨 · C) (A · C)

de Morgan's
(11) 𝑨 + 𝑩 = 𝑨 · 𝑩 𝑨 · 𝑩=𝑨+𝑩
theorem

Canonical Forms
For a Boolean expression there are two kinds of canonical forms −
 The sum of minterms (SOM) form
 The product of maxterms (POM) form
The Sum of Minterms (SOM) or Sum of Products (SOP) form
A minterm is a product of all variables taken either in their direct or complemented form.
Any Boolean function can be expressed as a sum of its 1-minterms and the inverse of the
function can be expressed as a sum of its 0-minterms. Hence,
F (list of variables) = ∑ (list of 1-minterm indices)
and
F' (list of variables) = ∑ (list of 0-minterm indices)

A B C Term Minterm

49
0 0 0 x’y’z’ m0

0 0 1 x’y’z m1

0 1 0 x’yz’ m2

0 1 1 x’yz m3

1 0 0 xy’z’ m4

1 0 1 xy’z m5

1 1 0 xyz’ m6

1 1 1 xyz m7

Example
Let, F(x,y,z)=x′y′z′+xy′z+xyz′+xyzF(x,y,z)=x′y′z′+xy′z+xyz′+xyz
Or, F(x,y,z)=m0+m5+m6+m7F(x,y,z)=m0+m5+m6+m7
Hence,
F(x,y,z)=∑(0,5,6,7)F(x,y,z)=∑(0,5,6,7)
Now we will find the complement of F(x,y,z)F(x,y,z)
F′(x,y,z)=x′yz+x′y′z+x′yz′+xy′z′F′(x,y,z)=x′yz+x′y′z+x′yz′+xy′z′
Or, F′(x,y,z)=m3+m1+m2+m4F′(x,y,z)=m3+m1+m2+m4
Hence,
F′(x,y,z)=∑(3,1,2,4)=∑(1,2,3,4)F′(x,y,z)=∑(3,1,2,4)=∑(1,2,3,4)
The Product of Maxterms (POM) or Product of Sums (POS) form
A maxterm is addition of all variables taken either in their direct or complemented form. Any
Boolean function can be expressed as a product of its 0-maxterms and the inverse of the
function can be expressed as a product of its 1-maxterms. Hence,
F(list of variables) = ππ (list of 0-maxterm indices).
and
F'(list of variables) = ππ (list of 1-maxterm indices).

A B C Term Maxterm

50
0 0 0 x+y+z M0

0 0 1 x + y + z’ M1

0 1 0 x + y’ + z M2

0 1 1 x + y’ + z’ M3

1 0 0 x’ + y + z M4

1 0 1 x’ + y + z’ M5

1 1 0 x’ + y’ + z M6

1 1 1 x’ + y’ + z’ M7

Example
Let F(x,y,z)=(x+y+z).(x+y+z′).(x+y′+z).(x′+y+z)F(x,y,z)=(x+y+z).(x+y+z′).(x+y′+z).(x′+y+z
)
Or, F(x,y,z)=M0.M1.M2.M4F(x,y,z)=M0.M1.M2.M4
Hence,
F(x,y,z)=π(0,1,2,4)F(x,y,z)=π(0,1,2,4)
F′′(x,y,z)=(x+y′+z′).(x′+y+z′).(x′+y′+z).(x′+y′+z′)F″(x,y,z)=(x+y′+z′).(x′+y+z′).(x′+y′+z).(x′+
y′+z′)
Or, F(x,y,z)=M3.M5.M6.M7F(x,y,z)=M3.M5.M6.M7
Hence,
F′(x,y,z)=π(3,5,6,7)
Karnaugh Map
Boolean functions using Boolean postulates and theorems is a time consuming process and
we have to re-write the simplified expressions after each step.
To overcome this difficulty, Karnaugh introduced a method for simplification of Boolean
functions in an easy way. This method is known as Karnaugh map method or K-map method.
It is a graphical method, which consists of 2n cells for ‘n’ variables. The adjacent cells are
differed only in single bit position.
K-Maps for 2 to 5 Variables

51
K-Map method is most suitable for minimizing Boolean functions of 2 variables to 5
variables. Now, let us discuss about the K-Maps for 2 to 5 variables one by one.
2 Variable K-Map
The number of cells in 2 variable K-map is four, since the number of variables is two. The
following figure shows 2 variable K-Map.

 There is only one possibility of grouping 4 adjacent min terms.


 The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m2, m3),
(m0, m2) and (m1, m3)}.
3 Variable K-Map
The number of cells in 3 variable K-map is eight, since the number of variables is three. The
following figure shows 3 variable K-Map.

 There is only one possibility of grouping 8 adjacent min terms.


 The possible combinations of grouping 4 adjacent min terms are {(m0, m1, m3, m2),
(m4, m5, m7, m6), (m0, m1, m4, m5), (m1, m3, m5, m7), (m3, m2, m7, m6) and (m2, m0,
m6, m4)}.
 The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m1, m3),
(m3, m2), (m2, m0), (m4, m5), (m5, m7), (m7, m6), (m6, m4), (m0, m4), (m1, m5), (m3, m7)
and (m2, m6)}.
 If x=0, then 3 variable K-map becomes 2 variable K-map.
4 Variable K-Map
The number of cells in 4 variable K-map is sixteen, since the number of variables is four. The
following figure shows 4 variable K-Map.

52
 There is only one possibility of grouping 16 adjacent min terms.
 Let R1, R2, R3 and R4 represents the min terms of first row, second row, third row and
fourth row respectively. Similarly, C1, C2, C3 and C4 represents the min terms of first
column, second column, third column and fourth column respectively. The possible
combinations of grouping 8 adjacent min terms are {(R1, R2), (R2, R3), (R3, R4), (R4,
R1), (C1, C2), (C2, C3), (C3, C4), (C4, C1)}.
 If w=0, then 4 variable K-map becomes 3 variable K-map.
Minimization of Boolean Functions using K-Maps
If we consider the combination of inputs for which the Boolean function is ‘1’, then we will
get the Boolean function, which is in standard sum of products form after simplifying the
K-map.
Similarly, if we consider the combination of inputs for which the Boolean function is ‘0’,
then we will get the Boolean function, which is in standard product of sums form after
simplifying the K-map.
Follow these rules for simplifying K-maps in order to get standard sum of products form.
 Select the respective K-map based on the number of variables present in the Boolean
function.
 If the Boolean function is given as sum of min terms form, then place the ones at
respective min term cells in the K-map. If the Boolean function is given as sum of
products form, then place the ones in all possible cells of K-map for which the given
product terms are valid.
 Check for the possibilities of grouping maximum number of adjacent ones. It should
be powers of two. Start from highest power of two and upto least power of two.
Highest power is equal to the number of variables considered in K-map and least
power is zero.
 Each grouping will give either a literal or one product term. It is known as prime
implicant. The prime implicant is said to be essential prime implicant, if atleast
single ‘1’ is not covered with any other groupings but only that grouping covers.

53
 Note down all the prime implicants and essential prime implicants. The simplified
Boolean function contains all essential prime implicants and only the required prime
implicants.
Note 1 − If outputs are not defined for some combination of inputs, then those output values
will be represented with don’t care symbol ‘x’. That means, we can consider them as either
‘0’ or ‘1’.
Note 2 − If don’t care terms also present, then place don’t cares ‘x’ in the respective cells of
K-map. Consider only the don’t cares ‘x’ that are helpful for grouping maximum number of
adjacent ones. In those cases, treat the don’t care value as ‘1’.
Example
Let us simplify the following Boolean function, fW,X,Y,ZW,X,Y,Z= WX’Y’ + WY +
W’YZ’ using K-map.
The given Boolean function is in sum of products form. It is having 4 variables W, X, Y & Z.
So, we require 4 variable K-map. The 4 variable K-map with ones corresponding to the
given product terms is shown in the following figure.

Here, 1s are placed in the following cells of K-map.


 The cells, which are common to the intersection of Row 4 and columns 1 & 2 are
corresponding to the product term, WX’Y’.
 The cells, which are common to the intersection of Rows 3 & 4 and columns 3 & 4
are corresponding to the product term, WY.
 The cells, which are common to the intersection of Rows 1 & 2 and column 4 are
corresponding to the product term, W’YZ’.
There are no possibilities of grouping either 16 adjacent ones or 8 adjacent ones. There are
three possibilities of grouping 4 adjacent ones. After these three groupings, there is no single
one left as ungrouped. So, we no need to check for grouping of 2 adjacent ones. The 4
variable K-map with these three groupings is shown in the following figure.

54
Here, we got three prime implicants WX’, WY & YZ’. All these prime implicants
are essential because of following reasons.
 Two ones (m8 & m9) of fourth row grouping are not covered by any other groupings.
Only fourth row grouping covers those two ones.
 Single one (m15) of square shape grouping is not covered by any other groupings.
Only the square shape grouping covers that one.
 Two ones (m2 & m6) of fourth column grouping are not covered by any other
groupings. Only fourth column grouping covers those two ones.
Therefore, the simplified Boolean function is
f = WX’ + WY + YZ’
Follow these rules for simplifying K-maps in order to get standard product of sums form.
 Select the respective K-map based on the number of variables present in the Boolean
function.
 If the Boolean function is given as product of Max terms form, then place the zeroes
at respective Max term cells in the K-map. If the Boolean function is given as product
of sums form, then place the zeroes in all possible cells of K-map for which the given
sum terms are valid.
 Check for the possibilities of grouping maximum number of adjacent zeroes. It should
be powers of two. Start from highest power of two and upto least power of two.
Highest power is equal to the number of variables considered in K-map and least
power is zero.
 Each grouping will give either a literal or one sum term. It is known as prime
implicant. The prime implicant is said to be essential prime implicant, if atleast
single ‘0’ is not covered with any other groupings but only that grouping covers.
 Note down all the prime implicants and essential prime implicants. The simplified
Boolean function contains all essential prime implicants and only the required prime
implicants.

55
Note − If don’t care terms also present, then place don’t cares ‘x’ in the respective cells of K-
map. Consider only the don’t cares ‘x’ that are helpful for grouping maximum number of
adjacent zeroes. In those cases, treat the don’t care value as ‘0’.
Example
Let us simplify the following Boolean
function, f(X,Y,Z)=∏M(0,1,2,4)f(X,Y,Z)=∏M(0,1,2,4) using K-map.
The given Boolean function is in product of Max terms form. It is having 3 variables X, Y &
Z. So, we require 3 variable K-map. The given Max terms are M0, M1, M2 & M4. The
3 variable K-map with zeroes corresponding to the given Max terms is shown in the
following figure.

There are no possibilities of grouping either 8 adjacent zeroes or 4 adjacent zeroes. There are
three possibilities of grouping 2 adjacent zeroes. After these three groupings, there is no
single zero left as ungrouped. The 3 variable K-map with these three groupings is shown in
the following figure.

Here, we got three prime implicants X + Y, Y + Z & Z + X. All these prime implicants
are essential because one zero in each grouping is not covered by any other groupings except
with their individual groupings.
Therefore, the simplified Boolean function is
f = X+YX+Y.Y+ZY+Z.Z+XZ+X
In this way, we can easily simplify the Boolean functions up to 5 variables using K-map
method. For more than 5 variables, it is difficult to simplify the functions using K-Maps.
Because, the number of cells in K-map gets doubled by including a new variable.

56
Due to this checking and grouping of adjacent ones mintermsminterms or adjacent
zeros MaxtermsMaxterms will be complicated. We will discuss Tabular method in next
chapter to overcome the difficulties of K-map method.

57

Potrebbero piacerti anche