SlideShare a Scribd company logo
EE5440
COMPUTER ARCHITECTURE
Mr. Dilawar
Lecturer,
Computer Science Faculty,
Bakhtar University
Kabul, Afghanistan.
Course Objectives
After successfully completing this course, you will be able to:
• Understand the design of computer system and its components.
• Understand different CPU design, ISA, addressing, and
microprogramming.
• Understand different memory management and I/O strategies and
techniques.
Course Outline
• Basic Structure of Computers
• Instruction Set Architecture
• Basic I/O
• I/O Organization
• Basic Processing Unit
• Computer Arithmetic
• The Memory System
Text Books to Follow
• Computer Organization and Embedded Systems by C Hamacher, 6th
Edition 2012.
• Computer Organization and Architecture: Designing for
Performance, by William Stallings 8th Edition, Prentice Hall.
• Structured Computer Organization by Andrew S Tanenbaum 5th
Edition.
Basic Structure of Computers
Chapter 1
Lecture Outline
• The different types of computers
• The basic structure of a computer and its operation
• Machine instructions and their execution
• Integer, floating-point, and character representations
• Addition and subtraction of binary numbers
• Basic performance issues in computer systems
• A brief history of computer development
Computer Types
• Since their introduction in the 1940s, digital computers have evolved
into different types
• Sze, cost, computational power, and intended use.
• Modern computers can be divided into below categories
• Embedded Computers
• Personal Computers
• Servers and Enterprise Systems
• Supercomputers and Grid Computers
• Emerging trend in access to computing facilities – cloud computing.
Functional Units
• Five functional parts
• Input, memory, ALU, output, and
CU.
• Interconnection network
• Exchange information and
coordinate their actions.
Functional Units
• Information handled by computer
• Instruction or data.
• Instructions, are explicit commands
• Transmission of information
• Specify the AL operations.
• Program, is a list of instructions which
performs a task.
• Data are numbers and characters
used as operand by the instructions.
Functional Units
• Instructions must be encoded in a
suitable format.
• Most recent H/W employs digital
circuits that have only two states.
• Everything is encoded as string of
binary digits called bits.
• Having one of two values, 0 or 1.
Functional Units
Input Unit
• Computers accept coded information though input units.
• Keyboard, touchpad, mouse, joystick, and trackball.
• Digital communication facilities, such as internet, can also provide
input to a computer.
Functional Units
Memory Unit
• Primary memory, also called main memory, is a fast memory that
operates at electronic speeds.
• Programs are stored while being executed.
• Consist of large number of semiconductor storage cells, each capable of
storing one bit of information.
• Handled in groups of fixed size called words.
• Number of bits in each word is referred to as word length, typically 16, 32, or 64 bits.
• For access, each word in memory has a distinct address.
Functional Units
Memory Unit
• Instructions and data can be written or read under the control of processor.
• A memory in which any memory location can be accessed in a short of fixed
amount of time after specifying its address is called RAM.
• Memory access time, time required to access one word.
• From few to 100ns – Independent of the location of word being accessed.
Functional Units
Cache Memory
• Smaller, faster RAM unit, called cache.
• Used to hold sections of a program that are currently being executed, along
with any associated data.
• Tightly coupled with the processor and is usually contained on the
same integrated-circuit chip.
• Suppose, execution of a number of execution in a program loop.
• Cache hit and Cache miss operations.
Functional Units
Secondary Storage
• Although primary memory is essential, expensive, and volatile.
• Thus additional, less expensive, permanent secondary storage is used for
large amount of data storage.
• Access times are longer than as compare to primary memory.
• Wide selection of devices such as
• Magnetic disks, optical disks (DVD and CD), and flash memory devices.
Functional Units
Arithmetic and Logic Unit
• Most computer operations are executed in ALU of the processor.
• addition, subtraction, multiplication, division, or comparison of numbers.
• When operands are brought into the processor, they are stored in
high-speed storage elements called registers.
• Access time is shorter as compare to other storage systems.
Functional Units
Output Unit
• Counterpart of the input unit.
• Sends processed results to the outside world such as printer and graphic
displays.
• Often, looks sometimes comes with dual functionality, I/O units.
Functional Units
Control Unit
• The coordination of all the above units are handled through CU.
• It is like a nerve center that sends control signals to other units and senses
their states.
• Processing cycle is all managed by control unit.
Basic Operational Concepts
• We have learned,
• Activity is governed through instructions.
• For performing a task, program is loaded into memory.
• Individual instructions are brought to the processor for processing.
• A typical instruction might be
MOV R2, LOC
ADD R4, R3
MOV LOC, R4
Basic Operational Concepts
• IR holds the instruction that is currently
being executed.
• PC contains the memory address of the
next instruction to be fetched and
executed.
• R0 through Rn-1 are general purpose
registers.
• The processor-memory interface sends
read and write control signals.
• Use of interrupt signal and interrupt-
service routine.
Number Representation and Arithmetic
Operations
• The most natural way to represent a number in a computer system is
by a string of bits, called a binary number.
• We will have discussion on binary representation for Integers as its
arithmetic operations and then floating-point numbers.
Integers
• A bit is the most basic unit of information in a computer.
• It is a state of “on” or “off” in a digital circuit.
• Or “high” or “low” voltage instead of “on” or “off.”
• A byte is a group of eight bits.
• A byte is the smallest possible addressable unit of computer storage.
• A word is a contiguous group of bytes
• Word sizes of 16, 32, or 64 bits are most common.
• Usually a word represents a number or instruction.
Integers
• Start with the least significant bit (rightmost bit)
• Add each pair of bits
• Include the carry in the addition, if present
0 0 0 0 0 1 1 1
0 0 0 0 0 1 0 0
+
0 0 0 0 1 0 1 1
1
(4)
(7)
(11)
carry:
01234bit position: 567
Integers
• There are three ways in which signed binary numbers may be
expressed:
• Signed magnitude,
• One’s complement and
• Two’s complement.
• In an 8-bit word, signed magnitude representation places the
absolute value of the number in the 7 bits to the right of the sign bit.
Integers
• Highest bit indicates the sign. 1 = negative, 0 = positive
1 1 1 1 0 1 1 0
0 0 0 0 1 0 1 0
sign bit
Negative
Positive
Integers
• Binary addition is as easy as it gets. You need to know only four
rules:
0 + 0 = 0 0 + 1 = 1
1 + 0 = 1 1 + 1 = 10
• The simplicity of this system makes it possible for digital circuits to
carry out arithmetic operations.
• We will describe these circuits in Chapter 3.
26
Let’s see how the addition rules work with signed
magnitude numbers . . .
Integers
• Example:
• Using signed magnitude binary arithmetic,
find the sum of 75 and 46.
• First, convert 75 and 46 to binary, and arrange
as a sum, but separate the (positive) sign bits
from the magnitude bits.
27
In this example, we were careful careful to pick two values
whose sum would fit into seven bits. If that is not the case, we
have a problem.
Integers
• Example:
• Using signed magnitude binary
arithmetic, find the sum of 107 and
46.
• We see that the carry from the seventh
bit overflows and is discarded, giving
us the erroneous result:
107 + 46 = 25.
Integers
• Signed magnitude representation is easy for people to understand,
but it requires complicated computer hardware.
• Another disadvantage of signed magnitude is that it allows two
different representations for zero: positive zero and negative zero.
• For these reasons (among others) computers systems employ
complement systems for numeric value representation.
29
Integers
• In complement systems, negative values are represented by some
difference between a number and its base.
• In diminished radix complement systems, a negative value is given
by the difference between the absolute value of a number and one
less than its base.
• In the binary system, this gives us one’s complement. It amounts to
little more than flipping the bits of a binary number.
30
Integers
• For example, in 8-bit one’s complement;
• + 3 is: 00000011
• - 3 is: 11111100
• In one’s complement, as with signed magnitude, negative values are
indicated by a 1 in the high order bit.
• Complement systems are useful because they eliminate the need for
special circuitry for subtraction. The difference of two values is found
by adding the minuend to the complement of the subtrahend.
Integers
• With one’s complement addition, the carry bit
is “carried around” and added to the sum.
• Example: Using one’s complement binary
arithmetic, find the sum of 48 and - 19
We note that 19 in one’s complement is 00010011,
so -19 in one’s complement is: 11101100.
Integers
• Although the “end carry around” adds some complexity, one’s
complement is simpler to implement than signed magnitude.
• But it still has the disadvantage of having two different
representations for zero: positive zero and negative zero.
• Two’s complement solves this problem.
• Two’s complement is the radix complement of the binary numbering
system.
Integers
• To express a value in two’s complement:
• If the number is positive, just convert it to binary and you’re done.
• If the number is negative, find the one’s complement of the number
and then add 1.
• Example:
• In 8-bit one’s complement, positive 3 is: 0 0 0 0 0 0 1 1
• Negative 3 in one’s complement is: 1 1 1 1 1 1 0 0
• Adding 1 gives us -3 in two’s complement form: 11111101.
Integers
starting value 00100100 = +36
step1: reverse the bits (1's complement) 11011011
step 2: add 1 to the value from step 1 + 1
sum = 2's complement representation 11011100 = -36
Sum of an integer and its 2's complement must be zero:
00100100 + 11011100 = 00000000 (8-bit sum)  Ignore Carry
The easiest way to obtain the 2's complement of a binary number is by
starting at the LSB, leaving all the 0s unchanged, look for the first
occurrence of a 1. Leave this 1 unchanged and complement all the bits
after it.
Integers
• With two’s complement arithmetic, all we do is add our two binary
numbers. Just discard any carries emitting from the high order bit.
We note that 19 in one’s complement is: 00010011,
so -19 in one’s complement is: 11101100,
and -19 in two’s complement is: 11101101.
– Example: Using one’s
complement binary
arithmetic, find the sum of
48 and - 19.
Integers
• When we use any finite number of bits to represent a number, we
always run the risk of the result of our calculations becoming too
large to be stored in the computer.
• While we can’t always prevent overflow, we can always detect
overflow.
• In complement arithmetic, an overflow condition is easy to detect.
Integers
• Example:
• Using two’s complement binary arithmetic,
find the sum of 107 and 46.
• We see that the nonzero carry from the seventh
bit overflows into the sign bit, giving us the
erroneous result: 107 + 46 = -103.
Rule for detecting two’s complement overflow: When the
“carry in” and the “carry out” of the sign bit differ, overflow has
occurred.
Integers
• When subtracting A – B, convert B to its 2's complement
• Add A to (–B)
0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0
0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 (2's complement)
0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 (same result)
– +
• Carry is ignored, because
• Negative number is sign-extended with 1's
• You can imagine infinite 1's to the left of a negative number
• Adding the carry to the extended 1's produces extended zeros
Character Representation
• ASCII is the most common encoding schema for characters.
• Alphanumeric characters, operators, punctuation symbols, and
control characters are represented by 7-bit codes.
• A byte is used for the representation and storage.
• The sequential increasing order of codes (alphabets and numeric)
when changed to unsigned binary describes sorting operation.
• The low-order four bits of the ASCII describes BCD code.
• Code for 0 to 9 decimal digits.
Performance
• Measure of performance is how quickly it executes program.
• Design of its instruction set, hardware and software, including OS and the
technology in which the hardware is implemented.
• By technology, processor and system organization – This section.
Performance
• Technology
• VLSI is a critical factor of the speed of execution of machine instruction.
• Switching between 0 and 1 in logic circuits is determined by size of transistors
used.
• Smaller transistors switch faster
• Instructions can be executed faster and more transistors can be placed,
leading to more logic functionality and more memory storage capacity.
• Advances in fabrication technology over several decades have reduced
transistor sizes dramatically.
Performance
• Parallelism
• Performing number of operations in parallel.
• Instruction-Level Parallelism – Pipelining.
• complete all steps of the current instruction before starting the steps of the next
instruction – execution of a sequence of instructions.
• overlapping the execution of the steps of successive instruction to reduced total
execution time.
• Multicore Processors
• Multiple processing units (core) on a single chip.
• Dual-core, quad-core, and octo-core processors for chips having 2, 4, and 8 cores
respectively.
Performance
• Parallelism
• Multiprocessors
• Many processors, each possibly containing multiple cores.
• Shared-Memory multiprocessor.
• In contrast, It is also possible to use an interconnected group of complete computers to
achieve high total computational power.
• Message-Passing multicomputer.
Summery
• The different types of computers
• The basic structure of a computer and its operation
• Machine instructions and their execution
• Integer, floating-point, and character representations
• Addition and subtraction of binary numbers
• Basic performance issues in computer systems
• A brief history of computer development
Thank You
For your Patience
Ad

More Related Content

What's hot (20)

Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
Vinit Raut
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
Pradeep Kumar TS
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
sheetal singh
 
mano.ppt
mano.pptmano.ppt
mano.ppt
prathamgunj
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
ihsanjamil
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
Deepak John
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
Ahmed M. Abed
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
DevaKumari Vijay
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
shweta-sharma99
 
pipelining
pipeliningpipelining
pipelining
Siddique Ibrahim
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
mali yogesh kumar
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
PreethiSureshkumar1
 
CISC & RISC Architecture
CISC & RISC Architecture CISC & RISC Architecture
CISC & RISC Architecture
Suvendu Kumar Dash
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
Bảo Hoang
 
Arithmatic pipline
Arithmatic piplineArithmatic pipline
Arithmatic pipline
A. Shamel
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
utsav_shah
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language
Usman Bin Saad
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
Vinit Raut
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
instruction cycle ppt
instruction cycle pptinstruction cycle ppt
instruction cycle ppt
sheetal singh
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
ihsanjamil
 
Floating point representation
Floating point representationFloating point representation
Floating point representation
missstevenson01
 
Computer organization memory
Computer organization memoryComputer organization memory
Computer organization memory
Deepak John
 
Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Part I:Introduction to assembly language
Part I:Introduction to assembly languagePart I:Introduction to assembly language
Part I:Introduction to assembly language
Ahmed M. Abed
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
DevaKumari Vijay
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
mali yogesh kumar
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
Bảo Hoang
 
Arithmatic pipline
Arithmatic piplineArithmatic pipline
Arithmatic pipline
A. Shamel
 
Instruction Execution Cycle
Instruction Execution CycleInstruction Execution Cycle
Instruction Execution Cycle
utsav_shah
 
Stack and its usage in assembly language
Stack and its usage in assembly language Stack and its usage in assembly language
Stack and its usage in assembly language
Usman Bin Saad
 

Similar to EE5440 – Computer Architecture - Lecture 1 (20)

Using only above uploaded document(its formulas and concepts) solve problem 2...
Using only above uploaded document(its formulas and concepts) solve problem 2...Using only above uploaded document(its formulas and concepts) solve problem 2...
Using only above uploaded document(its formulas and concepts) solve problem 2...
koinai0031
 
.Comp Org and Arch All_Slide_1711695396000.pptx
.Comp Org and Arch All_Slide_1711695396000.pptx.Comp Org and Arch All_Slide_1711695396000.pptx
.Comp Org and Arch All_Slide_1711695396000.pptx
shambelworku8
 
Module-1_Part_1 (1).pptx
Module-1_Part_1 (1).pptxModule-1_Part_1 (1).pptx
Module-1_Part_1 (1).pptx
kumarloresh143
 
An Introduction To Python - Understanding Computers
An Introduction To Python - Understanding ComputersAn Introduction To Python - Understanding Computers
An Introduction To Python - Understanding Computers
Blue Elephant Consulting
 
DLD-unit-1(2022).pdf
DLD-unit-1(2022).pdfDLD-unit-1(2022).pdf
DLD-unit-1(2022).pdf
Dr ambedkar Institute of Technology
 
Computer Architecture and Organization ppt
Computer Architecture and Organization pptComputer Architecture and Organization ppt
Computer Architecture and Organization ppt
JayasimhaThummala1
 
Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theory
jomerson remorosa
 
BCS 100: Introduction to Computer Science Lesson 3
BCS 100: Introduction to Computer Science Lesson 3BCS 100: Introduction to Computer Science Lesson 3
BCS 100: Introduction to Computer Science Lesson 3
Ndubi Amos
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
Ashhad Kamal
 
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgjhgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
mindzyp
 
Notes Computer Organization and Architecture
Notes Computer Organization and ArchitectureNotes Computer Organization and Architecture
Notes Computer Organization and Architecture
SureshK256753
 
CO UNIT 4 pptx in computer organizations
CO UNIT 4 pptx in computer organizationsCO UNIT 4 pptx in computer organizations
CO UNIT 4 pptx in computer organizations
gsekharreddy1
 
Week 2 Course Material.pdf
Week 2 Course Material.pdfWeek 2 Course Material.pdf
Week 2 Course Material.pdf
ssuser0f6a72
 
Transforming data into information
Transforming data into informationTransforming data into information
Transforming data into information
Maryam Fida
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
Student
 
chapter 1 of computers organization .pdf
chapter 1 of computers organization .pdfchapter 1 of computers organization .pdf
chapter 1 of computers organization .pdf
nosybaahmed2
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Abhishekn84
 
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxccccccCh01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
tasheebedane
 
Ch01.pptxcomputer organization and architecture schools
Ch01.pptxcomputer organization and architecture schoolsCh01.pptxcomputer organization and architecture schools
Ch01.pptxcomputer organization and architecture schools
TesheeBedaneBeka
 
Transforming Data into Information
Transforming Data into InformationTransforming Data into Information
Transforming Data into Information
Bint-e- Hawa
 
Using only above uploaded document(its formulas and concepts) solve problem 2...
Using only above uploaded document(its formulas and concepts) solve problem 2...Using only above uploaded document(its formulas and concepts) solve problem 2...
Using only above uploaded document(its formulas and concepts) solve problem 2...
koinai0031
 
.Comp Org and Arch All_Slide_1711695396000.pptx
.Comp Org and Arch All_Slide_1711695396000.pptx.Comp Org and Arch All_Slide_1711695396000.pptx
.Comp Org and Arch All_Slide_1711695396000.pptx
shambelworku8
 
Module-1_Part_1 (1).pptx
Module-1_Part_1 (1).pptxModule-1_Part_1 (1).pptx
Module-1_Part_1 (1).pptx
kumarloresh143
 
An Introduction To Python - Understanding Computers
An Introduction To Python - Understanding ComputersAn Introduction To Python - Understanding Computers
An Introduction To Python - Understanding Computers
Blue Elephant Consulting
 
Computer Architecture and Organization ppt
Computer Architecture and Organization pptComputer Architecture and Organization ppt
Computer Architecture and Organization ppt
JayasimhaThummala1
 
Logic design and switching theory
Logic design and switching theoryLogic design and switching theory
Logic design and switching theory
jomerson remorosa
 
BCS 100: Introduction to Computer Science Lesson 3
BCS 100: Introduction to Computer Science Lesson 3BCS 100: Introduction to Computer Science Lesson 3
BCS 100: Introduction to Computer Science Lesson 3
Ndubi Amos
 
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgjhgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
hgfhfghfg gvhhhgjfg gtfhngfjhfk jkfgfgjfgj
mindzyp
 
Notes Computer Organization and Architecture
Notes Computer Organization and ArchitectureNotes Computer Organization and Architecture
Notes Computer Organization and Architecture
SureshK256753
 
CO UNIT 4 pptx in computer organizations
CO UNIT 4 pptx in computer organizationsCO UNIT 4 pptx in computer organizations
CO UNIT 4 pptx in computer organizations
gsekharreddy1
 
Week 2 Course Material.pdf
Week 2 Course Material.pdfWeek 2 Course Material.pdf
Week 2 Course Material.pdf
ssuser0f6a72
 
Transforming data into information
Transforming data into informationTransforming data into information
Transforming data into information
Maryam Fida
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
Student
 
chapter 1 of computers organization .pdf
chapter 1 of computers organization .pdfchapter 1 of computers organization .pdf
chapter 1 of computers organization .pdf
nosybaahmed2
 
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Basic Structure of Computers: Functional Units, Basic Operational Concepts, B...
Abhishekn84
 
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxccccccCh01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
Ch01.pptxxxxxxxxxcxcxcxxccxxxxxxxxxxxcccccc
tasheebedane
 
Ch01.pptxcomputer organization and architecture schools
Ch01.pptxcomputer organization and architecture schoolsCh01.pptxcomputer organization and architecture schools
Ch01.pptxcomputer organization and architecture schools
TesheeBedaneBeka
 
Transforming Data into Information
Transforming Data into InformationTransforming Data into Information
Transforming Data into Information
Bint-e- Hawa
 
Ad

More from Dilawar Khan (13)

EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3
Dilawar Khan
 
EE5440 – Computer Architecture - Lecture 2
EE5440 – Computer Architecture - Lecture 2EE5440 – Computer Architecture - Lecture 2
EE5440 – Computer Architecture - Lecture 2
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)
Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)
Dilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)
Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)
Dilawar Khan
 
