SlideShare a Scribd company logo
1 of 43
Download to read offline
DATA MANIPULATION
1
2.1 COMPUTER ARCHITECTURE
Data Manipulation2
COMPUTER ARCHITECTURE
 Central Processing Unit (CPU)
 Arithmetic Logic Unit (ALU)
 Registers
 General-purpose
 Special-purpose
 Control Unit
 Input/output (I/O) Unit
2-3
MODERN INTEL AND AMD CPUS
Intel Core i7 AMD Phenom II X4
4
45NM PROCESSOR WAFER
2-5
Data Bus
Address Bus
Control Bus
1
2
3
0 4
5
6
7
9
A
B
8
E
F
C
D
CONSTITUENT COMPONENTS OF A CPU
I/O Unit
Control Unit
Program Counter (PC)
Instruction Register (IR)
Other Other
Other Other
Other Other
Registers
ALU
2-6
A BUS
2-7
COMPUTER BUSES
 Collection of wires that connect the components of
a computer to one another
 Address
 Data
 Control
 Power (usually ignored)
2-8
CPU AND MEMORY
CONNECTED VIA A BUS
S
y
s
t
e
m
M
e
m
o
r
y
CPU
Bus
2-9
ADDING TWO VALUES STORED IN SYSTEM MEMORY
IS A FIVE-STEP PROCESS
Step 1 Get the first value to be added from memory and store
it in a register.
Step 2 Get the second value to be added from memory and
store it in another register.
Step 3 Activate the circuitry in the ALU responsible for
addition. Add the values from Steps 1 & 2 and store
the sum in a third register.
Step 4 Write the contents of register holding the result back to
some address in memory.
Step 5 Halt.
2-10
STORED PROGRAMS
 Programs can be encoded as a sequence of bits
and stored in system memory
 Obvious today
 Not always so
 Early computers were hard-wired
 Difficult to re-program
 von Neumann architecture
 Memory is an array of individually-addressable cells that
store both instructions and data
 Control unit interprets and executes instructions
2-11
ENIAC BEING PROGRAMMED
BY EARLY COMPUTERS
2-12
VON NEUMANN ARCHITECTURE
S
y
s
t
e
m
M
e
m
o
r
y
I
/
O
D
e
v
i
c
e
s
ALU
Control
Unit
CPU
2-13
TYPES OF MEMORY
Registers
Cache
System Memory
Mass Storage
P
r
i
c
e
Q
u
a
n
t
i
t
y
S
p
e
e
d
2-14
2.2 MACHINE LANGUAGE
Data Manipulation15
MACHINE LANGUAGE
 Machine instruction: a command recognized by the
CPU and encoded as a bit pattern
 Machine language: the set of machine instructions
a particular CPU recognizes
 Flavors:
 Reduced Instruction Set Computer (RISC)
 Complex Instruction Set Computer (CISC)
 Instruction categories:
 Data transfer
 Arithmetic/logic
 Control 2-16
EXAMPLE: DIVIDING VALUES STORED IN MEMORY
Step 1 LOAD a register with value from memory.
Step 2 LOAD another register with another value from
memory.
Step 3 If this second value equals zero, JUMP to Step 6.
Step 4 Divide the contents of the first register by the contents
of the second register putting the quotient in a third
register.
Step 5 Store the contents of the third register in memory.
Step 6 HALT.
2-17
AN ILLUSTRATIVE MACHINE LANGUAGE
 We will be using the hypothetical machine
described in Appendix C of the book:
 16 one-byte, general-purpose registers
 256 one-byte memory cells
 Two-byte instructions
