Week 1 Notes
Week 1 Notes
Week 1 Notes
Introduction to computer
Computer is an advanced electronic device that takes raw data (as an input) from the user and
processes it under the control of a set of instructions (called program), produces a result
(output), and saves it for future use.
1. Two Different form of computer are exited: analog and digital computer
In digital world, from a small wrist watch to space satellite all are controlled by computer.
A small or large machine was handled by humans in past, but in digitalized world these are
handled by programmed humans i.e. „Robots‟.
4. Types of Computer, By Size
According to required services speed or efficiency different types of computers are available
in market.
• Super Computer: Large in size and more powerful. Used for large and complex
calculation.
• Mainframe Computer: Mainframe computers are smaller than supercomputer. It has
large storage capacity and capable to perform large calculation. Used in bank, educational
institution.
• Minicomputer: Minicomputers are multi user which are mainly used by small
organization
• Microcomputer: Microcomputer is defined as small size, inexpensive, easy to carry
computer e.g. Laptop, tablets.
5. Generations of Computer
The modern computer took its shape with the arrival of your time. It had been around 16th
century when the evolution of the computer started. The initial computer faced many
changes, obviously for the betterment. It continuously improved itself in terms of speed,
accuracy, size, and price to urge the form of the fashionable day computer. This long period
is often conveniently divided into the subsequent phases called computer generations:
First Generation Computers (1940-1956)
Second Generation Computers (1956-1963)
Third Generation Computers (1964-1971)
Fourth Generation Computers (1971-Present)
Fifth Generation Computers (Present and Beyond)
Before there are graphing calculators, spreadsheets, and computer algebra systems,
mathematicians and inventors searched for solutions to ease the burden of calculation.
Below are the 8 mechanical calculators before modern computers were invented.
1. Abacus (ca. 2700 BC)
2. Pascal‟s Calculator (1652)
3. Stepped Reckoner (1694)
4. Arithmometer (1820)
5. Comptometer (1887) and Comptograph (1889)
6. The Difference Engine (1822)
7. Analytical Engine (1834)
8. The Millionaire (1893)
Introduction
1. 1946-1959 is the period of first generation computer.
2. J.P.Eckert and J.W.Mauchy invented the first successful electronic computer called
ENIAC, ENIAC stands for “Electronic Numeric Integrated And Calculator”.
3.
Advantages:
1. It made use of vacuum tubes which are the only electronic component available
during those days.
2. These computers could calculate in milliseconds.
Disadvantages:
1. These were very big in size, weight was about 30 tones.
2. These computers were based on vacuum tubes.
3. These computers were very costly.
4. It could store only a small amount of information due to the presence of magnetic
drums.
5. As the invention of first generation computers involves vacuum tubes, so another
disadvantage of these computers was, vacuum tubes require a large cooling system.
6. Very less work efficiency.
7. Limited programming capabilities and punch cards were used to take inputs.
8. Large amount of energy consumption.
9. Not reliable and constant maintenance is required.
Main electronic
component Transistor.
Programming
language Machine language and assembly language.
Examples of second PDP-8, IBM1400 series, IBM 7090 and 7094, UNIVAC 1107,
generation CDC 3600 etc.
Third Generation Computers: Integrated Circuits. (1964-1971)
Introduction
1. 1965-1971 is the period of third generation computer.
2. These computers were based on Integrated circuits.
3. IC was invented by Robert Noyce and Jack Kilby In 1958-1959.
4. IC was a single component containing number of transistors.
Few Examples are:
1. PDP-8
2. PDP-11
3. ICL 2900
4. IBM 360
5. IBM 370
Advantages:
1. These computers were cheaper as compared to second-generation computers.
2. They were fast and reliable.
3. Use of IC in the computer provides the small size of the computer.
4. IC not only reduce the size of the computer but it also improves the performance of
the computer as compared to previous computers.
5. This generation of computers has big storage capacity.
6. Instead of punch cards, mouse and keyboard are used for input.
7. They used an operating system for better resource management and used the concept
of time-sharing and multiple programming.
8. These computers reduce the computational time from microseconds to nanoseconds.
Disadvantages:
1. IC chips are difficult to maintain.
2. The highly sophisticated technology required for the manufacturing of IC chips.
3. Air conditioning is required.
Examples of third IBM 360, IBM 370, PDP-11, NCR 395, B6500, UNIVAC
generation 1108, etc.
Fourth Generation Computers: Micro-processors (1971-Present)
Introduction:
1. 1971-1980 is the period of fourth generation computer.
2. This technology is based on Microprocessor.
3. A microprocessor is used in a computer for any logical and arithmetic function to be
performed in any program.
4. Graphics User Interface (GUI) technology was exploited to offer more comfort to
users.
Few Examples are:
1. IBM 4341
2. DEC 10
3. STAR 1000
4. PUP 11
Advantages:
1. Fastest in computation and size get reduced as compared to the previous generation
of computer.
2. Heat generated is negligible.
3. Small in size as compared to previous generation computers.
4. Less maintenance is required.
5. All types of high-level language can be used in this type of computers.
Disadvantages:
1. The Microprocessor design and fabrication are very complex.
2. Air conditioning is required in many cases due to the presence of ICs.
3. Advance technology is required to make the ICs.
Main electronic Very large-scale integration (VLSI) and the microprocessor (VLSI
component has thousands of transistors on a single microchip).
Input/output devices pointing devices, optical scanning, keyboard, monitor, printer, etc.
Examples of fourth
generation IBM PC, STAR 1000, APPLE II, Apple Macintosh, Alter 8800, etc.
Introduction
1. The period of the fifth generation in 1980-onwards.
2. This generation is based on artificial intelligence.
3. The aim of the fifth generation is to make a device which could respond to natural
language input and are capable of learning and self-organization.
4. This generation is based on ULSI(Ultra Large Scale Integration) technology
resulting in the production of microprocessor chips having ten million electronic
component.
Few Examples are:
1. Desktop
2. Laptop
3. NoteBook
4. UltraBook
5. Chromebook
Advantages:
1. It is more reliable and works faster.
2. It is available in different sizes and unique features.
3. It provides computers with more user-friendly interfaces with multimedia features.
Disadvantages:
1. They need very low-level languages.
2. They may make the human brains dull and doomed.
Input / output Trackpad (or touchpad), touchscreen, pen, speech input (recognize
device voice/speech), light scanner, printer, keyboard, monitor, mouse, etc.
Example of
fifth
generation Desktops, laptops, tablets, smartphones, etc.
Input/Output Devices – Program or data is read into main memory from the input
device or secondary storage under the control of CPU input instruction. Output
devices are used to output the information from a computer. If some results are
evaluated by computer and it is stored in the computer, then with the help of output
devices, we can present them to the user.
Buses – Data is transmitted from one part of a computer to another, connecting all
major internal components to the CPU and memory, by the means of Buses. Types:
1. Data Bus: It carries data among the memory unit, the I/O devices, and the
processor.
2. Address Bus: It carries the address of data (not the actual data) between memory
and processor.
3. Control Bus: It carries control commands from the CPU (and status signals from
other devices) in order to control and coordinate all the activities within the
computer.
There are lots of programming languages that are well-known but all of them need to
follow some strategy when they are implemented. And that strategy is a paradigm.
1. Imperative Programming Paradigm: It is one of the oldest programming paradigm. It
features close relation to machine architecture. It is based on Von Neumann
architecture. It works by changing the program state through assignment statements. It
performs step by step task by changing state. The main focus is on how to achieve the
goal. The paradigm consists of several statements and after execution of all the result is
stored.
The paradigm consists of several statements, and after the execution of all of them, the
result is stored. It‟s about writing a list of instructions to tell the computer what to do
step by step.
In an imperative programming paradigm, the order of the steps is crucial, because a
given step will have different consequences depending on the current values of
variables when the step is executed.
Advantages:
1. Very simple to implement
2. It contains loops, variables etc.
Disadvantage:
1. Complex problem cannot be solved
2. Less efficient and less productive
3. Parallel programming is not possible
Advantages Disadvantages
Advantages:
1. Pure functions are easier to understand because they don‟t change any states and
depend only on the input given to them. Whatever output they produce is the return
value they give. Their function signature gives all the information about them i.e.
their return type and their arguments.
2. The ability of functional programming languages to treat functions as values and
pass them to functions as parameters make the code more readable and easily
understandable.
3. Testing and debugging is easier. Since pure functions take only arguments and
produce output, they don‟t produce any changes don‟t take input or produce some
hidden output. They use immutable values, so it becomes easier to check some
problems in programs written uses pure functions.
4. It is used to implement concurrency/parallelism because pure functions don‟t
change variables or any other data outside of it.
5. It adopts lazy evaluation which avoids repeated evaluation because the value is
evaluated and stored only when it is needed.
Disadvantages:
1. Sometimes writing pure functions can reduce the readability of code.
2. Writing programs in recursive style instead of using loops can be bit intimidating.
3. Writing pure functions are easy but combining them with the rest of the application
and I/O operations is a difficult task.
4. Immutable values and recursion can lead to decrease in performance.
Applications:
It is used in mathematical computations.
It is needed where concurrency or parallelism is required.
One of the characteristics of a language is its support for particular programming paradigms.
For example, Smalltalk has direct support for programming in the object-oriented way, so it
might be called an object-oriented language. OCaml, Lisp, Scheme, and JavaScript programs
tend to make heavy use of passing functions around so they are called “functional languages”
despite having variables and many imperative constructs.
Applications:
Advantages:
Very few languages implement a paradigm 100%. When they do, they are pure. It is
incredibly rare to have a “pure OOP” language or a “pure functional” language. A lot
of languages have a few escapes; for example in OCaml, you will program with
functions 90% or more of the time, but if you need state, you can get it. Another
example: very few languages implement OOP the way Alan Kay envisioned it.
The technique to represent and work with numbers is called number system. Decimal number
system is the most common number system. Other popular number systems include binary number
system, octal number system, hexadecimal number system, etc.
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)
Step 2 19FDE16 ((1 x 164) + (9 x 163) + (15 x 162) + (13 x 161) + (14 x 160))10