SlideShare a Scribd company logo
1 of 36
REGISTER TRANSFER
AND
MICROOPERATIONS
PART 2
Dr. Prasenjit Dey
Types of Microoperations
There are 4 types of microoperations
1. Register transfer microoperations
2. Arithmetic microoperations
3. Logic microoperations (bit manipulations on non-numeric data)
4. Shift microoperations(bit manipulations on non-numeric data)
DR. PRASENJIT DEY 2
2/27/2021
Arithmetic Microoperations
The basic arithmetic microoperations are: addition, subtraction,
increment, decrement.
Addition Microoperation:
R3 ←R1+R2
Subtraction Microoperation:
R3 ←R1-R2 or R3 ←R1+R2+1
DR. PRASENJIT DEY 3
1’s complement
2/27/2021
Arithmetic Microoperations cont.
One’s Complement Microoperation:
R2 ←R2
Two’s Complement Microoperation:
R2 ←R2+1
Increment Microoperation:
R2 ←R2+1
Decrement Microoperation:
R2 ←R2-1
DR. PRASENJIT DEY 4
2/27/2021
Used for 1-bit addition
Let, x and y are two 1-bit variables. Then, the truth table of the half
adder will be
If we design this truth table in a k-map, then we will get the following
equations corresponding to the carry and sum
Which can be designed by this digital circuit
2/27/2021 DR. PRASENJIT DEY 5
carry = xy sum = xy’ + x’y
= x  y
x
y carry
sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
x y carry sum
Hardware implementation: Half Adder
Used for n-bit addition
The truth table of the full adder is
If we design this truth table in a k-
map, then we will get the following
equations corresponding to the
carry and sum
2/27/2021 DR. PRASENJIT DEY 6
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
cn = xy + xcn-1+ ycn-1
= xy + (x  y)cn-1
s = x’y’cn-1+x’yc’n-1+xy’c’n-1+xycn-1
= x  y  cn-1 = (x  y)  cn-1
x
y
cn-1
x
y
cn-1
cn s
x
y
cn-1
S
cn
x y cn-1 cn s
0
0
1
0
0
1
1
1
0
1
0
1
1
0
1
0
Hardware implementation: Full Adder
Binary Adder using Full Adder
DR. PRASENJIT DEY 7
C0
A0
B0
S0
A1
B1
S1
A2
B2
S2
A3
B3
S3
C1
C2
C3
C4
4-bit binary adder (connection
of FAs)
2/27/2021
FA
FA
FA
FA
A3A2A1A0 => 1 0 1 0
+B3B2B1B0=> 0 1 0 0
1 1 1 0
Binary Adder-Subtractor
DR. PRASENJIT DEY 8
FA
FA
FA
FA C0
A0
B0
S0
A1
B1
S1
A2
B2
S2
A3
B3
S3
C1
C2
C3
C4
4-bit adder-subtractor
M
2/27/2021
M=0: Addition
M=1: Subtraction
B3 B2 B1 B0
B3 B2 B1 B0
=0 1
M=1: A+B+1
M=1: A+B+0
Binary Adder-Subtractor
For unsigned numbers, this gives A – B if A≥B or the 2’s complement of
(B – A) if A < B
(example: 3 – 5 = -2= 1110)
For signed numbers, the result is A – B provided that there is no
overflow. (example : -3 – 5= -8) 1101
DR. PRASENJIT DEY 9
C3
C4
V =
1, if overflow
0, if no overflow
Overflow detector for signed numbers
2/27/2021
Binary Incrementer/Decrementer
DR. PRASENJIT DEY 10
C S
x y
HA
C S
x y
HA
C S
x y
HA
C S
x y
HA
S0
S1
S2
S3
C4
1
A0
A1
A2
A3
4-bit Binary Incrementer
2/27/2021
 Binary Incrementer can also be implemented using a counter
 A binary Decrementer can be implemented by adding 1111 to the
