FALLSEM2023-24 SWE1005 TH VL2023240102744 2023-07-25 Reference-Material-I
FALLSEM2023-24 SWE1005 TH VL2023240102744 2023-07-25 Reference-Material-I
FALLSEM2023-24 SWE1005 TH VL2023240102744 2023-07-25 Reference-Material-I
Organization
Peripherals Computer
Central Main
Processing Memory
Unit
Computer
Systems
Interconnection
Input
Output
Communication
lines
Structure….
• Four main structural components:
- central processing unit(CPU):
controls the operation of the computer
and perform its data processing functions:
often simply referred to as processor.
- Main memory: stores data
- I/O: moves data between computer and
its external environment.
- system interconnections: some
mechanism that provides for
communication among CPU,mainmemory,
and I/O.
Structure - The CPU
CPU
Computer Arithmetic
Registers and
I/O Login Unit
System CPU
Bus
Internal CPU
Memory Interconnection
Control
Unit
Structure - The CPU( components)
• Four main components:
- control unit : controls the operation of
CPU and hence the computer.
- Arithmetic and logic unit(ALU): perform
the computer’s data processing function
(addition ,subtraction etc)
- Registers: provides storage internal to
the CPU.
- CPU interconnection: some mechanism
that provides for communication among
the control unit,ALU, and registers.
Structure - The Control Unit
Control Unit
CPU
Sequencing
ALU Login
Control
Internal
Unit
Bus
Control Unit
Registers Registers and
Decoders
Control
Memory
First-Generation Computers
• Late 1940s and 1950s
• Stored-program computers
• Programmed in machine level language
• Examples: IAS, ENIAC, EDVAC, UNIVAC,
Mark I, IBM 701
• UNIVAC ( Universal Automatic computer )
• ENIAC (Electronic numerical integrator
and computer)
• EDVAC ( Electronic Discrete Variable
computer)
ENIAC - background
• Electronic Numerical Integrator And
Computer
• Eckert and Mauchly
• University of Pennsylvania
• Trajectory tables for weapons
• Started 1943
• Finished 1946
—Too late for war effort
• Used until 1955.
ENIAC – details:
• Decimal (not binary)
• 20 accumulators of 10 digits
• Programmed manually by switches
• 18,000 vacuum tubes
• 30 tons
• 15,000 square feet
• 140 kW power consumption
• 5,000 additions per second
• ENIAC (Electronic Numerical Integrator and
Computer)
• Designed by Mauchly and Eckert
• University of Pennsylvania
• First general-purpose electronic digital
computer
• Response to WW2 need to calculate
trajectory tables for weapons.
• Built 1943-1946 – too late for war effort.
• Completed 1952
The IBM 7094, a typical mainframe computer
2nd Generation: Transistor Based Computers
Transistors replaced
vacuum tubes
Smaller
Cheaper
Less heat dissipation
Made from Silicon (Sand)
Invented 1947 at Bell Labs
William Shockley et al.
Commercial Transistor
based computers:
First transistor computer – Manchester University 1953.
NCR & RCA
produced small
transistor machines
IBM 7000
DEC – 1957 (PDP-
von Neumann/Turing
• Stored Program concept
• Main memory storing programs and data
• ALU operating on binary data
• Control unit interpreting instructions from
memory and executing
• Input and output equipment operated by
control unit
• Princeton Institute for Advanced Studies
—IAS
• Completed 1952
John von Neumann (1903-1957)
Structure of von Neumann machine
IAS Computer Machine Language
• 40-bit word, two machine instructions per
word.
bit 0 19 20 27 28 39
7 8
• AC- 40 bits
• MQ –
40 bits
• MBR –
• 40 bits
IBR –
• IR – 20 bits
• MAR – 8 bits
• PC – 12 bits
12 bits
Quiz
• MBR –
• MAR –
• AC –
• IBR –
• IR –
• PC –
• MQ –
• IAS –
• What is Computer Architecture?
• What is Computer Organization?
• Number of words in IAS machine?
• Number of bits per word in IAS machine?
• Explain Stored program concept.
IAS Instructions
• The IAS computer had a total of 21 instructions
and grouped as follows:
― Data Transfer: Move data between memory and ALU
registers or between ALU Registers.
― Unconditional branch:
Normally, the control unit executes instruction in
sequence from memory .This sequence can be
changed by a branch instruction.
Conditional Branch: depends on condition.
― Arithmetic: Operations performed by the ALU.
― Address modify:
Address to be computed in the ALU and then
inserted into instructions stored in memory.
Data Transfer Instructions
Instruction Opcode SYBOLIC Description
Type
00001010 LOAD MQ AC‹― MQ
Unconditional
Branch
00001111 JUMP+M(X,0:19 If no in AC is
) +ve take the
Conditional next instruction
Branch from left half of
M(X)
PC 21
MAR 501
500
21
MBR LOAD
STOR
M(X)
M(X)500,
500,
43 ADD
(Other
M(X)
Ins)501
IR LOAD
STOR
ADD M(X)M(X)
IBR ADD
(Other
M(X) Ins)
501
AC 37
501
AddIBR
M(X) PC
PC←
Mar
MAR =PC
= 1
←PC 2
3
LOAD M(X) 500, ADD M(X) 501
4
STOR M(X) 500, (Other Ins)
IR MAR
MARadd=
12
501
MAR==500
MAR =500
= 501
add =
add 500
add==12
IAS Computer AC MQ
Input/
MARPC
MBRM[M Arithmetic & Logic output
Circuits
IBRMBR<20..
AR] IBRMBR<20.. Equipm
IRMBR<0..7> 39>
39> IRMBR<0..7> ents
MARMBR<8. MARMBR<8. MBR
.19>
MBRM[M .19>
MBRAC
AR]
ACMBR M[MAR}M
BR
IRIBR<0..7> IRIBR<0..7>
MARIBR<8.. IBR PC
MBRM[M
19>
ACAC
AR] + Main
PCPC+1
MBR Memory
MARPC IR
MBRM[M Cont MAR
AR] rol
Circ
uits
Register transfer operation for addition
operation
• Personal computers
• Laptops and Palmtops
• Networking and wireless
• And the future!
– Nanotechnology
– Optical computing
– Quantum computing
– Molecular computing
Generations of Computer
• Vacuum tube - 1946-1957
• Transistor - 1958-1964
• Small scale integration - 1965 on
—Up to 100 devices on a chip
• Medium scale integration - to 1971
—100-3,000 devices on a chip
• Large scale integration - 1971-1977
—3,000 - 100,000 devices on a chip
• Very large scale integration - 1978 -1991
—100,000 - 100,000,000 devices on a chip
• Ultra large scale integration – 1991 -
—Over 100,000,000 devices on a chip
Program Concept
• Hardwired systems are inflexible
• General purpose hardware can do
different tasks, given correct control
signals
• Instead of re-wiring, supply a new set of
control signals
What is a program?
• A sequence of steps
• For each step, an arithmetic or logical
operation is done
• For each operation, a different set of
control signals is needed
Function of Control Unit
• For each operation a unique code is
provided
—e.g. ADD, MOVE
• A hardware segment accepts the code and
issues the control signals
• We have a computer!
Data processor model
Output (write) Transfer data from specified from source to I/O port or device
—c = a + b
Example: Y=(A-B)%(C+D*E)
Instruction comment
MOVE Y,A Y ‹— A
MOVE T,D T ‹— D
Instruction
Opcode Operand
Direct Addressing
• Address field contains address of operand
• Effective address (EA) = address field (A)
• e.g. ADD A
—Add contents of cell A to accumulator
—Look in memory at address A for operand
• Advantage:
― Single memory reference to access data
― No additional calculations to work out
effective address
• Disadvantage:
― Limited address space
Direct Addressing Diagram
Instruction
Opcode Address A
Memory
Operand
Indirect Addressing (1)
• Memory cell pointed to by address field
contains the address of (pointer to) the
operand
• EA = (A)
—Look in A, find address (A) and look there for
operand
• e.g. ADD (A)
—Add contents of cell pointed to by contents of
A to accumulator
Indirect Addressing (2)
• Large address space
• 2n where n = word length
• May be nested, multilevel, cascaded
—e.g. EA = (((A)))
– Draw the diagram yourself
• Multiple memory accesses to find
operand( two memory to fetch the
operand : one to get its address and
second to get its value.)
• Hence slower
Indirect Addressing Diagram
Instruction
Opcode Address A
Memory
Pointer to operand
Operand
Register Addressing (1)
• Operand is held in register named in
address filed
• EA = R
• Limited number of registers
• Very small address field needed
• No memory reference are required
—Shorter instructions
—Faster instruction fetch
Register Addressing (2)
• No memory access
• Very fast execution
• Very limited address space
• Multiple registers helps performance
—Requires good assembly programming or
compiler writing
—N.B. C programming
– register int a;
• c.f. Direct addressing
Register Addressing Diagram
Instruction
Opcode Register Address R
Registers
Operand
Register Indirect Addressing
• C.f. indirect addressing
• EA = (R)
• Operand is in memory cell pointed to by
contents of register R
• Large address space (2n)
• One fewer memory access than indirect
addressing
Register Indirect Addressing Diagram
Instruction
Opcode Register Address R
Memory
Registers
Instruction
Opcode Register R Address A
Memory
Registers