1 Module 1-1 Prog in C - Intro To Computer
1 Module 1-1 Prog in C - Intro To Computer
Introduction to computer
• Computer is an integral part of our day to day life.
1
Amity Business School
Introduction to computer
2
Amity Business School
Components of Computer
• INPUT UNIT: Devices used to input data and instructions.
Components of Computer
• Control unit, arithmetic logic unit and memory are together
called the central processing unit or CPU.
3
Amity Business School
Characteristics of Computer
• SPEED: Typically a computer can carry out 3-4 million
instruction per second.
Characteristics of Computer
• VERSATILITY: Computer can carry out a wide range of work.
4
Amity Business School
10
5
Amity Business School
History of Computers
• First Generation: (1942-1954)
– Vacuum tube technology
– Unreliable
– Very costly
– Generate lot of heat
– Huge size
– Need AC
– Supported machine language only
– Consumed lot of electricity
Example: ENIAC,EDVAV,IBM-701,IBM-650
History of Computers
• Second Generation: (1952-1964)
– Use of transistors
– Reliable as compared to first generation
– Smaller size as compare to first generation
– Generate less heat as compare to first generation
– Consumed less electricity as compare to first generation
– Faster as compare to first generation
– Still very costly
– Need AC
– Supported machine language and assembly language
Example: IBM-1620,IBM-7094
6
Amity Business School
History of Computers
• Third Generation: (1964-1972)
– IC used
– More Reliable
– Smaller size
– Generate less heat
– Consumed less electricity
– Faster
– Still costly
– Need AC
– Supported high level language
– Example: IBM-360 series ,Honeywell-600
History of Computers
• Forth Generation: (1972-1990)
– VLSI
– More Reliable
– Smaller size
– Use of PC’s
– Pipeline processing
– Concept of internet and network was introduced
– Very cheap
– No AC needed
– Computer become easily available
– Example: DEC-10, STAR-1000, CARY (super
computer)
7
Amity Business School
History of Computers
16
8
Amity Business School
17
9
Amity Business School
Von-Neumann Model
• 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.
19
Von-Neumann Model
A Von Neumann-based computer:
• Uses a single processor
• Uses one memory for both instructions and
data.
• Executes programs following the fetch-
decode-execute cycle
20
10
Amity Business School
Von-Neumann Model
21
22
11
Amity Business School
CPU
23
12
Amity Business School
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.
25
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.
26
13
Amity Business School
27
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)
28
14
Amity Business School
Number System
• A number system defines how a number can be
represented using distinct symbols.
• A number can be represented differently in
different number system
29
Number System
• Decimal Number System
• Binary Number System
• Octal Number System
• HexaDecimal Number System
30
15
Amity Business School
31
16
Amity Business School
33
17
Amity Business School
18
Amity Business School
19
Amity Business School
1st Program
#include <stdio.h>
// program prints hello world
int main()
{ printf ("Hello world!\n");
return 0;
}
40
20
Amity Business School
41
21
Amity Business School
43
44
22
Amity Business School
45
Input/Output
46
23
Amity Business School
47
word
48
24
Amity Business School
49
50
25
Amity Business School
51
Data Types
52
26
Amity Business School
Arithmetic Operators
❑Basic operations +, -, *, /
53
Arithmetic Operators
54
27
Amity Business School
55
Operator Precedence
56
28
Amity Business School
Exercise
57
58
29