Unit 1&2 - DCF
Unit 1&2 - DCF
What is Computer:
Programmable machine.
numbers through a string of binary digits. The Word 'Computer' usually refers to the
• Charles Babbage is called the "Grand Father" of the computer. The First mechanical
computer designed by Charles Babbage was called Analytical Engine.It uses read-
• Computer is an advanced electronic device that takes raw data as input from the user
and processes these data under the control of set of instructions (called program) and
gives the result (output) and saves output for the future use. It can process both
Digital Computer
Input(Data):
• Input is the raw information entered into a computer from the input devices. It is the collection of
letters, numbers, images etc.
Process:
• Process is the operation of data as per given instruction. It is totally internal process of the
computer system.
Output:
• Output is the processed data given by computer after data processing. Output is also called as
Result. We can save these results in the storage devices for the future use.
Applications of Computer
Business
• A computer has high speed of calculation, diligence, accuracy, reliability, or versatility which
made it an integrated part in all business organisations.
• Computer is used in business organisations for: •Payroll
calculations
• Budgeting
• Sales analysis
• Financial forecasting
• Managing employees database
• Maintenance of stocks etc
Banking
• Banks provide online accounting facility, which includes current balances,deposits, overdrafts, interest
charges, shares, and trustee records.
• ATM machines are making it even easier for customers to deal with banks.
Insurance
• Insurance companies are keeping all records up-to-date with the help of computers. The insurance
companies, finance houses and stock broking firms are widely using computers for their concerns.
• Insurance companies are maintaining a database of all clients with information showing
• procedure to continue with policies
Education
• The computer education is rapidly increasing the graph of number of computer students.
• There are number of methods in which educational institutions can use computer to educate the students.
• It is used to prepare a database about performance of a student and analysis is carried out on this basis
Marketing
• In marketing, uses of computer are following:
• Advertising-With computers, advertising professionals create art and graphics, write and revise copy,
and print and disseminate ads with the goal of selling more products.
• At Home Shopping-Home shopping has been made possible through use of computerized catalogues that
provide access to product information and permit direct entry of orders to be filled by the customers
HealthCare
The computers are being used in hospitals to keep the record of patients
ECG, EEG, Ultrasounds and CT Scans etc., are also done by computerized
machines.
• Some major fields of health care in which computers are used are:
• Diagnostic System-Computers are used to collect data and identify cause of illness.
• Lab-diagnostic System-All tests can be done and reports are prepared by computer.
• Patient Monitoring System-These are used to check patient's signs for abnormality such as in
Cardiac Arrest, ECG etc.
• Pharma Information System-Computer checks Drug-Labels, Expiry dates, harmful drug’s side
effects etc.
• Surgery: Nowadays, computers are also used in performing
surgery.
Engineering Design
• One of major areas is CAD (Computer aided design). That provides creation and
modification of images. Some fields are:
• Structural Engineering- Requires stress and strain analysis for design of Ships, Buildings,
Budgets, Airplanes etc.
• Industrial Engineering-Computers deal with design, implementation and improvement of
integrated systems of people, materials and equipments.
• Architectural Engineering-Computers help in planning towns, designing buildings, determining a
range of buildings on a site using both 2D and 3D drawings.
Government
• Computers play an important role in government. Some major fields in this category are:
• Budgets
• Male/Female ratio
• Weather forecasting
Different Types of computer System
Basic components of Digital Computer System
All types of computers follow the same basic logical structure and perform the following
five basic operations for converting raw input data into information useful their users.
1 Take Input The process of entering data and instructions into the computer
system.
2 Store Data Saving data and instructions so that they are available for
processing as and when required.
Control the Directs the manner and sequence in which all of the above
5 operations are performed.
Input Unit
This unit contains devices with the help of which we enter data into the computer. This unit
creates a link between the user and the computer. The input devices translate the information into a form
understandable by the computer.
CPU (Central Processing Unit)
CPU is considered as the brain of the computer. CPU performs all types of data processing
operations. It stores data, intermediate results, and instructions (program). It controls the operation of all
parts of the computer.
CPU itself has the following three components −
Output Unit
The output unit consists of devices with the help of which we get the information from the
computer. This unit is a link between the computer and the users. Output devices translate the computer's
output into a form understandable by the users.
Central Processing Unit (CPU) consists of the following features −
Arithmetic Section
Logic Section
Arithmetic Section
Function of arithmetic section is to perform arithmetic operations like addition, subtraction,
multiplication, and division. All complex operations are done by making repetitive use of the above
operations.
Logic Section
Function of logic section is to perform logic operations such as comparing, selecting, matching,
and merging of data.
There are two types of programming languages, which can be categorized into the following way
This language is the most understandable language used by computer to perform its operations. It can
be further categorized into:
MachineLanguage(1GL)
Machine language consists of strings of binary numbers (i.e. 0s and 1s) and it is the only one language, the
processor directly understands. Machine language has an Merits of very fast execution speed and efficient
use of primary memory.
Merits:
¨ It is directly understood by the processor so has faster execution time since the programs written
in this language need not to be translated.
¨ It doesn’t need larger memory.
Demerits:
¨ It is very difficult to program using 1GL since all the instructions are to be represented by 0s
and 1s.
¨ Use of this language makes programming time consuming. It is difficult to
find error and to debug.
¨ It can be used by experts only.
Assembly Language
language uses mnemonics code (symbolic operation code like ‘ADD’ for addition) in
place of 0s and 1s. The program is converted into machine code by assembler. The
Merits:
¨ It is makes programming easier than 1GL since it uses mnemonics code for
programming. Eg: ADD for addition, SUB for subtraction, DIV for division, etc.
Programs written in this language is not directly understandable by computer so translators should be
used.
Instructions of this language closely resembles to human language or English like words. It uses
mathematical notations to perform the task. The high level language is easier to learn. It requires less time
to write and is easier to maintain the errors. The high level language is converted into machine language
by one of the two different languages translator programs;inter preteror compiler.
Procedural-Oriented language(3GL)
Procedural Programming is a methodology for modeling the problem being solved, by determining the
steps and the order of those steps that must be followed in order to reach a desired outcome or specific
program state. These languages are designed to express the logic and the procedure of a problem to be
solved. It includes languages such as Pascal, COBOL, C, FORTAN, etc.
Merits:
¨ Because of their flexibility, procedural languages are able to solve a variety of problems.
¨ Programmer does not need to think in term of computer architecture which makes them focused on
the problem.
Demerits:
It allows the users to specify what the output should be, without describing all the details
of how the data should be manipulated to produce the result. This is one step ahead from 3GL. These are
result oriented and include database query language.
Eg: Visual Basic, C#, PHP, etc.
The objectives of 4GL are to:
Increase the speed of developing programs.
Minimize user’s effort to botain information from computer.
Reduce errors while writing programs.
Merits:
¨ Programmer need not to think about the procedure of the program. So, programming is much
easier.
Demerits:
¨ It is easier but needs higher processor and larger memory.
¨ It needs to be translated therefore its execution time is more.
Natural language(5GL)
Natural language are stil in developing stage where we could write statrments that
would look like normal sentences.
Merits:
¨ Easy to program.
¨ Since, the program uses normal sentences, they are easy to understand.¨ The programs
designed using 5GL will have artificial intelligence (AI). ¨ The programs would be much more
interactive and interesting.
Demerits:
¨ It is slower than previous generation language as it should be completely translated into
binary code which is a tedious task.
¨ Highly advanced and expensive electronic devices are required to run programs
developed in 5GL. Therefore, it is an expensive approach.
These are the different types of programming languages with their merits and demerits.
Memory
Number systems
A Number system defines a set of values used to represent the quantity. It has different types
of number systems
• The total number of digits used in a number system is called its base or radix. its grouped together is
called a “byte.”
DecimalNumberSystem
Background Information
Binary Numbers
A Binary number system has only two digits, which are 0 and 1. Every number (value) is represented
with 0 and 1 in this number system. The base of binary number system is 2, because it has only two
digits. Though DECIMAL (No 3) is more frequently used in Number representation,
BINARY is the number system form which the system/machine accepts.
Octal number system has only eight (8) digits from 0 to 7. Every number (value) is represented with
0,1,2,3,4,5,6 and 7 in this number system. The base of octal number system is 8, because it has only
8 digits.
3) Decimal number system
Decimal number system has only ten (10) digits from 0 to 9. Every number(value) is represented
with 0,1,2,3,4,5,6, 7,8 and 9 in this number system. The base of decimal number system is 10, because it
has only 10 digits.
A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to 9 and A to F. Every
number (value) represents with 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F in this number system. The
base of hexadecimal number system is 16, because it has 16 alphanumeric values. Here, we have 0 to 9,
representing 0 – 9 but from 10, we have A is 10, B is 11, C is 12, D is 13, E is
• 16
2 16
2 8 - 0 MSB
2 4 - 0
2 2 - 0
1 - 0 LSB
• A binary number can be converted into a decimal number by adding the products of each bit
and its weight.
METHOD: 1
• (101)
2 1 0
101 = 1 x 2 + 0 x 2 + 1 x 2 = 4 + 0+1
2
= 5
ANS: (101)2 = (5)10
Binary Fractions
METHOD:2
(1101.0111 ) 2
(1101.0111 )2 = 13.437510
•To convert a decimal number to octal, we have to divide the decimal number by 8 repeatedly and
collect the remainders from top to bottom
Convert Octal numbers to decimal number
Hexadecimal Number System
• To convert a decimal number to octal, we have to divide the decimal number by 8 repeatedly and collect
the remainders from top to bottom.
1) 10111.12
010111 . 1002
(2 7 . 4 )8
1) (110.101)
2
(0110.1010)2
(6 . A)16
Convert Octal number to binary
AND GATE
The AND gate is the logical circuit with the operation similar to logical multiplication.
Theyproducethehighoutputifalltheinputsareinhighstate,thisgateproducelow output, when any one of
the inputs is low
OR GATE
The OR gate is similar to the operation of arithmetic addition. The OR gate
produce thehigh output when any one of the input is in high state. We get low output if either of the input
is low.
Complementation and inverters or NOT gate
In Booleanalgebra,wehaveanoperation calledcomplementationandthe symbol is
“ –”.
The complement is physically realized by agatecalled inverter or NOTgate.
The NOT gate produce high output, when the input is low and low output when the input ishigh.
X Y Z Z’ YZ’ X + YZ’
0 0 0 1 0 0
0 0 1 0 0 0
0 1 0 1 1 1
0 1 1 0 0 0
1 0 0 1 0 1
1 0 1 0 0 1
1 1 0 1 1 1
1 1 1 0 0 1
The above is the truth table for the expression X + YZ’. The value Z is complemented
and the complemented value is multiplied with Y to get YZ’.
This column will have the value 1 only when both Y is a 1 and Z’ is a 1.
Now the value of YZ’ is performed logical addition with the value of X and the final
value is evaluated.
BASIC LAWS OF BOOLEAN ALGEBRA
A listof basic rules by which Boolean algebra expressions may be manipulated are
contained in this table.
Each rule may be proved by using the proof by perfect induction.
(X + Y) (X + Y) (X + Z)
Consider the two terms,
(X+Y) (X+Y’)
XX + XY’ + XY + YY’
X + XY’ + XY + 0 (YY = 0, XX = X)
X + X(Y’ +Y) ( Y’ + Y = 1)
X + X(1)
X+X (X+X=1)
X
Now multiply the term (X + Z)
X(X’+Z) X’ + XZ.
XZ. XX’ =0
1. X’ + Y’ = X’ . Y’
2. (X . Y)’ = X’ + Y’
ThecomplementofanyBooleanexpressionorapartofanyexpressionmaybefound by
means of these theorems.
Two steps are used to form a complement.
1. The(+) symbols arereplaced with (.) and (.) symbol are replaced
with (+) symbol.
2. Each of the terms in the expression is complemented.
The complement of W’X+YZ’ is done by two steps:
The addition symbol is changed
The complement of each term is
formed. Ex:
(W’.X)’(Y.Z’)’
can be written as
(W+X’)(Y’+Z)
SinceWand Zwerealreadycomplemented,theybecomeuncomplemented bythe
theorem
X’ = X.
It is sometimes necessary to complement both sides of an equation. This may be done in
the same way as before:
WX+YZ =0
Complementing both sides gives
(WX+YZ)’ = 0’
(W’+X’)(Y’+Z’) =1
(XY)’ + X (Y’ + Y) = Z
(XY)’ + X (1) = Z (XY)’ + X = Z
X + Y ‘= Z
Truth table for three input values X,Y and Z
X Y Z Output
A
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
A column is added to listing the inputs, A, Y,and Z according to their values in the input
columns.
The product terms from each row in which the output is a 1 are collected ((XYZ)’, X’YZ’,
XY’Z’, and XYZ’) and the desired expression is the sum of these products (X’Y’Z’+
X’YZ’+XY’Z’+XYZ’).
Therefore, the complete expression in standard form for the desired network is