desired register each time!
A+(1111)
=A+2’s of 1
=A-1
Arithmetic Circuit
This circuit performs 4 distinct arithmetic operations and the
basic component of it is the parallel adder
The output of the binary adder is calculated from the following
arithmetic sum:
D = A + Y + Cin
DR. PRASENJIT DEY 11
2/27/2021
Arithmetic Circuit cont.
DR. PRASENJIT DEY 12
B0
3 2 1 0 S1 S0
4×1 MUX
FA
FA
FA
FA Cin
D0
D1
D2
D3
C1
C2
C3
Cout
B0
1 0 S1 S0
B1
3 2 1 0 S1 S0
4×1 MUX
B1
1 0 S1 S0
B2
3 2 1 0 S1 S0
4×1 MUX
B2
1 0 S1 S0
B3
3 2 1 0 S1 S0
4×1 MUX
B3
1 0 S1 S0
A0
A1
A2
A3
4-bit Arithmetic Circuit
X0
Y0
X1
Y1
X2
Y2
X3
Y3
2/27/2021
S0S1(00), cin(0): A+B
S0S1(01), cin(1): A+B+1
S0S1(10), cin(1): A+0+1
S0S1(11), cin(0): A + (-1)
A+(1111)
=A+2’s of 1
=A-1
Logic Microoperations
There are in general 4 types of logical microoperations
OR Microoperation
Symbol: , +
Gate:
Example: 1001102  10101102 = 11101102
P+Q: R1←R2+R3, R4←R5 R6
DR. PRASENJIT DEY 13
2/27/2021
OR OR
Logic Microoperations cont.
AND Microoperation
Symbol: 
Gate:
Example: 1001102  10101102 = 00001102
DR. PRASENJIT DEY 14
2/27/2021
PQ: R1←R2R3
Logic Microoperations cont.
Complement (NOT) Microoperation
Symbol:
Gate:
Example: 01010012= 10101102
DR. PRASENJIT DEY 15
2/27/2021
Logic Microoperations cont.
XOR (Exclusive-OR) Microoperation
Symbol: 
Gate:
Example: 1001102  0101102 = 1100002
1 0 0 1 1 0
0 1 0 1 1 0
1 1 0 0 0 0
DR. PRASENJIT DEY 16
2/27/2021
Complex Logic Microoperations
Selective-set Operation
Used to force selected bits of a register into logic-1 by using the OR
operation
Example: 01002  10002 = 11002
DR. PRASENJIT DEY 17
2/27/2021
0 1 0 0
1 1 0 0
1 1 0 0
Complex Logic Microoperations cont.
Selective-complement (toggling) Operation
Used to force selected bits of a register to be complemented by using
the XOR operation
Example: 00012  10012 = 10002
DR. PRASENJIT DEY 18
2/27/2021
0 0 0 1
1 0 0 1
1 0 0 0
Complex Logic Microoperations cont.
Insert Operation
Step1: mask the desired bits
Step2: OR them with the desired value
Example: Let, R1 = 0110 1010, and we desire to replace the leftmost 4
bits (0110) with 1110 then:
◦ Step1: 0110 1010  0000 1111
◦ Step2: 0000 1010  1110 0000
 R1 = 1110 1010
DR. PRASENJIT DEY 19
2/27/2021
Complex Logic Microoperations cont.
NAND Microoperation
Symbols:  and 
Gate:
Example: 1001102  10101102 = 11110012
DR. PRASENJIT DEY 20
2/27/2021
Complex Logic Microoperations cont.
NOR Microoperation
Symbols:  and 
Gate:
Example: 1001102  10101102 = 00010012
DR. PRASENJIT DEY 21
2/27/2021
Complex Logic Microoperations cont.
Set (Preset) Microoperation
Force all bits into 1’s by ORing them with a value in which
all its bits are being assigned to logic-1
Example: 1001102  1111112 = 1111112
Clear (Reset) Microoperation
Force all bits into 0’s by ANDing them with a value in which
all its bits are being assigned to logic-0
Example: 1001102  0000002 = 0000002
DR. PRASENJIT DEY 22
2/27/2021
Hardware Implementation
The hardware implementation of logic microoperations requires that
logic gates be inserted for each bit or pair of bits in the registers to
perform the required logic function
Most computers use only four (AND, OR, XOR, and NOT) from which all
others can be derived.
DR. PRASENJIT DEY 23
2/27/2021
Hardware Implementation cont.
S1 S0 Output Operation
0 0 O = Ai  Bi XOR
0 1 O = Ai  Bi OR
1 0 O = Ai  Bi AND
1 1 O = Ai Complement
DR. PRASENJIT DEY 24
S1
S0
0
1
2
3
4×1
MUX
Oi
Ai
Bi
2/27/2021
Shift Microoperations
Used for serial transfer of data
Also used in conjunction with arithmetic, logic, and other data-
processing operations
The contents of the register can be shifted to the left or to the right
As being shifted, the first flip-flop receives its binary information from
the serial input
Three types of shift:
Logical Circular Arithmetic
DR. PRASENJIT DEY 25
2/27/2021
Shift Microoperations cont.
DR. PRASENJIT DEY 26
r0
r1
r3
rn-1
r0
r1
r2
r3
rn-1
Shift Right
Shift Left
Serial Input Serial Output
Serial Output Serial Input
r2
2/27/2021
Shift Microoperations: Logical Shifts
Transfers 0 through the serial input
Logical Shift Right: R1←shr R1,1
Logical Shift Left: R2←shl R2,1
DR. PRASENJIT DEY 27
Logical Shift Left
? 0
r0
r1
r2
r3
rn-1
2/27/2021
Shift Microoperations: Circular Shifts
Circulates the bits of the register around the two ends without loss of
information
Circular Shift Right: R1←cir R1,1
Circular Shift Left: R2←cil R2,1
DR. PRASENJIT DEY 28
Circular Shift Left
r0
r1
r2
r3
rn-1
2/27/2021
Shift Microoperations: Arithmetic Shifts
Shifts a signed binary number to the left or right
An arithmetic shift-left multiplies a signed binary number by 2: ashl
(00100): 01000
An arithmetic shift-right divides the number by 2
 ashr (00100) : 00010