EE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course OutlineEE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course Outline
Dilawar Khan
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language I
Dilawar Khan
 
CS3270 – Database Systems Course Outline
CS3270 – Database Systems Course OutlineCS3270 – Database Systems Course Outline
CS3270 – Database Systems Course Outline
Dilawar Khan
 
CS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course OutlineCS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course Outline
Dilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)
Dilawar Khan
 
EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3EE5440 – Computer Architecture - Lecture 3
EE5440 – Computer Architecture - Lecture 3
Dilawar Khan
 
EE5440 – Computer Architecture - Lecture 2
EE5440 – Computer Architecture - Lecture 2EE5440 – Computer Architecture - Lecture 2
EE5440 – Computer Architecture - Lecture 2
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)CS7330 - Electronic Commerce - lecture (3)
CS7330 - Electronic Commerce - lecture (3)
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)CS7330 - Electronic Commerce - lecture (2)
CS7330 - Electronic Commerce - lecture (2)
Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)CS3270 - DATABASE SYSTEM - Lecture (2)
CS3270 - DATABASE SYSTEM - Lecture (2)
Dilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (2)
CS4443 - Modern Programming Language - I  Lecture (2)CS4443 - Modern Programming Language - I  Lecture (2)
CS4443 - Modern Programming Language - I Lecture (2)
Dilawar Khan
 
