UNIT1 (Theory)
UNIT1 (Theory)
UNIT-I
(b) Arithmetic and Logic Unit: The function of an Arithmetic logic unit (ALU) is to
perform arithmetic and logical operations such as addition, subtraction, multiplication,
division, AND, OR, NOT, Exclusive OR etc.
(c) Registers: small memory used intermediate results and for some special purpose.
• 4. Output Unit: An output unit performs the reverse operation of that of an input
unit so it supplies information obtained from processing to outside world. Units
called output interfaces accomplish this task.
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.
1 Super Computer
For example, weather forecasting requires a supercomputer. Other uses of
supercomputers include animated graphics, fluid dynamic calculations, nuclear
energy research, and petroleum exploration.
Advantage Disadvantage
They are faster than high level language. They are comparatively slower.
Low level languages are memory efficient. High level languages are not memory efficient.
No need of translator except assembler for AL. Compiler & Interpreter is needed to convert HLL.
Disadvantage Advantage
Low level languages are difficult to learn. High level languages are easy to learn.
They are machine dependent and are not portable. They are machine independent and portable.
They are more error prone. They are less error prone.
Execution Time The overall execution time is faster The overall execution time is slower
Hard to perform an operation and Easy to perform tasks and does not
Ease of Use
require expertise. require expertise.
Advantages of algorithm
• An algorithm uses a definite procedure which makes it easy to understand.
• It is not dependent on any programming language, so it is easy to understand.
• Every step in an algorithm has its own logical sequence so it is easy to debug.
• By using algorithm, the problem is broken down into smaller pieces or steps.
Disadvantages of algorithm.
• Writing algorithm takes a long time.
• An Algorithm is not a computer program; it is rather a concept of how a program
should be.
Advantages of flowchart:
• The Flowchart is an excellent way of communicating the logic of a program.
• It is easy and efficient to analyze problem using flowchart.
• It helps the programmer to write the program code.
Disadvantage of flowchart
• The flowchart can be complex when the logic of a program is quite complicated.
• Drawing flowchart is a time-consuming task.
• Difficult to alter the flowchart & uses special sets of symbols for every action.
• It is just a visualization of a program; it cannot function like an actual program.
1/11/2022 MIET Group of Institutions. 20
FLOWCHARTS AND ITS NOTATIONS
Set total = 0
Set I =1
I = I +1