SlideShare a Scribd company logo
1 of 21
CS307PC:Computer Organization
and Architecture (R18 II(I sem))
Department of computer science and engineering
(AI/ML)
Session 4
by
Asst.Prof.M.Gokilavani
VITS
11/23/2022 Department of CSE (AI/ML) 1
TEXT BOOK:
• 1. Computer System Architecture – M. Moris Mano, Third Edition,
Pearson/PHI.
REFERENCES:
• Computer Organization – Car Hamacher, Zvonks Vranesic, Safea
Zaky, Vth Edition, McGraw Hill.
• Computer Organization and Architecture – William Stallings Sixth
Edition, Pearson/PHI.
• Structured Computer Organization – Andrew S. Tanenbaum, 4th
Edition, PHI/Pearson.
11/23/2022 Department of CSE (AI/ML) 2
UNIT - I
11/23/2022 Department of CSE (AI/ML) 3
Digital Computers: Introduction, Block diagram of Digital Computer,
Definition of Computer Organization, Computer Design and Computer
Architecture.
Register Transfer Language and Micro operations: Register Transfer
language, Register Transfer, Bus and memory transfers, Arithmetic
Micro operations, logic micro operations, shift micro operations,
Arithmetic logic shift unit.
Basic Computer Organization and Design: Instruction codes,
Computer Registers Computer instructions, Timing and Control,
Instruction cycle, Memory Reference Instructions, Input – Output and
Interrupt.
Topics covered in session 4
• Register Transfer Language and Micro operations
• Register Transfer language
• Register Transfer
• Bus and memory transfers
• Arithmetic Micro operations
• logic micro operations
• shift micro operations
• Arithmetic logic shift unit
11/23/2022 Department of CSE (AI/ML) 4
Logic Micro Operation
• Logic micro operations specify binary operations for string of bits
stored in registers.
• These operations consider each bit of the register separately and treat
them as binary variables.
• For example : The Exclusive-OR micro operation with the contents of
two registers R1 and R2 is symbolized by the statement
• It specifies a logic micro operation to b executed on the individual bits
of th registers provided that the control variable P=1.
11/23/2022 Department of CSE (AI/ML) 5
Logic Micro Operation
• As a numerical example, assume that each register has four digits. Let the content
of R1 be 1010 and the content of R2 be 1100. The Exclusive- OR micro operation
stated above symbolizes the following logic computation:
• Special symbol are used for logical operations.
• Ʌ Denotes AND symbol and V denotes OR operation.
• When + symbol occur in micro operation if denotes arithmetic addition but it
control signals it denote the OR.
11/23/2022 Department of CSE (AI/ML) 6
List of Logic Micro Operation
11/23/2022 Department of CSE (AI/ML) 7
• There are 16 different logic operations that can be performed with two binary
variables.
• They can be determined from all possible truth tables obtained with two binary
variables as shown in Table.
• In this table, each of the 16 columns F0 through F15 represents a truth table of
one possible Boolean function for the two variables x and y.
11/23/2022 Department of CSE (AI/ML) 8
Hardware Implementation
11/23/2022 Department of CSE (AI/ML) 9
• Although there are 16 logic micro operations, most computers use only four — AND, OR, XOR (exclusive-OR),
and complement from which all others can be derived. Figure shows one stage of a circuit that generates the four
basic logic micro operations.
Other Applications
• Logic micro operations can be used to manipulate individual bits or a
portion of word in a register.
• Consider the data in a register A. In another register B is bit data that
will be used to modify the content of A.
11/23/2022 Department of CSE (AI/ML) 10
Other Applications
1. In a selective set operation, the bit pattern in B is used to set certain bits in A
(logic OR operation)
If a bit in B is set to 1, that same position in A gets set to 1, otherwise that bit in A
keeps its previous value.
2. In a selective complement operation, the bit pattern in B is used to complement
certain bits in A
(logic Ex-OR operation)
If a bit in B is set to 1, that same position in A gets complemented from its original
value, otherwise it is unchanged.
11/23/2022 Department of CSE (AI/ML) 11
Other Applications
3. In a selective clear operation, the bit pattern in B is used to clear certain bits in
A
(B’s one’s Complement)
If a bit in B is set to 1, that same position in A gets set to 0, otherwise it is
unchanged.
4. In a mask operation, the bit pattern in B is used to clear certain bits in AAt
(AND operation)
If a bit in B is set to 0, that same position in A gets set to 0, otherwise it is
unchanged.
11/23/2022 Department of CSE (AI/ML) 12
Other Applications
• In a clear operation, if the bits in the same position in A and B are the same, they
are cleared in A, otherwise they are set in A
• An insert operation is used to introduce a specific bit pattern into A register, leaving the
other bit positions unchanged. This is done as
• A mask operation to clear the desired bit positions, followed by
• An OR operation to introduce the new bits into the desired positions.
11/23/2022 Department of CSE (AI/ML) 13
Shift Micro Operations
11/23/2022 Department of CSE (AI/ML) 14
• Shift micro operations are used for serial transfer of data.
• They are also used in conjunction with arithmetic, logic, and other data-processing
operations. The contents of a register can be shifted to the left or the right.
• During a shift-left operation the serial input transfers a bit into the rightmost
position. During a shift-right operation the serial input transfers a bit into the
leftmost position.
• There are three types of shifts:
• Logical
• Circular
• arithmetic
Logical Shift
• A logical shift is one that transfers 0 through the serial input.
• We will adopt the symbols shl and shr for logical shift-left and shift-right micro
operations.
• Logical shift-left
• Logical shift-Right
• For Example,
11/23/2022 Department of CSE (AI/ML) 15
Circular Shift
• In a circular shift the serial input is the bit that is shifted out of the other end of the
register.
• We will adopt the symbols cil and cir for logical shift-left and shift-right micro
operations.
• Circular shift-left
• Circular shift-right
• For Example,
11/23/2022 Department of CSE (AI/ML) 16
ARITHMETIC SHIFT
• An arithmetic shift is meant for signed binary numbers (integer)
• An arithmetic left shift multiplies a signed number by two
• An arithmetic right shift divides a signed number by two
• Sign bit : 0 for positive and 1 for negative
• The main distinction of an arithmetic shift is that it must keep the sign of the
number the same as it performs the multiplication or division.
A right arithmetic shift operation:
A left arithmetic shift operation:
11/23/2022 Department of CSE (AI/ML) 17
ARITHMETIC SHIFT
• An left arithmetic shift operation must be checked for the overflow.
• In a RTL, the following notation is used
• ashl for an arithmetic shift left
• ashr for an arithmetic shift right
For Example:
11/23/2022 Department of CSE (AI/ML) 18
Hardware Implementation
11/23/2022 Department of CSE (AI/ML) 19
Arithmetic Logic Shift Unit
11/23/2022 Department of CSE (AI/ML) 20
Topics to be covered in next session 5
• Basic computer organization and design
11/23/2022 Department of CSE (AI/ML) 21
Thank you!!!

