COA Module 1
COA Module 1
3 4
5 6
Mainframe Minicomputer
• A very large and expensive
computer capable of • A midsized computer, in size and power, minicomputers
supporting hundreds or even lie between workstations and mainframes.
thousands of users
simultaneously.
• Mainframes are mainly Used • A multi-user computer capable of supporting from 10 to
to store, manage, and process hundreds of users simultaneously.
large amounts of data.
• Mainframes are used in
medium to large corporations • In recent years, the minicomputer has evolved into the
that require more computing
power and storage capacity
“mid-range servers”
than workstations can provide.
7 8
Server Supercomputer
• A Super computers is typically used for scientific and
• Purpose is to engineering applications that must handle very large databases
“serve.” or do a great amount of computation.
• A computer that • It is used for large- Scale numerical calculations required in
has the purpose applications such as weather forecasting and aircraft design.
of supplying its • super computers are fastest, costliest and most powerful
users with data; computers.
usually through • It can execute million instructions per second.
the use of a LAN • Most super computers are really multiple computers that
(local area perform parallel processing.
network).
9 10
Functional Units Of Computer
Arithmetic
A computer consists of five functionally independent main parts. Input and
logic
Memory
• Input unit
• Output unit Output Control
• Memory unit
• Arithmetic and logic unit I/O Processor
• Control unit
Basic functional units of a computer
11 12
13 14
15 16
17 18
Speakers Printer
• Output devices that receive signals from the • Output device that produces text or graphical
computer’s sound card to play music, narration, or images on paper.
sound effects.
19 20
Storage Devices Memory Unit
• Used to keep data when the power to the computer is turned • The function of memory unit is to store the
off. programs and data.
• Different forms • There are two classes of storage
• Hard disk
1) Primary Storage
• Floppy or zip disks
• CD-Writer 2) Secondary storage
Primary Storage:
• It is a fast memory that operates at electronic
speeds.
• Programs must be stored in the memory while they
are being executed.
21 22
23 24
• Primary memories are small in capacities and Arithmetic And Logic Unit
expensive.
• Thus additional, cheaper secondary storage is • It performs the arithmetic operations such as addition,
subtraction, multiplication, division and logic operations
used when large amounts of data and many such as AND, OR, Not.
programs have to be stored. • Suppose two numbers located in the memory are to be
added, they are brought into the processor, and addition is
carried out by the ALU .
Secondary storage devices: • The SUM may then be stored in the memory.
• Magnetic disks • When the operands are brought into the processor, they
• Magnetic tapes are stored in high-speed storage elements called
registers.
• CD-ROMs • Each register can store one word of data.
25 26
27 28
29 30
Connection Between the Processor and the memory
• Figure shows how the memory and the processor can be connected.
• Processor contains number of registers used for several purposes.
31
32
Operating steps:
MAR & MDR: • Execution of program starts when the PC is set to point to the first
instruction of the program.
These two registers provide communication with the memory. • The contents of the PC are transferred to the MAR and a read control
Memory address Register: (MAR) signal is sent to the memory.
It holds the address of the location to be accessed. • After some time, the addressed word is read out of the memory and loaded
into the MDR.
Memory Data Register: • Next, the contents of the MDR are transferred to the IR.
It contains the data to be written into or read out of the addressed
location. • Decode and execute the instruction
33 34
35 36
37 38
39 40
• So, the total time required to execute the program is Performance of a computer
affected by
• Speed of the processor
• Compiler speed Main
memory
Cache
memory Processor
• Disk used
• Speed of output device
• The time needed to execute a instruction is called as
processor time. Bus
• Processor time depends on the hardware involved in the
execution of individual machine instructions.
The processor cache.
• This hardware comprises the processor & the memory
which are usually connected by the bus. (diagram in next
slide)
41 42
Processor clock
• Each & every electronic embedded systems should have processor circuit.
• A program will be executed faster if the movement of • These Processor circuits are controlled by a timing signal called clock.
instructions and data between the main memory is • The clock defines regular time intervals, called clock cycles.
minimized.
• Each & every machine instruction is having one or more actions. For ex,
• For example, suppose a number of instructions are add R0,R1
executed repeatedly over short period of time, as • To execute a machine instruction, the processor divides the action to be
happens in the program loop. performed into sequence of basic steps, such as each step to be completed in
one clock cycle.
• If these instructions are available in the cache memory, • So clock cycle is an important parameter that affects processor performance.
they can be fetched quickly during the period of
• The ‘p’ be the length of one clock cycle.
repeated use.
• clock rate is given by R=1/ P, which is measured in cycles per second.
• Generally, processor speed is mentioned in terms of clock rates & it is in
some Giga hertz (G Hz)
43 44
45 46
47
48
49 50
Sign- and - magnitude: 2’ s complement :
• In sign and magnitude system, negative values are represented • In 2’s complement, negative values are obtained by adding 1 to
by changing the most significant bit from 0 to 1 in the b vector of the 1’s complement of that number.
the corresponding positive value. • 2’s complement is the most efficient way to carry out addition
For example +5 is represented by 0101, and -5 is and subtraction operations.
represented by 1101. • It is one most often used in computers.
1’s complement:
• In 1’s complement representation, negative values are obtained
by complementing each bit of the corresponding positive value.
Thus, the representation for -3 is obtained by complementing
each bit in the vector 0011 to get 1100.
51 52
Addition:
• To add two signed numbers , add their n- bit representations ,
ignoring the carry-out signal from the most significant bit
(MSB) position.
• The sum will be algebraically correct value in the 2’s
complement representation as long as the answer is in the
range -2n-1 through +2n-1 -1.
53
54
56
55
57 58
Memory words.
59 60
Memory Locations and Addresses Memory Locations and Addresses
• To retrieve information from memory, either for one word Byte Addressability
or one byte (8-bit), addresses for each location are needed. • It is impractical to assign distinct addresses to
• A k-bit address memory has 2k memory locations using individual bit locations in the memory.
numbers from 0 – 2k-1 as the addresses of successive
locations in the memory. • The most practical assignment is to have successive
addresses refer to successive byte locations in the
• 2k addresses constitute the address space of the computer. memory – byte-addressable memory.
• 24-bit memory: 224 = 16,777,216 = 16M (1M=220) • Byte locations have addresses 0, 1, 2, … If the word
• 32-bit memory: 232 = 4G (1G=230) length is 32 bits, successive words are located at
• 1K(kilo)=210 1T(tera)=240 addresses 0, 4, 8,…
61 62
0 0 1 2 3 0 3 2 1 0
4 4 5 6 7 4 7 6 5 4
• •
• •
• •
k k k k k k k k k k
2 -4 2 -4 2 -3 2 - 2 2 - 1 2 - 4 2 - 1 2 - 2 2 -3 2 -4
63 64
Memory Operation
Memory Locations and Addresses • Load (or Read or Fetch)
➢ Transfers a copy of the contents of a specific memory location to the
Word Alignment processor.
• Words are said to be aligned in memory if they ➢ The memory content doesn’t change.
begin at a byte address. that is a multiple of the num ➢ Processor send the address of the desired location to the memory and
request its contents to be read.
of bytes in a word.
➢ The memory reads the data and send them to the processor.
• 16-bit word: word addresses: 0, 2, 4,….
• 32-bit word: word addresses: 0, 4, 8,…. • Store (or Write)
• 64-bit word: word addresses: 0, 8,16,…. ➢ Transfers an item of information from the processor to a specific memory
• Access numbers, characters, and character strings location.
➢ The former contents of that location is overwritten.
➢ The processor sends the address of the desired location to the memory
along with the data to be written.
65 66
67 68
• While writing the programs, generally we store the values in a • Contents of a location are denoted by placing square brackets
variables. These variables are nothing but the name given to some around the name of the location
memory location. It is also known that, every memory location is
having an unique address. Ex: R1←[LOC]
• Most of the time, we identify a location by some name associated with R3 ←[R1]+[R2]
hardware binary address. • This type of notation is known as Register Transfer Notation
(RTN)
69 70
Assembly Language Notation
RISC and CISC Instruction Sets
• Assembly language notation is another type of notation used CISC versus RISC
to represent machine instructions & programs CISC- Complex Instruction Set Computer
RISC- Reduced Instruction Set Computer
CISC RISC
• Ex: Move LOC, R1 ;R1←[LOC] Instructions can take several
Single cycle instructions
clock cycles
Add R1, R2, R3 ;R3 ←[R1]+[R2] Complex and variable length Simple standardized
instructions instructions
71
73 74
75 76
77 78
Generations of computers
First Generation (1945-1955):
80
79
Second generation(1955 – 1965):
• The invention of Transistors marked the start of the second
generation.
• Magnetic core memories and magnetic drum storage devices
were more widely used in the second generation.
• High level languages, such as Fortran were developed, making
preparation of programs much easier.
• System programs called compilers were developed to
translate these high level language programs into
corresponding assembly language program.
• Separate I/O processors were developed that could operate
in parallel with the central processor.
• IBM became a major computer manufacturer during this
time.
82
81
83 84
End of Module 1
85 86