An overflow may occur in arithmetic shift-left, and occurs when the
sign bit is changed (sign reversal)
 ashl (10100) : 01001
DR. PRASENJIT DEY 29
2/27/2021
Shift Microoperations: Arithmetic Shifts cont.
DR. PRASENJIT DEY 30
Sign
Bit
Arithmetic Shift Left
Sign
Bit
?
0
?
r0
r1
r2
r3
rn-1
r0
r1
r2
r3
rn-1
2/27/2021
ashr (00100) : 00010
ashl (10100) : 010010
Arithmetic Shift Right
An overflow flip-flop Vs can be used to detect an arithmetic shift-left
overflow
Vs = Rn-1  Rn-2
DR. PRASENJIT DEY 31
Rn-2
Vs=
Rn-1 1  overflow
0  no overflow
2/27/2021
Shift Microoperations: Arithmetic Shifts cont.
Shift Microoperations cont.
Example: Assume R1=11001110, then:
◦ 1-bit Arithmetic shift right : R1 = 11100111
◦ 1-bit Arithmetic shift left : R1 = 10011100
◦ 1-bit Logical shift right : R1 = 01100111
◦ 1-bit Logical shift left : R1 = 10011100
◦ 1-bit Circular shift right : R1 = 01100111
◦ 1-bit Circular shift left : R1 = 10011101
DR. PRASENJIT DEY 32
2/27/2021
MSB
LSB
Hardware Implementation
A shift unit could be a bidirectional shift register with parallel
load.
Has drawbacks:
◦ Needs two pulses (the clock and the shift signal pulse)
◦ Not efficient in a processor unit where multiple number of registers
share a common bus
It is more efficient to implement the shift operation with a
combinational circuit
DR. PRASENJIT DEY 33
2/27/2021
Hardware Implementation cont.
DR. PRASENJIT DEY 34
S 1 0 S 1 0 S 1 0 S 1 0
A3A2A1A0
Serial Input IR Serial Input IL
Select
0 for shift right
1 for shift left
H3 H2 H1 H0
MUX MUX MUX MUX
4-bit Combinational Circuit Shifter
2/27/2021
Arithmetic Logic Shift Unit
Individual registers performing the microoperations directly
Connect these set of registers with a common operational unit called
an Arithmetic Logic Unit (ALU)
DR. PRASENJIT DEY 35
2/27/2021
Arithmetic Logic Shift Unit cont.
DR. PRASENJIT DEY 36
0
1
2
3
S3
S2
S1
S0
Bi
Ai
Ai+1
Ai-1
Enable
4×1
MUX
Ci
Ci+1
One stage of
arithmetic
circuit
One stage of
logic circuit
Di
Oi
Fi
shr
shl
One stage of
ALU
2/27/2021
s1s0: Arithmetic/logical
operations
s1s0 Arithmetic Logic
(00): Add XOR
(01): Subtract OR
(10): Increment AND
(11): Decrement NOT
s3s2 (00): Arithmetic operation
s3s2(01): Logic operation
s3s2(10): Right shift operation
s3s2 (11): Left shift operation

More Related Content

What's hot

FYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersFYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersArti Parab Academics
 
Saur lecture 16
Saur lecture 16Saur lecture 16
Saur lecture 16saur28_83
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Hsien-Hsin Sean Lee, Ph.D.
 
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...Hsien-Hsin Sean Lee, Ph.D.
 