More Related Content

Similar to CS304PC:Computer Organization and Architecture Session 4 Arithmetic shift logic unit .pptx

CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...
CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...
CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...Asst.prof M.Gokilavani
 
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...Asst.prof M.Gokilavani
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085Mani Afranzio
 
Shift Microoperations by Pir Sarfraz RSDT larkana
Shift Microoperations by Pir Sarfraz RSDT larkanaShift Microoperations by Pir Sarfraz RSDT larkana
Shift Microoperations by Pir Sarfraz RSDT larkanaPir Sarfraz Ahmed
 
Morris Mano Chapter 08 (Register Transfer Logic).pdf
Morris Mano Chapter 08 (Register Transfer Logic).pdfMorris Mano Chapter 08 (Register Transfer Logic).pdf
Morris Mano Chapter 08 (Register Transfer Logic).pdfMamunIslam20
 
Module 5 part1
Module 5 part1Module 5 part1
Module 5 part1cs19club
 
Chapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional InstructionsChapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional Instructionscmkandemir
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperationsmahesh kumar prajapat
 
arithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxarithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxAshokRachapalli1
 
Register transfer and micro operation
Register transfer and micro operationRegister transfer and micro operation
Register transfer and micro operationKamal Acharya
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller nitugatkal
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operationsLakshya Sharma
 
IRJET- To Design 16 bit Synchronous Microprocessor using VHDL on FPGA
IRJET-  	  To Design 16 bit Synchronous Microprocessor using VHDL on FPGAIRJET-  	  To Design 16 bit Synchronous Microprocessor using VHDL on FPGA
IRJET- To Design 16 bit Synchronous Microprocessor using VHDL on FPGAIRJET Journal
 
CS304PC:Computer Organization and Architecture Session 10 design of control ...
CS304PC:Computer Organization and Architecture  Session 10 design of control ...CS304PC:Computer Organization and Architecture  Session 10 design of control ...
CS304PC:Computer Organization and Architecture Session 10 design of control ...Asst.prof M.Gokilavani
 

Similar to CS304PC:Computer Organization and Architecture Session 4 Arithmetic shift logic unit .pptx (20)

Bt0068
Bt0068Bt0068
Bt0068
 
CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...
CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...
CS304PC:Computer Organization and Architecture Session 19 Addition and subtra...
 
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
CS304PC:Computer Organization and Architecture Session 20 Multiplication algo...
 
Co ppt
Co pptCo ppt
Co ppt
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
 
Shift Microoperations by Pir Sarfraz RSDT larkana
Shift Microoperations by Pir Sarfraz RSDT larkanaShift Microoperations by Pir Sarfraz RSDT larkana
Shift Microoperations by Pir Sarfraz RSDT larkana
 
Morris Mano Chapter 08 (Register Transfer Logic).pdf
Morris Mano Chapter 08 (Register Transfer Logic).pdfMorris Mano Chapter 08 (Register Transfer Logic).pdf
Morris Mano Chapter 08 (Register Transfer Logic).pdf
 
Module 5 part1
Module 5 part1Module 5 part1
Module 5 part1
 
RTL
RTLRTL
RTL
 
Chapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional InstructionsChapter 7 - Programming Techniques with Additional Instructions
Chapter 7 - Programming Techniques with Additional Instructions
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperations
 
arithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxarithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptx
 
Register transfer and micro operation
Register transfer and micro operationRegister transfer and micro operation
Register transfer and micro operation
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operations
 
Microoperations
MicrooperationsMicrooperations
Microoperations
 
IRJET- To Design 16 bit Synchronous Microprocessor using VHDL on FPGA
IRJET-  	  To Design 16 bit Synchronous Microprocessor using VHDL on FPGAIRJET-  	  To Design 16 bit Synchronous Microprocessor using VHDL on FPGA
IRJET- To Design 16 bit Synchronous Microprocessor using VHDL on FPGA
 
CS304PC:Computer Organization and Architecture Session 10 design of control ...
CS304PC:Computer Organization and Architecture  Session 10 design of control ...CS304PC:Computer Organization and Architecture  Session 10 design of control ...
CS304PC:Computer Organization and Architecture Session 10 design of control ...
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Uc 2(vii)
Uc 2(vii)Uc 2(vii)
Uc 2(vii)
 

More from Asst.prof M.Gokilavani

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfAsst.prof M.Gokilavani
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfAsst.prof M.Gokilavani
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAsst.prof M.Gokilavani
 