2-18
ARCHITECTURE OF THE MACHINE IN
APPENDIX C
Registers
ALU
Control Unit
PC
IR
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
2-19
INSTRUCTION AND DATA TEMPLATES
0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1
1 1 0 0 1 0 0 00 1 0 1 0 1 1 1
opcode operand operand operand
Instruction Template
mantissaexponent
exponent
Integer Template Floating-Point Template
2-20
EXAMPLE: ADDING VALUES STORED IN MEMORY
Encoded
Instruction
Translation
156C LOAD register 5 with the bit pattern found at address
6C.
166D LOAD register 6 with the bit pattern found at address
6D.
5056 ADD contents of registers 5 and 6 and put the sum in
register 0.
306E STORE the contents of register 0 in address 6E.
C000 HALT.
2-21
2.3 PROGRAM EXECUTION
Data Manipulation22
THE MACHINE CYCLE
Fetch
• [PC] → IR
• Increment PC
Decode
• Interpret IR
• Fetch operand(s)
Execute
• Carry out
instruction
2-23
PROGRAMS VS DATA
 Everything in memory is encoded in strings of 1’s
and 0’s
 There is no differentiation between data and code
 The control unit interprets the contents of certain
cells as instructions and other cells as data
 Programs can even modify themselves during execution
2-24
EXAMPLE PROGRAM WALK-THROUGH (PG. 98)
Registers
ALU
Control Unit
PC
IR
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
2-25
2.4 ARITHMETIC/LOGIC INSTRUCTIONS
Data Manipulation26
LOGICAL OPERATIONS
1 0 0 1 1 0 1 0
AND 1 1 0 0 1 0 0 1
1 0 0 0 1 0 0 0
1 0 0 1 1 0 1 0
XOR 1 1 0 0 1 0 0 1
0 1 0 1 0 0 1 1
1 0 0 1 1 0 1 0
OR 1 1 0 0 1 0 0 1
1 1 0 1 1 0 1 1
2-27
BIT MAPS
 A bit map is a way of using a value in the computer
by assigning each bit in the value some meaning
 We could store the day of the week in a byte
7 6 5 4 3 2 1 0
NotUsed
Saturday
Friday
Thursday
Wednesday
Tuesday
Monday
Sunday
2-28
MASKS
 Using a mask we can extract the status of any
given bit(s) in a string of bits
 The following example tests to see if it’s Friday yet:
Bit Map 0 0 0 0 0 0 1 0
Mask (AND) 0 0 1 0 0 0 0 0
Result 0 0 0 0 0 0 0 0
2-29
BIT SHIFTING
 Circular Shifts
 Also called rotations
 Logical Shifts
 Left or right
 Also called arithmetic shifts
2-30
2.5 COMMUNICATING WITH
OTHER DEVICES
Data Manipulation31
CONTROLLERS ATTACHED TO A
MACHINE’S BUS
2-32
MOTHERBOARD
BLOCK DIAGRAM
2-33
X58 CHIPSET ARCHITECTURE
2-34
MEMORY-MAPPED I/O
 In many computers I/O devices are read from and
written just as memory is
 A certain amount of address space is set aside for
communicating with memory-mapped devices
 These addresses reside at the top of the addressable
memory range
 232 = 4,294,967,296 or 4,096 MB
 264 = 18,446,744,073,709,551,616
 18 quintillion bytes
 18 petabytes PB
 17,592,186,044,416 MB
2-35
MISSING RAM
2-36
DIRECT MEMORY ACCESS (DMA)
 Allows certain hardware subsystems to access
system memory independently of the CPU
 Historically the CPU would have been responsible
for every bit transferred in the computer
 DMA allows peripherals to transfer blocks of data to
and form memory without CPU intervention
2-37
HANDSHAKING
 Two-way communication between the processor
and a peripheral device
 Status word: a bit map used to communicate
between the system and the external device
 One bit may indicate an out-of-paper error
 Another signals the printer is ready for more data
 The controller monitors the status and passes
important messages along to the CPU
2-38
PARALLEL VS SERIAL COMMUNICATION
 1-bit at a time
 Simple to implement
 Lower bandwidth than
parallel
 Able to transmit over
longer distances than
parallel
 Multiple bits at a time
 Higher bandwidth than
serial
 Trickier to implement
 Limited distance
 Propagation delay
 “Noisy”
 Mutual inductance
 Capacitance