EASA Part 66 Module 5.5 : Logic Circuit
EASA Part 66 Module 5.5 : Logic CircuitEASA Part 66 Module 5.5 : Logic Circuit
EASA Part 66 Module 5.5 : Logic Circuitsoulstalker
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronicsIIT, KANPUR INDIA
 
Digital logic design lecture 04
Digital logic design   lecture 04 Digital logic design   lecture 04
Digital logic design lecture 04 FarhatUllah27
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Addergueste731a4
 
Registers and counters
Registers and countersRegisters and counters
Registers and countersHeman Pathak
 
Datasheet
DatasheetDatasheet
Datasheetjuan
 
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGY
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGYRELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGY
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGYIlango Jeyasubramanian
 
What is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODERWhat is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODERsafia safreen
 
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...eSAT Publishing House
 

What's hot (20)

FYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I CountersFYBSC IT Digital Electronics Unit V Chapter I Counters
FYBSC IT Digital Electronics Unit V Chapter I Counters
 
Saur lecture 16
Saur lecture 16Saur lecture 16
Saur lecture 16
 
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
Lec13 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Sh...
 
Logic Micro Operation
Logic Micro OperationLogic Micro Operation
Logic Micro Operation
 
Digital Design for B.Tech. / B.Sc.
Digital Design for B.Tech. / B.Sc.Digital Design for B.Tech. / B.Sc.
Digital Design for B.Tech. / B.Sc.
 
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
Lec12 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Ad...
 
EASA Part 66 Module 5.5 : Logic Circuit
EASA Part 66 Module 5.5 : Logic CircuitEASA Part 66 Module 5.5 : Logic Circuit
EASA Part 66 Module 5.5 : Logic Circuit
 
Decoder for digital electronics
Decoder for digital electronicsDecoder for digital electronics
Decoder for digital electronics
 
Digital logic
Digital logicDigital logic
Digital logic
 
Digital logic design lecture 04
Digital logic design   lecture 04 Digital logic design   lecture 04
Digital logic design lecture 04
 
Ceng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer AdderCeng232 Decoder Multiplexer Adder
Ceng232 Decoder Multiplexer Adder
 
The decoder
The decoderThe decoder
The decoder
 
Decoders
DecodersDecoders
Decoders
 
3. multiplexer
3. multiplexer3. multiplexer
3. multiplexer
 
Registers and counters
Registers and countersRegisters and counters
Registers and counters
 
Datasheet
DatasheetDatasheet
Datasheet
 
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGY
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGYRELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGY
RELIABLE NoC ROUTER ARCHITECTURE DESIGN USING IBM 130NM TECHNOLOGY
 
What is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODERWhat is a decoder and 2 to 4 DECODER
What is a decoder and 2 to 4 DECODER
 
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
Design and implementation of synchronous 4 bit up counter using 180 nm cmos p...
 
Unit 3.1
Unit 3.1Unit 3.1
Unit 3.1
 

Similar to Register Transfer and Microoperations: Types, Arithmetic, Logic, and Shift Operations

Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptskatiarrahaman
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptxElisée Ndjabu
 
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea RipleyArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea RipleyRudraBhai3
 
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...IRJET Journal
 
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating PointSurvey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating PointIRJET Journal
 
LCDF3_Chap_10_P1.ppt
LCDF3_Chap_10_P1.pptLCDF3_Chap_10_P1.ppt
LCDF3_Chap_10_P1.pptbrainxMagic
 
Register transfer &amp; microoperations moris mano ch 04
Register transfer &amp; microoperations    moris mano ch 04Register transfer &amp; microoperations    moris mano ch 04
Register transfer &amp; microoperations moris mano ch 04thearticlenow
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in indiaEdhole.com
 
Unit-6 Computer Arithmetic.ppsx
Unit-6 Computer Arithmetic.ppsxUnit-6 Computer Arithmetic.ppsx
Unit-6 Computer Arithmetic.ppsxtest227270
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operationsNitesh Bichwani
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual Shankar Gangaju
 
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxDigital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxSanjaiPrasad
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperationsmahesh kumar prajapat
 

Similar to Register Transfer and Microoperations: Types, Arithmetic, Logic, and Shift Operations (20)

Comp Arithmetic Basic.ppt
Comp Arithmetic Basic.pptComp Arithmetic Basic.ppt
Comp Arithmetic Basic.ppt
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
 
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea RipleyArithmeticCircuits.Ivy Nile vs. Rhea Ripley
ArithmeticCircuits.Ivy Nile vs. Rhea Ripley
 