CS3270 - DATABASE SYSTEM - Lecture (1)
CS3270 - DATABASE SYSTEM -  Lecture (1)CS3270 - DATABASE SYSTEM -  Lecture (1)
CS3270 - DATABASE SYSTEM - Lecture (1)
Dilawar Khan
 
EE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course OutlineEE5440 – Computer Architecture Course Outline
EE5440 – Computer Architecture Course Outline
Dilawar Khan
 
CS4443 - Modern Programming Language I
CS4443 - Modern Programming Language ICS4443 - Modern Programming Language I
CS4443 - Modern Programming Language I
Dilawar Khan
 
CS3270 – Database Systems Course Outline
CS3270 – Database Systems Course OutlineCS3270 – Database Systems Course Outline
CS3270 – Database Systems Course Outline
Dilawar Khan
 
CS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course OutlineCS7330 Electronic Commerce Course Outline
CS7330 Electronic Commerce Course Outline
Dilawar Khan
 
CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)CS4443 - Modern Programming Language - I Lecture (1)
CS4443 - Modern Programming Language - I Lecture (1)
Dilawar Khan
 
CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)CS7330 - Electronic Commerce - lecture (1)
CS7330 - Electronic Commerce - lecture (1)
Dilawar Khan
 
Ad

Recently uploaded (20)

Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
E-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26ASE-Filing_of_Income_Tax.pptx and concept of form 26AS
E-Filing_of_Income_Tax.pptx and concept of form 26AS
Abinash Palangdar
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 