Serial Parallel
39
2.6 OTHER ARCHITECTURES
Data Manipulation41
PIPELINING
 Technique for speeding up execution of a program
 Each stage of the machine cycle can run in parallel
on different instructions
 Bubbles
 Stalls
 Bad prediction
2-42
PIPELINING
t0 t1 t2 t3 t4 t5 t6 t7 t8
Fetch
Decode
Execute
Write
Completed
Fetch
Decode
Execute
Write
Completed
Without
Pipelining
With
Pipelining
2-43
PARALLEL PROCESSING AND
MULTIPROCESSOR MACHINES
 Parallel processing means to execute multiple
threads or processes simultaneously
 Pipelining is a step in this direction
 True parallel processing require more than one
CPU
 Several strategies
 Multiple, independent processors sharing memory while
executing separate processes
 Multiple cores operating on the same data at the same
time executing the same set of instructions
 A single core operating on multiple data sets at the
same time 2-44

More Related Content

What's hot

Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An IntroductionDilum Bandara
 
Module 5 part1
Module 5 part1Module 5 part1
Module 5 part1cs19club
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Rai University
 
MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .Muhammad Umar
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorMayank Roy
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processorMuhammad Ishaq
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4Umang Gupta
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Student
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COAJay Patel
 
Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris manoKIRTI89
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris manovishnu murthy
 

What's hot (20)

Control unit
Control unitControl unit
Control unit
 
Computer Architecture – An Introduction
Computer Architecture – An IntroductionComputer Architecture – An Introduction
Computer Architecture – An Introduction
 
Module 5 part1
Module 5 part1Module 5 part1
Module 5 part1
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
 
MicroProgrammed Explained .
MicroProgrammed Explained .MicroProgrammed Explained .
MicroProgrammed Explained .
 
Lec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processorLec 12-15 mips instruction set processor
Lec 12-15 mips instruction set processor
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Parallel processing and pipelining
Parallel processing and pipeliningParallel processing and pipelining
Parallel processing and pipelining
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
CO By Rakesh Roshan
CO By Rakesh RoshanCO By Rakesh Roshan
CO By Rakesh Roshan
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
Intro to cao &store program
Intro to cao &store programIntro to cao &store program
Intro to cao &store program
 
15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA15 control-computer organization and archietecture-CO-COA
15 control-computer organization and archietecture-CO-COA
 
Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris mano
 
Control unit
Control unitControl unit
Control unit
 
Computer organisation -morris mano
Computer organisation  -morris manoComputer organisation  -morris mano
Computer organisation -morris mano
 
Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 

Viewers also liked

Cs160 chapter 3
Cs160 chapter 3Cs160 chapter 3
Cs160 chapter 3Joe Paris
 
Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Lino Hugun Saputra
 
Data transfer system
Data transfer systemData transfer system
Data transfer systemSajan Sahu
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithmsBhatt Aadil
 
Data transfer scheme
Data transfer schemeData transfer scheme
Data transfer schemerockymani
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layersambhenilesh
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferAnuj Modi
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmfarimoin
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulationSanjeev Patel
 

Viewers also liked (11)

Cs160 chapter 3
Cs160 chapter 3Cs160 chapter 3
Cs160 chapter 3
 
Program control
Program controlProgram control
Program control
 
Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500Data Manipulation and Math Instruction on RSLogix 500
Data Manipulation and Math Instruction on RSLogix 500
 
Data transfer system
Data transfer systemData transfer system
Data transfer system
 
Routing and routing algorithms
Routing and routing algorithmsRouting and routing algorithms
Routing and routing algorithms
 
Data transfer scheme
Data transfer schemeData transfer scheme
Data transfer scheme
 
Routing algorithm network layer
Routing algorithm  network layerRouting algorithm  network layer
Routing algorithm network layer
 
Data transferschemes
Data transferschemesData transferschemes
Data transferschemes
 
Synchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transferSynchronous and-asynchronous-data-transfer
Synchronous and-asynchronous-data-transfer
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Data transfer and manipulation
Data transfer and manipulationData transfer and manipulation
Data transfer and manipulation
 

Similar to Cs160 chapter 2

Data Manipulation
Data ManipulationData Manipulation
Data ManipulationAsfi Bhai
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessorankitnav1
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessorankitnav1
 
Microprocessor (1)
Microprocessor (1)Microprocessor (1)
Microprocessor (1)Muhd Azlan
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copymkazree
 
Verilog Implementation of 32-Bit CISC Processor
Verilog Implementation of 32-Bit CISC ProcessorVerilog Implementation of 32-Bit CISC Processor
Verilog Implementation of 32-Bit CISC ProcessorIJERA Editor
 
soc ip core based for spacecraft application
soc ip core based for spacecraft applicationsoc ip core based for spacecraft application
soc ip core based for spacecraft applicationnavyashree pari
 
DCS ( Distributed Control System )
DCS ( Distributed Control System )DCS ( Distributed Control System )
DCS ( Distributed Control System )Automation123
 
VJITSk 6713 user manual
VJITSk 6713 user manualVJITSk 6713 user manual
VJITSk 6713 user manualkot seelam
 
unit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxunit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxKandavelEee
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_controlBhukya Mangu
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processors9007912
 
Introduction to uP-Chadasdffpter I-3.ppt
Introduction to uP-Chadasdffpter I-3.pptIntroduction to uP-Chadasdffpter I-3.ppt
Introduction to uP-Chadasdffpter I-3.pptYAGYABAHADURSHAHI
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 vijaydeepakg
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptSaurabhPorwal14
 

Similar to Cs160 chapter 2 (20)

Data Manipulation
Data ManipulationData Manipulation
Data Manipulation
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
 
Introduction to-microprocessor
Introduction to-microprocessorIntroduction to-microprocessor
Introduction to-microprocessor
 
Microprocessor (1)
Microprocessor (1)Microprocessor (1)
Microprocessor (1)
 
Chp1 68000 microprocessor copy
Chp1 68000 microprocessor   copyChp1 68000 microprocessor   copy
Chp1 68000 microprocessor copy
 
Verilog Implementation of 32-Bit CISC Processor
Verilog Implementation of 32-Bit CISC ProcessorVerilog Implementation of 32-Bit CISC Processor
Verilog Implementation of 32-Bit CISC Processor
 
soc ip core based for spacecraft application
soc ip core based for spacecraft applicationsoc ip core based for spacecraft application
soc ip core based for spacecraft application
 
Microcontroller part 1
Microcontroller part 1Microcontroller part 1
Microcontroller part 1
 
Dcs write up
Dcs write upDcs write up
Dcs write up
 
DCS ( Distributed Control System )
DCS ( Distributed Control System )DCS ( Distributed Control System )
DCS ( Distributed Control System )
 
VJITSk 6713 user manual
VJITSk 6713 user manualVJITSk 6713 user manual
VJITSk 6713 user manual
 
Lect11 organization
Lect11 organizationLect11 organization
Lect11 organization
 
01 - Computer System
01 - Computer System01 - Computer System
01 - Computer System
 
unit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptxunit 1ARM INTRODUCTION.pptx
unit 1ARM INTRODUCTION.pptx
 
Processor2
Processor2Processor2
Processor2
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
 
Introduction to uP-Chadasdffpter I-3.ppt
Introduction to uP-Chadasdffpter I-3.pptIntroduction to uP-Chadasdffpter I-3.ppt
Introduction to uP-Chadasdffpter I-3.ppt
 
Sudhir tms 320 f 2812
Sudhir tms 320 f 2812 Sudhir tms 320 f 2812
Sudhir tms 320 f 2812
 
pdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.pptpdfslide.net_morris-mano-ppt.ppt
pdfslide.net_morris-mano-ppt.ppt
 

Recently uploaded

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Recently uploaded (20)

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