Chapter-04.pdf
Chapter-04.pdfChapter-04.pdf
Chapter-04.pdf
 
Microoperations
MicrooperationsMicrooperations
Microoperations
 
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...
IRJET-Design and Implementation of LNS based Approximate Multiplier using Mit...
 
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating PointSurvey On Two-Term Dot Product Of Multiplier Using Floating Point
Survey On Two-Term Dot Product Of Multiplier Using Floating Point
 
LCDF3_Chap_10_P1.ppt
LCDF3_Chap_10_P1.pptLCDF3_Chap_10_P1.ppt
LCDF3_Chap_10_P1.ppt
 
Micro operations
Micro operationsMicro operations
Micro operations
 
Register transfer &amp; microoperations moris mano ch 04
Register transfer &amp; microoperations    moris mano ch 04Register transfer &amp; microoperations    moris mano ch 04
Register transfer &amp; microoperations moris mano ch 04
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Unit-6 Computer Arithmetic.ppsx
Unit-6 Computer Arithmetic.ppsxUnit-6 Computer Arithmetic.ppsx
Unit-6 Computer Arithmetic.ppsx
 
Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Computer organization and architecture lab manual
Computer organization and architecture lab manual Computer organization and architecture lab manual
Computer organization and architecture lab manual
 
Digital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptxDigital VLSI - Unit 2.pptx
Digital VLSI - Unit 2.pptx
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Register transfer and microoperations
Register transfer and microoperationsRegister transfer and microoperations
Register transfer and microoperations
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 

More from Prasenjit Dey

Dynamic interconnection networks
Dynamic interconnection networksDynamic interconnection networks
Dynamic interconnection networksPrasenjit Dey
 
Machine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationMachine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationPrasenjit Dey
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionPrasenjit Dey
 
Machine learning in agriculture module 2
Machine learning in agriculture module 2Machine learning in agriculture module 2
Machine learning in agriculture module 2Prasenjit Dey
 
Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Prasenjit Dey
 
Support vector machine
Support vector machineSupport vector machine
Support vector machinePrasenjit Dey
 
Numerical on general pipelines
Numerical on general pipelinesNumerical on general pipelines
Numerical on general pipelinesPrasenjit Dey
 
General pipeline concepts
General pipeline conceptsGeneral pipeline concepts
General pipeline conceptsPrasenjit Dey
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performancePrasenjit Dey
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPSPrasenjit Dey
 
Page replacement and thrashing
Page replacement and thrashingPage replacement and thrashing
Page replacement and thrashingPrasenjit Dey
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Prasenjit Dey
 
Register transfer and microoperations part 1
Register transfer and microoperations part 1Register transfer and microoperations part 1
Register transfer and microoperations part 1Prasenjit Dey
 
Different types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMDifferent types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMPrasenjit Dey
 
Carry look ahead adder
Carry look ahead adder Carry look ahead adder
Carry look ahead adder Prasenjit Dey
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmPrasenjit Dey
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systemsPrasenjit Dey
 

More from Prasenjit Dey (20)

Dynamic interconnection networks
Dynamic interconnection networksDynamic interconnection networks
Dynamic interconnection networks
 
Machine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classificationMachine Learning in Agriculture Module 6: classification
Machine Learning in Agriculture Module 6: classification
 
Machine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regressionMachine Learning in Agriculture Module 3: linear regression
Machine Learning in Agriculture Module 3: linear regression
 
Machine learning in agriculture module 2
Machine learning in agriculture module 2Machine learning in agriculture module 2
Machine learning in agriculture module 2
 
Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1Machine Learning in Agriculture Module 1
Machine Learning in Agriculture Module 1
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Numerical on general pipelines
Numerical on general pipelinesNumerical on general pipelines
Numerical on general pipelines
 
General pipeline concepts
General pipeline conceptsGeneral pipeline concepts
General pipeline concepts
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performance
 
Instruction Set Architecture: MIPS
Instruction Set Architecture: MIPSInstruction Set Architecture: MIPS
Instruction Set Architecture: MIPS
 
Page replacement and thrashing
Page replacement and thrashingPage replacement and thrashing
Page replacement and thrashing
 
Addressing mode
Addressing modeAddressing mode
Addressing mode
 
Instruction set (prasenjit dey)
Instruction set (prasenjit dey)Instruction set (prasenjit dey)
Instruction set (prasenjit dey)
 
Register transfer and microoperations part 1
Register transfer and microoperations part 1Register transfer and microoperations part 1
Register transfer and microoperations part 1
 