EE5440 – Computer Architecture - Lecture 1

  • 1. EE5440 COMPUTER ARCHITECTURE Mr. Dilawar Lecturer, Computer Science Faculty, Bakhtar University Kabul, Afghanistan.
  • 2. Course Objectives After successfully completing this course, you will be able to: • Understand the design of computer system and its components. • Understand different CPU design, ISA, addressing, and microprogramming. • Understand different memory management and I/O strategies and techniques.
  • 3. Course Outline • Basic Structure of Computers • Instruction Set Architecture • Basic I/O • I/O Organization • Basic Processing Unit • Computer Arithmetic • The Memory System
  • 4. Text Books to Follow • Computer Organization and Embedded Systems by C Hamacher, 6th Edition 2012. • Computer Organization and Architecture: Designing for Performance, by William Stallings 8th Edition, Prentice Hall. • Structured Computer Organization by Andrew S Tanenbaum 5th Edition.
  • 5. Basic Structure of Computers Chapter 1
  • 6. Lecture Outline • The different types of computers • The basic structure of a computer and its operation • Machine instructions and their execution • Integer, floating-point, and character representations • Addition and subtraction of binary numbers • Basic performance issues in computer systems • A brief history of computer development
  • 7. Computer Types • Since their introduction in the 1940s, digital computers have evolved into different types • Sze, cost, computational power, and intended use. • Modern computers can be divided into below categories • Embedded Computers • Personal Computers • Servers and Enterprise Systems • Supercomputers and Grid Computers • Emerging trend in access to computing facilities – cloud computing.
  • 8. Functional Units • Five functional parts • Input, memory, ALU, output, and CU. • Interconnection network • Exchange information and coordinate their actions.
  • 9. Functional Units • Information handled by computer • Instruction or data. • Instructions, are explicit commands • Transmission of information • Specify the AL operations. • Program, is a list of instructions which performs a task. • Data are numbers and characters used as operand by the instructions.
  • 10. Functional Units • Instructions must be encoded in a suitable format. • Most recent H/W employs digital circuits that have only two states. • Everything is encoded as string of binary digits called bits. • Having one of two values, 0 or 1.
  • 11. Functional Units Input Unit • Computers accept coded information though input units. • Keyboard, touchpad, mouse, joystick, and trackball. • Digital communication facilities, such as internet, can also provide input to a computer.
  • 12. Functional Units Memory Unit • Primary memory, also called main memory, is a fast memory that operates at electronic speeds. • Programs are stored while being executed. • Consist of large number of semiconductor storage cells, each capable of storing one bit of information. • Handled in groups of fixed size called words. • Number of bits in each word is referred to as word length, typically 16, 32, or 64 bits. • For access, each word in memory has a distinct address.
  • 13. Functional Units Memory Unit • Instructions and data can be written or read under the control of processor. • A memory in which any memory location can be accessed in a short of fixed amount of time after specifying its address is called RAM. • Memory access time, time required to access one word. • From few to 100ns – Independent of the location of word being accessed.
  • 14. Functional Units Cache Memory • Smaller, faster RAM unit, called cache. • Used to hold sections of a program that are currently being executed, along with any associated data. • Tightly coupled with the processor and is usually contained on the same integrated-circuit chip. • Suppose, execution of a number of execution in a program loop. • Cache hit and Cache miss operations.
  • 15. Functional Units Secondary Storage • Although primary memory is essential, expensive, and volatile. • Thus additional, less expensive, permanent secondary storage is used for large amount of data storage. • Access times are longer than as compare to primary memory. • Wide selection of devices such as • Magnetic disks, optical disks (DVD and CD), and flash memory devices.
  • 16. Functional Units Arithmetic and Logic Unit • Most computer operations are executed in ALU of the processor. • addition, subtraction, multiplication, division, or comparison of numbers. • When operands are brought into the processor, they are stored in high-speed storage elements called registers. • Access time is shorter as compare to other storage systems.
  • 17. Functional Units Output Unit • Counterpart of the input unit. • Sends processed results to the outside world such as printer and graphic displays. • Often, looks sometimes comes with dual functionality, I/O units.
  • 18. Functional Units Control Unit • The coordination of all the above units are handled through CU. • It is like a nerve center that sends control signals to other units and senses their states. • Processing cycle is all managed by control unit.
  • 19. Basic Operational Concepts • We have learned, • Activity is governed through instructions. • For performing a task, program is loaded into memory. • Individual instructions are brought to the processor for processing. • A typical instruction might be MOV R2, LOC ADD R4, R3 MOV LOC, R4
  • 20. Basic Operational Concepts • IR holds the instruction that is currently being executed. • PC contains the memory address of the next instruction to be fetched and executed. • R0 through Rn-1 are general purpose registers. • The processor-memory interface sends read and write control signals. • Use of interrupt signal and interrupt- service routine.
  • 21. Number Representation and Arithmetic Operations • The most natural way to represent a number in a computer system is by a string of bits, called a binary number. • We will have discussion on binary representation for Integers as its arithmetic operations and then floating-point numbers.
  • 22. Integers • A bit is the most basic unit of information in a computer. • It is a state of “on” or “off” in a digital circuit. • Or “high” or “low” voltage instead of “on” or “off.” • A byte is a group of eight bits. • A byte is the smallest possible addressable unit of computer storage. • A word is a contiguous group of bytes • Word sizes of 16, 32, or 64 bits are most common. • Usually a word represents a number or instruction.
  • 23. Integers • Start with the least significant bit (rightmost bit) • Add each pair of bits • Include the carry in the addition, if present 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 + 0 0 0 0 1 0 1 1 1 (4) (7) (11) carry: 01234bit position: 567
  • 24. Integers • There are three ways in which signed binary numbers may be expressed: • Signed magnitude, • One’s complement and • Two’s complement. • In an 8-bit word, signed magnitude representation places the absolute value of the number in the 7 bits to the right of the sign bit.
  • 25. Integers • Highest bit indicates the sign. 1 = negative, 0 = positive 1 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 sign bit Negative Positive
  • 26. Integers • Binary addition is as easy as it gets. You need to know only four rules: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 • The simplicity of this system makes it possible for digital circuits to carry out arithmetic operations. • We will describe these circuits in Chapter 3. 26 Let’s see how the addition rules work with signed magnitude numbers . . .
  • 27. Integers • Example: • Using signed magnitude binary arithmetic, find the sum of 75 and 46. • First, convert 75 and 46 to binary, and arrange as a sum, but separate the (positive) sign bits from the magnitude bits. 27 In this example, we were careful careful to pick two values whose sum would fit into seven bits. If that is not the case, we have a problem.
  • 28. Integers • Example: • Using signed magnitude binary arithmetic, find the sum of 107 and 46. • We see that the carry from the seventh bit overflows and is discarded, giving us the erroneous result: 107 + 46 = 25.
  • 29. Integers • Signed magnitude representation is easy for people to understand, but it requires complicated computer hardware. • Another disadvantage of signed magnitude is that it allows two different representations for zero: positive zero and negative zero. • For these reasons (among others) computers systems employ complement systems for numeric value representation. 29
  • 30. Integers • In complement systems, negative values are represented by some difference between a number and its base. • In diminished radix complement systems, a negative value is given by the difference between the absolute value of a number and one less than its base. • In the binary system, this gives us one’s complement. It amounts to little more than flipping the bits of a binary number. 30
  • 31. Integers • For example, in 8-bit one’s complement; • + 3 is: 00000011 • - 3 is: 11111100 • In one’s complement, as with signed magnitude, negative values are indicated by a 1 in the high order bit. • Complement systems are useful because they eliminate the need for special circuitry for subtraction. The difference of two values is found by adding the minuend to the complement of the subtrahend.
  • 32. Integers • With one’s complement addition, the carry bit is “carried around” and added to the sum. • Example: Using one’s complement binary arithmetic, find the sum of 48 and - 19 We note that 19 in one’s complement is 00010011, so -19 in one’s complement is: 11101100.
  • 33. Integers • Although the “end carry around” adds some complexity, one’s complement is simpler to implement than signed magnitude. • But it still has the disadvantage of having two different representations for zero: positive zero and negative zero. • Two’s complement solves this problem. • Two’s complement is the radix complement of the binary numbering system.
  • 34. Integers • To express a value in two’s complement: • If the number is positive, just convert it to binary and you’re done. • If the number is negative, find the one’s complement of the number and then add 1. • Example: • In 8-bit one’s complement, positive 3 is: 0 0 0 0 0 0 1 1 • Negative 3 in one’s complement is: 1 1 1 1 1 1 0 0 • Adding 1 gives us -3 in two’s complement form: 11111101.
  • 35. Integers starting value 00100100 = +36 step1: reverse the bits (1's complement) 11011011 step 2: add 1 to the value from step 1 + 1 sum = 2's complement representation 11011100 = -36 Sum of an integer and its 2's complement must be zero: 00100100 + 11011100 = 00000000 (8-bit sum)  Ignore Carry The easiest way to obtain the 2's complement of a binary number is by starting at the LSB, leaving all the 0s unchanged, look for the first occurrence of a 1. Leave this 1 unchanged and complement all the bits after it.
  • 36. Integers • With two’s complement arithmetic, all we do is add our two binary numbers. Just discard any carries emitting from the high order bit. We note that 19 in one’s complement is: 00010011, so -19 in one’s complement is: 11101100, and -19 in two’s complement is: 11101101. – Example: Using one’s complement binary arithmetic, find the sum of 48 and - 19.
  • 37. Integers • When we use any finite number of bits to represent a number, we always run the risk of the result of our calculations becoming too large to be stored in the computer. • While we can’t always prevent overflow, we can always detect overflow. • In complement arithmetic, an overflow condition is easy to detect.
  • 38. Integers • Example: • Using two’s complement binary arithmetic, find the sum of 107 and 46. • We see that the nonzero carry from the seventh bit overflows into the sign bit, giving us the erroneous result: 107 + 46 = -103. Rule for detecting two’s complement overflow: When the “carry in” and the “carry out” of the sign bit differ, overflow has occurred.
  • 39. Integers • When subtracting A – B, convert B to its 2's complement • Add A to (–B) 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 (2's complement) 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 (same result) – + • Carry is ignored, because • Negative number is sign-extended with 1's • You can imagine infinite 1's to the left of a negative number • Adding the carry to the extended 1's produces extended zeros
  • 40. Character Representation • ASCII is the most common encoding schema for characters. • Alphanumeric characters, operators, punctuation symbols, and control characters are represented by 7-bit codes. • A byte is used for the representation and storage. • The sequential increasing order of codes (alphabets and numeric) when changed to unsigned binary describes sorting operation. • The low-order four bits of the ASCII describes BCD code. • Code for 0 to 9 decimal digits.
  • 41. Performance • Measure of performance is how quickly it executes program. • Design of its instruction set, hardware and software, including OS and the technology in which the hardware is implemented. • By technology, processor and system organization – This section.
  • 42. Performance • Technology • VLSI is a critical factor of the speed of execution of machine instruction. • Switching between 0 and 1 in logic circuits is determined by size of transistors used. • Smaller transistors switch faster • Instructions can be executed faster and more transistors can be placed, leading to more logic functionality and more memory storage capacity. • Advances in fabrication technology over several decades have reduced transistor sizes dramatically.
  • 43. Performance • Parallelism • Performing number of operations in parallel. • Instruction-Level Parallelism – Pipelining. • complete all steps of the current instruction before starting the steps of the next instruction – execution of a sequence of instructions. • overlapping the execution of the steps of successive instruction to reduced total execution time. • Multicore Processors • Multiple processing units (core) on a single chip. • Dual-core, quad-core, and octo-core processors for chips having 2, 4, and 8 cores respectively.
  • 44. Performance • Parallelism • Multiprocessors • Many processors, each possibly containing multiple cores. • Shared-Memory multiprocessor. • In contrast, It is also possible to use an interconnected group of complete computers to achieve high total computational power. • Message-Passing multicomputer.
  • 45. Summery • The different types of computers • The basic structure of a computer and its operation • Machine instructions and their execution • Integer, floating-point, and character representations • Addition and subtraction of binary numbers • Basic performance issues in computer systems • A brief history of computer development
  • 46. Thank You For your Patience
  翻译: