SlideShare a Scribd company logo
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

Bt0068
Bt0068Bt0068
Bt0068
Simpaly Jha
 
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
 
Co ppt
Co pptCo ppt
Co ppt
8488918608
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
Mani 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 larkana
Pir 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).pdf
MamunIslam20
 
Module 5 part1
Module 5 part1Module 5 part1
Module 5 part1
cs19club
 
RTL
RTLRTL
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
cmkandemir
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperations
mahesh kumar prajapat
 
arithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptxarithmeticmicrooperations-180130061637.pptx
arithmeticmicrooperations-180130061637.pptx
AshokRachapalli1
 
Register transfer and micro operation
Register transfer and micro operationRegister transfer and micro operation
Register transfer and micro operation
Kamal 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 operations
Lakshya Sharma
 
Microoperations
MicrooperationsMicrooperations
Microoperations
Rakesh Pillai
 
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
IRJET 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
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
lavanya marichamy
 
Uc 2(vii)
Uc 2(vii)Uc 2(vii)
Uc 2(vii)
Ankita Jaiswal
 

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

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
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 .pdf
Asst.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 .pdf
Asst.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 .pdf
Asst.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 _.pdf
Asst.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 notes
Asst.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.pdf
Asst.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.pdf
Asst.prof M.Gokilavani
 
GE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdfGE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdf
Asst.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.pdf
Asst.prof M.Gokilavani
 
GE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _NotesGE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _Notes
Asst.prof M.Gokilavani
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
Asst.prof M.Gokilavani
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
Asst.prof M.Gokilavani
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
Asst.prof M.Gokilavani
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
Asst.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.pdf
Asst.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.pdf
Asst.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.pptx
Asst.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.pptx
Asst.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.pptx
Asst.prof M.Gokilavani
 

More from Asst.prof M.Gokilavani (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
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
 

Recently uploaded

A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 

Recently uploaded (20)

A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 

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!!!