Different types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROMDifferent types of memory and hardware designs of RAM and ROM
Different types of memory and hardware designs of RAM and ROM
 
Cache memory
Cache  memoryCache  memory
Cache memory
 
Carry look ahead adder
Carry look ahead adder Carry look ahead adder
Carry look ahead adder
 
Binary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithmBinary division restoration and non restoration algorithm
Binary division restoration and non restoration algorithm
 
Booth's algorithm
Booth's algorithm Booth's algorithm
Booth's algorithm
 
Computer organization basics and number systems
Computer organization basics and number systemsComputer organization basics and number systems
Computer organization basics and number systems
 

Recently uploaded

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 

Recently uploaded (20)

MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 

Register Transfer and Microoperations: Types, Arithmetic, Logic, and Shift Operations

  • 2. Types of Microoperations There are 4 types of microoperations 1. Register transfer microoperations 2. Arithmetic microoperations 3. Logic microoperations (bit manipulations on non-numeric data) 4. Shift microoperations(bit manipulations on non-numeric data) DR. PRASENJIT DEY 2 2/27/2021
  • 3. Arithmetic Microoperations The basic arithmetic microoperations are: addition, subtraction, increment, decrement. Addition Microoperation: R3 ←R1+R2 Subtraction Microoperation: R3 ←R1-R2 or R3 ←R1+R2+1 DR. PRASENJIT DEY 3 1’s complement 2/27/2021
  • 4. Arithmetic Microoperations cont. One’s Complement Microoperation: R2 ←R2 Two’s Complement Microoperation: R2 ←R2+1 Increment Microoperation: R2 ←R2+1 Decrement Microoperation: R2 ←R2-1 DR. PRASENJIT DEY 4 2/27/2021
  • 5. Used for 1-bit addition Let, x and y are two 1-bit variables. Then, the truth table of the half adder will be If we design this truth table in a k-map, then we will get the following equations corresponding to the carry and sum Which can be designed by this digital circuit 2/27/2021 DR. PRASENJIT DEY 5 carry = xy sum = xy’ + x’y = x  y x y carry sum 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 0 x y carry sum Hardware implementation: Half Adder
  • 6. Used for n-bit addition The truth table of the full adder is If we design this truth table in a k- map, then we will get the following equations corresponding to the carry and sum 2/27/2021 DR. PRASENJIT DEY 6 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 cn = xy + xcn-1+ ycn-1 = xy + (x  y)cn-1 s = x’y’cn-1+x’yc’n-1+xy’c’n-1+xycn-1 = x  y  cn-1 = (x  y)  cn-1 x y cn-1 x y cn-1 cn s x y cn-1 S cn x y cn-1 cn s 0 0 1 0 0 1 1 1 0 1 0 1 1 0 1 0 Hardware implementation: Full Adder
  • 7. Binary Adder using Full Adder DR. PRASENJIT DEY 7 C0 A0 B0 S0 A1 B1 S1 A2 B2 S2 A3 B3 S3 C1 C2 C3 C4 4-bit binary adder (connection of FAs) 2/27/2021 FA FA FA FA A3A2A1A0 => 1 0 1 0 +B3B2B1B0=> 0 1 0 0 1 1 1 0
  • 8. Binary Adder-Subtractor DR. PRASENJIT DEY 8 FA FA FA FA C0 A0 B0 S0 A1 B1 S1 A2 B2 S2 A3 B3 S3 C1 C2 C3 C4 4-bit adder-subtractor M 2/27/2021 M=0: Addition M=1: Subtraction B3 B2 B1 B0 B3 B2 B1 B0 =0 1 M=1: A+B+1 M=1: A+B+0
  • 9. Binary Adder-Subtractor For unsigned numbers, this gives A – B if A≥B or the 2’s complement of (B – A) if A < B (example: 3 – 5 = -2= 1110) For signed numbers, the result is A – B provided that there is no overflow. (example : -3 – 5= -8) 1101 DR. PRASENJIT DEY 9 C3 C4 V = 1, if overflow 0, if no overflow Overflow detector for signed numbers 2/27/2021
  • 10. Binary Incrementer/Decrementer DR. PRASENJIT DEY 10 C S x y HA C S x y HA C S x y HA C S x y HA S0 S1 S2 S3 C4 1 A0 A1 A2 A3 4-bit Binary Incrementer 2/27/2021  Binary Incrementer can also be implemented using a counter  A binary Decrementer can be implemented by adding 1111 to the desired register each time! A+(1111) =A+2’s of 1 =A-1
  • 11. Arithmetic Circuit This circuit performs 4 distinct arithmetic operations and the basic component of it is the parallel adder The output of the binary adder is calculated from the following arithmetic sum: D = A + Y + Cin DR. PRASENJIT DEY 11 2/27/2021
  • 12. Arithmetic Circuit cont. DR. PRASENJIT DEY 12 B0 3 2 1 0 S1 S0 4×1 MUX FA FA FA FA Cin D0 D1 D2 D3 C1 C2 C3 Cout B0 1 0 S1 S0 B1 3 2 1 0 S1 S0 4×1 MUX B1 1 0 S1 S0 B2 3 2 1 0 S1 S0 4×1 MUX B2 1 0 S1 S0 B3 3 2 1 0 S1 S0 4×1 MUX B3 1 0 S1 S0 A0 A1 A2 A3 4-bit Arithmetic Circuit X0 Y0 X1 Y1 X2 Y2 X3 Y3 2/27/2021 S0S1(00), cin(0): A+B S0S1(01), cin(1): A+B+1 S0S1(10), cin(1): A+0+1 S0S1(11), cin(0): A + (-1) A+(1111) =A+2’s of 1 =A-1
  • 13. Logic Microoperations There are in general 4 types of logical microoperations OR Microoperation Symbol: , + Gate: Example: 1001102  10101102 = 11101102 P+Q: R1←R2+R3, R4←R5 R6 DR. PRASENJIT DEY 13 2/27/2021 OR OR
  • 14. Logic Microoperations cont. AND Microoperation Symbol:  Gate: Example: 1001102  10101102 = 00001102 DR. PRASENJIT DEY 14 2/27/2021 PQ: R1←R2R3
  • 15. Logic Microoperations cont. Complement (NOT) Microoperation Symbol: Gate: Example: 01010012= 10101102 DR. PRASENJIT DEY 15 2/27/2021
  • 16. Logic Microoperations cont. XOR (Exclusive-OR) Microoperation Symbol:  Gate: Example: 1001102  0101102 = 1100002 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 0 0 0 DR. PRASENJIT DEY 16 2/27/2021
  • 17. Complex Logic Microoperations Selective-set Operation Used to force selected bits of a register into logic-1 by using the OR operation Example: 01002  10002 = 11002 DR. PRASENJIT DEY 17 2/27/2021 0 1 0 0 1 1 0 0 1 1 0 0
  • 18. Complex Logic Microoperations cont. Selective-complement (toggling) Operation Used to force selected bits of a register to be complemented by using the XOR operation Example: 00012  10012 = 10002 DR. PRASENJIT DEY 18 2/27/2021 0 0 0 1 1 0 0 1 1 0 0 0
  • 19. Complex Logic Microoperations cont. Insert Operation Step1: mask the desired bits Step2: OR them with the desired value Example: Let, R1 = 0110 1010, and we desire to replace the leftmost 4 bits (0110) with 1110 then: ◦ Step1: 0110 1010  0000 1111 ◦ Step2: 0000 1010  1110 0000  R1 = 1110 1010 DR. PRASENJIT DEY 19 2/27/2021
  • 20. Complex Logic Microoperations cont. NAND Microoperation Symbols:  and  Gate: Example: 1001102  10101102 = 11110012 DR. PRASENJIT DEY 20 2/27/2021
  • 21. Complex Logic Microoperations cont. NOR Microoperation Symbols:  and  Gate: Example: 1001102  10101102 = 00010012 DR. PRASENJIT DEY 21 2/27/2021
  • 22. Complex Logic Microoperations cont. Set (Preset) Microoperation Force all bits into 1’s by ORing them with a value in which all its bits are being assigned to logic-1 Example: 1001102  1111112 = 1111112 Clear (Reset) Microoperation Force all bits into 0’s by ANDing them with a value in which all its bits are being assigned to logic-0 Example: 1001102  0000002 = 0000002 DR. PRASENJIT DEY 22 2/27/2021
  • 23. Hardware Implementation The hardware implementation of logic microoperations requires that logic gates be inserted for each bit or pair of bits in the registers to perform the required logic function Most computers use only four (AND, OR, XOR, and NOT) from which all others can be derived. DR. PRASENJIT DEY 23 2/27/2021
  • 24. Hardware Implementation cont. S1 S0 Output Operation 0 0 O = Ai  Bi XOR 0 1 O = Ai  Bi OR 1 0 O = Ai  Bi AND 1 1 O = Ai Complement DR. PRASENJIT DEY 24 S1 S0 0 1 2 3 4×1 MUX Oi Ai Bi 2/27/2021
  • 25. Shift Microoperations Used for serial transfer of data Also used in conjunction with arithmetic, logic, and other data- processing operations The contents of the register can be shifted to the left or to the right As being shifted, the first flip-flop receives its binary information from the serial input Three types of shift: Logical Circular Arithmetic DR. PRASENJIT DEY 25 2/27/2021
  • 26. Shift Microoperations cont. DR. PRASENJIT DEY 26 r0 r1 r3 rn-1 r0 r1 r2 r3 rn-1 Shift Right Shift Left Serial Input Serial Output Serial Output Serial Input r2 2/27/2021
  • 27. Shift Microoperations: Logical Shifts Transfers 0 through the serial input Logical Shift Right: R1←shr R1,1 Logical Shift Left: R2←shl R2,1 DR. PRASENJIT DEY 27 Logical Shift Left ? 0 r0 r1 r2 r3 rn-1 2/27/2021
  • 28. Shift Microoperations: Circular Shifts Circulates the bits of the register around the two ends without loss of information Circular Shift Right: R1←cir R1,1 Circular Shift Left: R2←cil R2,1 DR. PRASENJIT DEY 28 Circular Shift Left r0 r1 r2 r3 rn-1 2/27/2021
  • 29. Shift Microoperations: Arithmetic Shifts Shifts a signed binary number to the left or right An arithmetic shift-left multiplies a signed binary number by 2: ashl (00100): 01000 An arithmetic shift-right divides the number by 2  ashr (00100) : 00010 An overflow may occur in arithmetic shift-left, and occurs when the sign bit is changed (sign reversal)  ashl (10100) : 01001 DR. PRASENJIT DEY 29 2/27/2021
  • 30. Shift Microoperations: Arithmetic Shifts cont. DR. PRASENJIT DEY 30 Sign Bit Arithmetic Shift Left Sign Bit ? 0 ? r0 r1 r2 r3 rn-1 r0 r1 r2 r3 rn-1 2/27/2021 ashr (00100) : 00010 ashl (10100) : 010010 Arithmetic Shift Right
  • 31. An overflow flip-flop Vs can be used to detect an arithmetic shift-left overflow Vs = Rn-1  Rn-2 DR. PRASENJIT DEY 31 Rn-2 Vs= Rn-1 1  overflow 0  no overflow 2/27/2021 Shift Microoperations: Arithmetic Shifts cont.
  • 32. Shift Microoperations cont. Example: Assume R1=11001110, then: ◦ 1-bit Arithmetic shift right : R1 = 11100111 ◦ 1-bit Arithmetic shift left : R1 = 10011100 ◦ 1-bit Logical shift right : R1 = 01100111 ◦ 1-bit Logical shift left : R1 = 10011100 ◦ 1-bit Circular shift right : R1 = 01100111 ◦ 1-bit Circular shift left : R1 = 10011101 DR. PRASENJIT DEY 32 2/27/2021 MSB LSB
  • 33. Hardware Implementation A shift unit could be a bidirectional shift register with parallel load. Has drawbacks: ◦ Needs two pulses (the clock and the shift signal pulse) ◦ Not efficient in a processor unit where multiple number of registers share a common bus It is more efficient to implement the shift operation with a combinational circuit DR. PRASENJIT DEY 33 2/27/2021
  • 34. Hardware Implementation cont. DR. PRASENJIT DEY 34 S 1 0 S 1 0 S 1 0 S 1 0 A3A2A1A0 Serial Input IR Serial Input IL Select 0 for shift right 1 for shift left H3 H2 H1 H0 MUX MUX MUX MUX 4-bit Combinational Circuit Shifter 2/27/2021
  • 35. Arithmetic Logic Shift Unit Individual registers performing the microoperations directly Connect these set of registers with a common operational unit called an Arithmetic Logic Unit (ALU) DR. PRASENJIT DEY 35 2/27/2021
  • 36. Arithmetic Logic Shift Unit cont. DR. PRASENJIT DEY 36 0 1 2 3 S3 S2 S1 S0 Bi Ai Ai+1 Ai-1 Enable 4×1 MUX Ci Ci+1 One stage of arithmetic circuit One stage of logic circuit Di Oi Fi shr shl One stage of ALU 2/27/2021 s1s0: Arithmetic/logical operations s1s0 Arithmetic Logic (00): Add XOR (01): Subtract OR (10): Increment AND (11): Decrement NOT s3s2 (00): Arithmetic operation s3s2(01): Logic operation s3s2(10): Right shift operation s3s2 (11): Left shift operation