AI3391 Artificial Intelligence Session 25 Horn clause.pptx
AI3391 Artificial Intelligence Session 25 Horn clause.pptxAI3391 Artificial Intelligence Session 25 Horn clause.pptx
AI3391 Artificial Intelligence Session 25 Horn clause.pptxAsst.prof M.Gokilavani
 

More from Asst.prof M.Gokilavani (20)

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdf
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notes
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
 
GE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdfGE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdf
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdf
 
GE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _NotesGE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _Notes
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptx
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptx
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptx
 
AI3391 Artificial Intelligence Session 25 Horn clause.pptx
AI3391 Artificial Intelligence Session 25 Horn clause.pptxAI3391 Artificial Intelligence Session 25 Horn clause.pptx
AI3391 Artificial Intelligence Session 25 Horn clause.pptx
 

Recently uploaded

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 

Recently uploaded (20)

Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 

CS304PC:Computer Organization and Architecture Session 4 Arithmetic shift logic unit .pptx

  • 1. CS307PC:Computer Organization and Architecture (R18 II(I sem)) Department of computer science and engineering (AI/ML) Session 4 by Asst.Prof.M.Gokilavani VITS 11/23/2022 Department of CSE (AI/ML) 1
  • 2. TEXT BOOK: • 1. Computer System Architecture – M. Moris Mano, Third Edition, Pearson/PHI. REFERENCES: • Computer Organization – Car Hamacher, Zvonks Vranesic, Safea Zaky, Vth Edition, McGraw Hill. • Computer Organization and Architecture – William Stallings Sixth Edition, Pearson/PHI. • Structured Computer Organization – Andrew S. Tanenbaum, 4th Edition, PHI/Pearson. 11/23/2022 Department of CSE (AI/ML) 2
  • 3. UNIT - I 11/23/2022 Department of CSE (AI/ML) 3 Digital Computers: Introduction, Block diagram of Digital Computer, Definition of Computer Organization, Computer Design and Computer Architecture. Register Transfer Language and Micro operations: Register Transfer language, Register Transfer, Bus and memory transfers, Arithmetic Micro operations, logic micro operations, shift micro operations, Arithmetic logic shift unit. Basic Computer Organization and Design: Instruction codes, Computer Registers Computer instructions, Timing and Control, Instruction cycle, Memory Reference Instructions, Input – Output and Interrupt.
  • 4. Topics covered in session 4 • Register Transfer Language and Micro operations • Register Transfer language • Register Transfer • Bus and memory transfers • Arithmetic Micro operations • logic micro operations • shift micro operations • Arithmetic logic shift unit 11/23/2022 Department of CSE (AI/ML) 4
  • 5. Logic Micro Operation • Logic micro operations specify binary operations for string of bits stored in registers. • These operations consider each bit of the register separately and treat them as binary variables. • For example : The Exclusive-OR micro operation with the contents of two registers R1 and R2 is symbolized by the statement • It specifies a logic micro operation to b executed on the individual bits of th registers provided that the control variable P=1. 11/23/2022 Department of CSE (AI/ML) 5
  • 6. Logic Micro Operation • As a numerical example, assume that each register has four digits. Let the content of R1 be 1010 and the content of R2 be 1100. The Exclusive- OR micro operation stated above symbolizes the following logic computation: • Special symbol are used for logical operations. • Ʌ Denotes AND symbol and V denotes OR operation. • When + symbol occur in micro operation if denotes arithmetic addition but it control signals it denote the OR. 11/23/2022 Department of CSE (AI/ML) 6
  • 7. List of Logic Micro Operation 11/23/2022 Department of CSE (AI/ML) 7 • There are 16 different logic operations that can be performed with two binary variables. • They can be determined from all possible truth tables obtained with two binary variables as shown in Table. • In this table, each of the 16 columns F0 through F15 represents a truth table of one possible Boolean function for the two variables x and y.
  • 8. 11/23/2022 Department of CSE (AI/ML) 8
  • 9. Hardware Implementation 11/23/2022 Department of CSE (AI/ML) 9 • Although there are 16 logic micro operations, most computers use only four — AND, OR, XOR (exclusive-OR), and complement from which all others can be derived. Figure shows one stage of a circuit that generates the four basic logic micro operations.
  • 10. Other Applications • Logic micro operations can be used to manipulate individual bits or a portion of word in a register. • Consider the data in a register A. In another register B is bit data that will be used to modify the content of A. 11/23/2022 Department of CSE (AI/ML) 10
  • 11. Other Applications 1. In a selective set operation, the bit pattern in B is used to set certain bits in A (logic OR operation) If a bit in B is set to 1, that same position in A gets set to 1, otherwise that bit in A keeps its previous value. 2. In a selective complement operation, the bit pattern in B is used to complement certain bits in A (logic Ex-OR operation) If a bit in B is set to 1, that same position in A gets complemented from its original value, otherwise it is unchanged. 11/23/2022 Department of CSE (AI/ML) 11
  • 12. Other Applications 3. In a selective clear operation, the bit pattern in B is used to clear certain bits in A (B’s one’s Complement) If a bit in B is set to 1, that same position in A gets set to 0, otherwise it is unchanged. 4. In a mask operation, the bit pattern in B is used to clear certain bits in AAt (AND operation) If a bit in B is set to 0, that same position in A gets set to 0, otherwise it is unchanged. 11/23/2022 Department of CSE (AI/ML) 12
  • 13. Other Applications • In a clear operation, if the bits in the same position in A and B are the same, they are cleared in A, otherwise they are set in A • An insert operation is used to introduce a specific bit pattern into A register, leaving the other bit positions unchanged. This is done as • A mask operation to clear the desired bit positions, followed by • An OR operation to introduce the new bits into the desired positions. 11/23/2022 Department of CSE (AI/ML) 13
  • 14. Shift Micro Operations 11/23/2022 Department of CSE (AI/ML) 14 • Shift micro operations are used for serial transfer of data. • They are also used in conjunction with arithmetic, logic, and other data-processing operations. The contents of a register can be shifted to the left or the right. • During a shift-left operation the serial input transfers a bit into the rightmost position. During a shift-right operation the serial input transfers a bit into the leftmost position. • There are three types of shifts: • Logical • Circular • arithmetic
  • 15. Logical Shift • A logical shift is one that transfers 0 through the serial input. • We will adopt the symbols shl and shr for logical shift-left and shift-right micro operations. • Logical shift-left • Logical shift-Right • For Example, 11/23/2022 Department of CSE (AI/ML) 15
  • 16. Circular Shift • In a circular shift the serial input is the bit that is shifted out of the other end of the register. • We will adopt the symbols cil and cir for logical shift-left and shift-right micro operations. • Circular shift-left • Circular shift-right • For Example, 11/23/2022 Department of CSE (AI/ML) 16
  • 17. ARITHMETIC SHIFT • An arithmetic shift is meant for signed binary numbers (integer) • An arithmetic left shift multiplies a signed number by two • An arithmetic right shift divides a signed number by two • Sign bit : 0 for positive and 1 for negative • The main distinction of an arithmetic shift is that it must keep the sign of the number the same as it performs the multiplication or division. A right arithmetic shift operation: A left arithmetic shift operation: 11/23/2022 Department of CSE (AI/ML) 17
  • 18. ARITHMETIC SHIFT • An left arithmetic shift operation must be checked for the overflow. • In a RTL, the following notation is used • ashl for an arithmetic shift left • ashr for an arithmetic shift right For Example: 11/23/2022 Department of CSE (AI/ML) 18
  • 20. Arithmetic Logic Shift Unit 11/23/2022 Department of CSE (AI/ML) 20
  • 21. Topics to be covered in next session 5 • Basic computer organization and design 11/23/2022 Department of CSE (AI/ML) 21 Thank you!!!