Cs160 chapter 2

  • 3. COMPUTER ARCHITECTURE  Central Processing Unit (CPU)  Arithmetic Logic Unit (ALU)  Registers  General-purpose  Special-purpose  Control Unit  Input/output (I/O) Unit 2-3
  • 4. MODERN INTEL AND AMD CPUS Intel Core i7 AMD Phenom II X4 4
  • 6. Data Bus Address Bus Control Bus 1 2 3 0 4 5 6 7 9 A B 8 E F C D CONSTITUENT COMPONENTS OF A CPU I/O Unit Control Unit Program Counter (PC) Instruction Register (IR) Other Other Other Other Other Other Registers ALU 2-6
  • 8. COMPUTER BUSES  Collection of wires that connect the components of a computer to one another  Address  Data  Control  Power (usually ignored) 2-8
  • 9. CPU AND MEMORY CONNECTED VIA A BUS S y s t e m M e m o r y CPU Bus 2-9
  • 10. ADDING TWO VALUES STORED IN SYSTEM MEMORY IS A FIVE-STEP PROCESS Step 1 Get the first value to be added from memory and store it in a register. Step 2 Get the second value to be added from memory and store it in another register. Step 3 Activate the circuitry in the ALU responsible for addition. Add the values from Steps 1 & 2 and store the sum in a third register. Step 4 Write the contents of register holding the result back to some address in memory. Step 5 Halt. 2-10
  • 11. STORED PROGRAMS  Programs can be encoded as a sequence of bits and stored in system memory  Obvious today  Not always so  Early computers were hard-wired  Difficult to re-program  von Neumann architecture  Memory is an array of individually-addressable cells that store both instructions and data  Control unit interprets and executes instructions 2-11
  • 12. ENIAC BEING PROGRAMMED BY EARLY COMPUTERS 2-12
  • 14. TYPES OF MEMORY Registers Cache System Memory Mass Storage P r i c e Q u a n t i t y S p e e d 2-14
  • 15. 2.2 MACHINE LANGUAGE Data Manipulation15
  • 16. MACHINE LANGUAGE  Machine instruction: a command recognized by the CPU and encoded as a bit pattern  Machine language: the set of machine instructions a particular CPU recognizes  Flavors:  Reduced Instruction Set Computer (RISC)  Complex Instruction Set Computer (CISC)  Instruction categories:  Data transfer  Arithmetic/logic  Control 2-16
  • 17. EXAMPLE: DIVIDING VALUES STORED IN MEMORY Step 1 LOAD a register with value from memory. Step 2 LOAD another register with another value from memory. Step 3 If this second value equals zero, JUMP to Step 6. Step 4 Divide the contents of the first register by the contents of the second register putting the quotient in a third register. Step 5 Store the contents of the third register in memory. Step 6 HALT. 2-17
  • 18. AN ILLUSTRATIVE MACHINE LANGUAGE  We will be using the hypothetical machine described in Appendix C of the book:  16 one-byte, general-purpose registers  256 one-byte memory cells  Two-byte instructions 2-18
  • 19. ARCHITECTURE OF THE MACHINE IN APPENDIX C Registers ALU Control Unit PC IR 0 1 2 3 4 5 6 7 8 9 A B C D E F 2-19
  • 20. INSTRUCTION AND DATA TEMPLATES 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 1 1 0 0 1 0 0 00 1 0 1 0 1 1 1 opcode operand operand operand Instruction Template mantissaexponent exponent Integer Template Floating-Point Template 2-20
  • 21. EXAMPLE: ADDING VALUES STORED IN MEMORY Encoded Instruction Translation 156C LOAD register 5 with the bit pattern found at address 6C. 166D LOAD register 6 with the bit pattern found at address 6D. 5056 ADD contents of registers 5 and 6 and put the sum in register 0. 306E STORE the contents of register 0 in address 6E. C000 HALT. 2-21
  • 22. 2.3 PROGRAM EXECUTION Data Manipulation22
  • 23. THE MACHINE CYCLE Fetch • [PC] → IR • Increment PC Decode • Interpret IR • Fetch operand(s) Execute • Carry out instruction 2-23
  • 24. PROGRAMS VS DATA  Everything in memory is encoded in strings of 1’s and 0’s  There is no differentiation between data and code  The control unit interprets the contents of certain cells as instructions and other cells as data  Programs can even modify themselves during execution 2-24
  • 25. EXAMPLE PROGRAM WALK-THROUGH (PG. 98) Registers ALU Control Unit PC IR 0 1 2 3 4 5 6 7 8 9 A B C D E F 2-25
  • 27. LOGICAL OPERATIONS 1 0 0 1 1 0 1 0 AND 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 0 0 1 1 0 1 0 XOR 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 1 0 OR 1 1 0 0 1 0 0 1 1 1 0 1 1 0 1 1 2-27
  • 28. BIT MAPS  A bit map is a way of using a value in the computer by assigning each bit in the value some meaning  We could store the day of the week in a byte 7 6 5 4 3 2 1 0 NotUsed Saturday Friday Thursday Wednesday Tuesday Monday Sunday 2-28
  • 29. MASKS  Using a mask we can extract the status of any given bit(s) in a string of bits  The following example tests to see if it’s Friday yet: Bit Map 0 0 0 0 0 0 1 0 Mask (AND) 0 0 1 0 0 0 0 0 Result 0 0 0 0 0 0 0 0 2-29
  • 30. BIT SHIFTING  Circular Shifts  Also called rotations  Logical Shifts  Left or right  Also called arithmetic shifts 2-30
  • 31. 2.5 COMMUNICATING WITH OTHER DEVICES Data Manipulation31
  • 32. CONTROLLERS ATTACHED TO A MACHINE’S BUS 2-32
  • 35. MEMORY-MAPPED I/O  In many computers I/O devices are read from and written just as memory is  A certain amount of address space is set aside for communicating with memory-mapped devices  These addresses reside at the top of the addressable memory range  232 = 4,294,967,296 or 4,096 MB  264 = 18,446,744,073,709,551,616  18 quintillion bytes  18 petabytes PB  17,592,186,044,416 MB 2-35
  • 37. DIRECT MEMORY ACCESS (DMA)  Allows certain hardware subsystems to access system memory independently of the CPU  Historically the CPU would have been responsible for every bit transferred in the computer  DMA allows peripherals to transfer blocks of data to and form memory without CPU intervention 2-37
  • 38. HANDSHAKING  Two-way communication between the processor and a peripheral device  Status word: a bit map used to communicate between the system and the external device  One bit may indicate an out-of-paper error  Another signals the printer is ready for more data  The controller monitors the status and passes important messages along to the CPU 2-38
  • 39. PARALLEL VS SERIAL COMMUNICATION  1-bit at a time  Simple to implement  Lower bandwidth than parallel  Able to transmit over longer distances than parallel  Multiple bits at a time  Higher bandwidth than serial  Trickier to implement  Limited distance  Propagation delay  “Noisy”  Mutual inductance  Capacitance Serial Parallel 39
  • 41. PIPELINING  Technique for speeding up execution of a program  Each stage of the machine cycle can run in parallel on different instructions  Bubbles  Stalls  Bad prediction 2-42
  • 42. PIPELINING t0 t1 t2 t3 t4 t5 t6 t7 t8 Fetch Decode Execute Write Completed Fetch Decode Execute Write Completed Without Pipelining With Pipelining 2-43
  • 43. PARALLEL PROCESSING AND MULTIPROCESSOR MACHINES  Parallel processing means to execute multiple threads or processes simultaneously  Pipelining is a step in this direction  True parallel processing require more than one CPU  Several strategies  Multiple, independent processors sharing memory while executing separate processes  Multiple cores operating on the same data at the same time executing the same set of instructions  A single core operating on multiple data sets at the same time 2-44