Professional Documents
Culture Documents
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 1
Introduction to computer System and its sub modules
• There are two basic types of electrical signals, namely, analog and
digital. The analog signals are continuous in nature and digital
signals are discrete in nature.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 2
Computer Architecture
• Computer architecture refers to those parameters of a computer
system that are visible to a programmer or those parameters that
have a direct impact on the logical execution of a program.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 3
Computer Organization
• Computer organization refers to the operational units and their
interconnections that realize the architectural specifications.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 4
Basic Computer Model and different units of Computer
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 5
Number System & Representation
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 6
Representation of Real Number
1) Fixed-point representation
2) Floating-point representation
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 7
Fixed-point representation
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 8
Floating-point representation
In this representation, numbers are represented by a mantissa comprising the significant
digits and an exponent part of Radix R. The format is:
Numbers are often normalized, such that the decimal point is placed to the right of the
first non zero digit.
To store this number in floating point representation, we store 5236 in mantissa part
and 3 in exponent part.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 9
Signed Integer
• Range of natural numbers is 0 to 2n-1
• By including negative numbers -2n-1-1 to 2n-1-1
• If we consider 8-bit number, then range of natural number is from 0-
255
• For signed integer range is from -127 to 127
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 10
Representation of Signed Integer in 1’s complement form
• 01011100
• 10100011
• 11111111
• By adding ‘1’ to the result, it is ‘0’
01011100
10100100
100000000
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 11
Arithmetic & Logical Unit
• Consider an ALU which can perform four arithmetic operations and four logical
operations To distinguish between arithmetic and logical operation, we may use a
signal line,
• 0 - in that signal, represents an arithmetic operation and
• 1 - in that signal, represents a logical operation.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 12
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 13
4- bit Full Adder
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 14
Binary Subtractor:
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 15
Design of ALU
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 16
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 17
Memory Unit
1. RAM
2. ROM
•Hardwired Control
• Microprogrammed Control
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 19
Hardwired Control : In this hardwired control techniques, the control signals
are generated by means of hardwired circuit. The main objective of control unit is
to generate the control signal in proper sequence.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 20
Eg: Programmable Logic Array
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 21
Microprogrammed Control
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 22
Control Word (CW) :
• Control word is defined as a word whose individual bits represent the various
control signal.
• The individual control words in this microprogram are referred to as
microinstructions.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 23
Machine Language
• A processor can understand and execute machine instructions. Such
instructions are simply binary numbers stored in the computer.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 24
Assembly Language
Assembly language is a programming language that is one step away from machine language.
Typically, each assembly language instruction is translated into one machine instruction by
the assembler.
Assembly language is hardware dependent, with a different assembly language for each type
of processor I1: Move R3, R7 /R3 ← (R7)
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 26
Assembly Language
• Compiler
• Interpreter
• Linker
• Loader
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 27
Addressing Modes
The most common addressing techniques are:
• Immediate
• Direct
• Indirect
• Register
•Register Indirect
• Displacement
• Stack
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 28
To explain the addressing modes, the following notationis used:
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 29
Immediate Addressing
OPERAND = A
Instruction
Opcode Operand
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 30
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
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 31
Direct Addressing Diagram
Instruction
Address A
Memory
Operand
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 32
Indirect Addressing
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 33
Indirect Addressing Diagram
Instruction
Address A
Memory
Pointer to operand
Operand
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 34
Register Addressing
• Operand is held in register named in address filed
• EA = R
• Limited number of registers
• Very small address field needed
• Shorter instructions
• Faster instruction fetch
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 35
Register Addressing
• No memory access
• Very fast execution
• Very limited address space
• Multiple registers helps performance
• Requires good assembly programming or compiler writing
• Direct addressing
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 36
Register Addressing Diagram
Instruction
Register Address R
Registers
Operand
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 37
Register Indirect Addressing
• 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
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 38
Register Indirect Addressing
Instruction
Registers
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 39
Displacement Addressing
• EA = A + (R)
• Address field hold two values
• A = base value
• R = register that holds displacement
• or vice versa
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 40
Displacement Addressing Diagram
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 41
Displacement Addressing
• Relative Addressing
• Base-Register Addressing
• Indexing
• auto-indexing
• auto-incrementing
• EA = A + (R)
• R = (R) + 1
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 42
Displacement Addressing
• auto-decrementing
• EA = A + (R)
• R = (R) – 1
• If indexing is performed after the indirection, it is termed
postindexing
EA = (A) + (R)
• With preindexing, the indexing is performed before the
indirection:
EA = ( A + (R) )
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 43
Stack Addressing
• Operand is (implicitly) on top of stack
• e.g.
• ADD Pop top two items from stack and add
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 44
Instruction Set
• The operation of a CPU is determine by the instruction it
executes, referred to as machine instructions or computer
instructions. The collection of different instructions is referred
as the instruction set of the CPU.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 45
Opcodes are represented by abbreviations, called
mnemonics, that indicate the operations
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 46
The instruction set of a CPU can be categorized as follows:
1. Data Processing
2. Data Storage
3. Data Movement
4. Control
Types of Operands
1. Addresses
2. Numbers
3. Characters
4. Logical Data
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 47
Types of Operations
• Data Transfer
• Arithmetic
• Logical
• Conversion
• Input Output [ I/O ]
• System Control
• Transfer Control
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 48
A. Data Transfer
Move (Transfer) --------Transfer word or block from source to destination
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 51
D. Input/output
Input (Read)----- Transfer data from specified I/O port or device to
destination (e.g., main memory or processor register)
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 53
F. Transfer of Control
• The most common transfer-of-control operations
found in instruction set are:
• Branch
• Skip
• Procedure call.
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 54
BRP X ----Branch to location X if result is positive
BRN X ---- Branch to location X if result is negative
BRZ X----- Branch to location X is result is zero
BRO X----- Branch to location X if overflow occurs
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 55
Instruction Format
Opcode Zero Address Instruction
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 58
Zero address instructions
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 59
Stack Organization
© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED 60
Subroutine Calls
Requirements
Set PC to arbitrary address