SlideShare a Scribd company logo
5
Most read
6
Most read
9
Most read
Computer Organization
and Architecture
Topic: Division Non-Restoring
Method
by
Upendra Mishra
(M. Tech., Ph.D.*)
KIET Group of Institutions
Prerequisites
 Shifting of Bits(Left or Right)
 Addition
 Subtraction
 2’s Complement
Division of unsigned binary integers
 Paper Pencil method
 Example:
 (Dividend)10/ (Divisor) 4 =(Quotient)2; (Remainder)2
Dividend
Divisor Quotient
Remainder
4 10 2
8
2
 Division of unsigned binary integers is
instructive method. There are two methods:
 Restore Method
 Non - Restore Method
Division of unsigned binary integers
Division method Non Restoring.ppt
Flowchart for Unsigned
Binary Division-
Non-Restore Method
start
nno of bits
M Divisor
A 0
Q Dividend
A < 0
Shift left AQ
A= A + M
Shift left AQ
A= A - M
A < 0
Q[0] = 0 Q[0] = 1
n=n-1
n=0
A < 0
Stop
A=A+M
Yes
No
Yes
No
No
No
Yes
Yes
Flowchart for Unsigned
Binary Division-
Non-Restore Method
start
nno of bits
M Divisor
A 0
Q Dividend
A < 0
Shift left AQ
A= A + M
Shift left AQ
A= A - M
A < 0
Q[0] = 0 Q[0] = 1
n=n-1
n=0
A < 0
Stop
A=A+M
Yes
No
Yes
No
No
No
Yes
Yes
Division by Non-Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
N M A Q ACTION
4 00011 00000 1011 Start
00001 011_ Left shift AQ
11110 011_ A=A-M
3 11110 0110 Q[0]=0
11100 110_ Left shift AQ
11111 110_ A=A+M
2 11111 1100 Q[0]=0
11111 100_ Left Shift AQ
00010 100_ A=A+M
1 00010 1001 Q[0]=1
00101 001_ Left Shift AQ
00010 001_ A=A-M
0 00010 0011 Q[0]=1
start
nno of bits
M Divisor
A 0
Q Dividend
A < 0
Shift left AQ
A= A + M
Shift left AQ
A= A - M
A < 0
Q[0] = 0 Q[0] = 1
n=n-1
n=0
A < 0
Stop
A=A+M
Yes
No
Yes
No
No
No
Yes
Yes
M = 00011
M’ = 11100
M’+1 = 11101
-M = 11101
-M = 11101
Division by Non-Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
N M A Q ACTION
4 00011 00000 1011 Start
00001 011_ Left shift AQ
11110 011_ A=A-M
3 11110 0110 Q[0]=0
11100 110_ Left shift AQ
11111 110_ A=A+M
2 11111 1100 Q[0]=0
11111 100_ Left Shift AQ
00010 100_ A=A+M
1 00010 1001 Q[0]=1
00101 001_ Left Shift AQ
00010 001_ A=A-M
0 00010(2)(R) 0011(3)(Q) Q[0]=1
start
nno of bits
M Divisor
A 0
Q Dividend
A < 0
Shift left AQ
A= A + M
Shift left AQ
A= A - M
A < 0
Q[0] = 0 Q[0] = 1
n=n-1
n=0
A < 0
Stop
A=A+M
Yes
No
Yes
No
No
No
Yes
Yes
10
Question
• Try dividing 13/4 and 15/3
11
Divide Overflow
Condition:
1. The number of bits in dividend is twice as the number of bits in the divisor. AND
2. The higher order half bits of the dividend have a value more than or equal to the value of the
total bits of the divisor.
OR
1. The divide overflow also checks that whether the divisor is zero or not.
• All these conditions are checked before the division process starts.
• Let dividend(Q) = 1010 1100 (length 8 bit)
Divisor(M) is 0111 (length 4 bit)
Here, the number of bits in Q is twice the number of bits in M
Higher order half bits of Q is 1010 value 10
total bits value of M is 0111 value 7 so Q>M
OR check whether M is 0000 or not
if yes also indicate Divide Overflow
12
Reference
1.Computer System Architecture - Morris Mano
2.William Stallings, Computer Organization and Architecture-Designing for Performance,
Pearson Education, Seventh edition, 2006.
Thank
You
Thank
You
Division by Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
Start
nno of bits
M Divisor
A 0
Q Dividend
Shift left AQ
A= A - M
MSB
of A
Q[0] = 1
Q[0] = 0
Restore A
n = n-1
Is n = 0
Quotient in Q
Remainder in A
Stop
=1
=0
Yes
No
n M A Q Operation
4 00011 (3) 00000 (0) 1011 (11) initialize
00011 00001 011_ shift left AQ
00011 11110 011_ A=A-M
00011 00001 0110
Q[0]=0 And
restore A
3 00011 00010 110_ shift left AQ
00011 11111 110_ A=A-M
00011 00010 1100
Q[0]=0And
restore A
2 00011 00101 100_ shift left AQ
00011 00010 100_ A=A-M
00011 00010 1001 Q[0]=1
1 00011 00101 001_ shift left AQ
00011 00010 001_ A=A-M
00011 00010 (2) 0011 (3) Q[0]=1
M = 00011
M’ = 11100
M’+1 = 11101
-M = 11101
-M = 11101
Division by Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
n M A Q Operation
4 00011 (3) 00000 (0) 1011 (11) initialize
00011 00001 011_ shift left AQ
00011 11110 011_ A=A-M
00011 00001 0110
Q[0]=0 And
restore A
3 00011 00010 110_ shift left AQ
00011 11111 110_ A=A-M
00011 00010 1100
Q[0]=0And
restore A
2 00011 00101 100_ shift left AQ
00011 00010 100_ A=A-M
00011 00010 1001 Q[0]=1
1 00011 00101 001_ shift left AQ
00011 00010 001_ A=A-M
00011 00010 (2) 0011 (3) Q[0]=1
Division by Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
Start
nno of bits
M Divisor
A 0
Q Dividend
Shift left AQ
A= A - M
MSB
of A
Q[0] = 1
Q[0] = 0
Restore A
n = n-1
Is n = 0
Quotient in Q
Remainder in A
Stop
=1
=0
Yes
No
n M A Q Operation
4 00011 (3) 00000 (0) 1011 (11) initialize
00011 00001 011_ shift left AQ
00011 11110 011_ A=A-M
00011 00001 0110
Q[0]=0 And
restore A
3 00011 00010 110_ shift left AQ
00011 11111 110_ A=A-M
00011 00010 1100
Q[0]=0And
restore A
2 00011 00101 100_ shift left AQ
00011 00010 100_ A=A-M
00011 00010 1001 Q[0]=1
1 00011 00101 001_ shift left AQ
00011 00010 001_ A=A-M
00011 00010 (2) 0011 (3) Q[0]=1
M = 00011
M’ = 11100
M’+1 = 11101
-M = 11101
-M = 11101
Division by Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
n M A Q Operation
4 00011 (3) 00000 (0) 1011 (11) initialize
00011 00001 011_ shift left AQ
00011 11110 011_ A=A-M
00011 00001 0110
Q[0]=0 And
restore A
3 00011 00010 110_ shift left AQ
00011 11111 110_ A=A-M
00011 00010 1100
Q[0]=0And
restore A
2 00011 00101 100_ shift left AQ
00011 00010 100_ A=A-M
00011 00010 1001 Q[0]=1
1 00011 00101 001_ shift left AQ
00011 00010 001_ A=A-M
00011 00010 (2) 0011 (3) Q[0]=1
Division by Restore Method
11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder)
Start
nno of bits
M Divisor
A 0
Q Dividend
Shift left AQ
A= A - M
MSB
of A
Q[0] = 1
Q[0] = 0
Restore A
n = n-1
Is n = 0
Quotient in Q
Remainder in A
Stop
=1
=0
Yes
No
n M A Q Operation
4 00011 (3) 00000 (0) 1011 (11) initialize
00011 00001 011_ shift left AQ
00011 11110 011_ A=A-M
00011 00001 0110
Q[0]=0 And
restore A
3 00011 00010 110_ shift left AQ
00011 11111 110_ A=A-M
00011 00010 1100
Q[0]=0And
restore A
2 00011 00101 100_ shift left AQ
00011 00010 100_ A=A-M
00011 00010 1001 Q[0]=1
1 00011 00101 001_ shift left AQ
00011 00010 001_ A=A-M
00011 00010 (2) 0011 (3) Q[0]=1

More Related Content

PPTX
Transform coding
DOCX
RTOS APPLICATIONS
PDF
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
PPTX
Instruction sets of 8086
DOCX
ARM7-ARCHITECTURE
PPTX
Ripple Carry Adder
PDF
Noise Models
PPTX
Finite state machines
Transform coding
RTOS APPLICATIONS
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
Instruction sets of 8086
ARM7-ARCHITECTURE
Ripple Carry Adder
Noise Models
Finite state machines

What's hot (20)

PPTX
Status register
PPTX
Application of DSP
PPTX
Restoring & Non-Restoring Division Algorithm By Sania Nisar
PPTX
JPEG Image Compression
PPTX
Image Smoothing using Frequency Domain Filters
PDF
MATLAB / Simulink: Inverted Pendulum on a Moving Cart
PPT
Sensors, actuators and the Raspberry PI using Python
PPTX
Interrupts on 8086 microprocessor by vijay kumar.k
PDF
System Modeling and Hardware Software Co-Design
PPTX
Planning in Artificial Intelligence
PPTX
flag register of 8086
PPT
computer arithmatic
PPTX
Unsigned multiplication
PPTX
Serial Communication in 8051
PPTX
Properties of dft
PDF
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
PPTX
Image compression models
PPT
Image trnsformations
PPTX
Overlap Add, Overlap Save(digital signal processing)
PPTX
Status register
Application of DSP
Restoring & Non-Restoring Division Algorithm By Sania Nisar
JPEG Image Compression
Image Smoothing using Frequency Domain Filters
MATLAB / Simulink: Inverted Pendulum on a Moving Cart
Sensors, actuators and the Raspberry PI using Python
Interrupts on 8086 microprocessor by vijay kumar.k
System Modeling and Hardware Software Co-Design
Planning in Artificial Intelligence
flag register of 8086
computer arithmatic
Unsigned multiplication
Serial Communication in 8051
Properties of dft
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
Image compression models
Image trnsformations
Overlap Add, Overlap Save(digital signal processing)
Ad

Similar to Division method Non Restoring.ppt (20)

PPTX
Binary division restoration and non restoration algorithm
PPTX
Booth's Multiplication Algorithm.pptx
PPTX
restoringnon-restoringdivisionalgorithms-200821091854 (1).pptx
PPTX
281000123036_NIKUNJ AGARWAL_PCC-CSS-301_COMPUTER ORGANISATION.pptx
PPT
Data representation and Arithmetic Algorithms
PDF
Ch_10.pptx.pdf
PPT
aaaaaaaaaaaaaaaaaaaaaaaaaaachapter_1.ppt
PPTX
Data processing and processor organisation
PPT
chapter 3 000Number_Systems.ppt
PPTX
Binary-Arithmeticcccccccccccccccccc.pptx
PDF
Booth's Algorithm Fully Explained With Flow Chart PDF
PDF
Chapter002math
PPTX
CA UNIT II.pptx
PDF
R.Ganesh Kumar
PPT
desigital logic design for electronic and cs students.ppt
PPTX
Restoring and nonrestoring division.pptx
PPTX
ARITHMETIC FOR COMPUTERS
PPTX
Computer Architecture
Binary division restoration and non restoration algorithm
Booth's Multiplication Algorithm.pptx
restoringnon-restoringdivisionalgorithms-200821091854 (1).pptx
281000123036_NIKUNJ AGARWAL_PCC-CSS-301_COMPUTER ORGANISATION.pptx
Data representation and Arithmetic Algorithms
Ch_10.pptx.pdf
aaaaaaaaaaaaaaaaaaaaaaaaaaachapter_1.ppt
Data processing and processor organisation
chapter 3 000Number_Systems.ppt
Binary-Arithmeticcccccccccccccccccc.pptx
Booth's Algorithm Fully Explained With Flow Chart PDF
Chapter002math
CA UNIT II.pptx
R.Ganesh Kumar
desigital logic design for electronic and cs students.ppt
Restoring and nonrestoring division.pptx
ARITHMETIC FOR COMPUTERS
Computer Architecture
Ad

Recently uploaded (20)

PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Well-logging-methods_new................
PPTX
Construction Project Organization Group 2.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Digital Logic Computer Design lecture notes
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT
introduction to datamining and warehousing
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT
Project quality management in manufacturing
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
additive manufacturing of ss316l using mig welding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Geodesy 1.pptx...............................................
PPT
Mechanical Engineering MATERIALS Selection
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Sustainable Sites - Green Building Construction
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Well-logging-methods_new................
Construction Project Organization Group 2.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Digital Logic Computer Design lecture notes
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
introduction to datamining and warehousing
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Project quality management in manufacturing
Internet of Things (IOT) - A guide to understanding
additive manufacturing of ss316l using mig welding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Geodesy 1.pptx...............................................
Mechanical Engineering MATERIALS Selection
UNIT 4 Total Quality Management .pptx
Sustainable Sites - Green Building Construction

Division method Non Restoring.ppt

  • 1. Computer Organization and Architecture Topic: Division Non-Restoring Method by Upendra Mishra (M. Tech., Ph.D.*) KIET Group of Institutions
  • 2. Prerequisites  Shifting of Bits(Left or Right)  Addition  Subtraction  2’s Complement
  • 3. Division of unsigned binary integers  Paper Pencil method  Example:  (Dividend)10/ (Divisor) 4 =(Quotient)2; (Remainder)2 Dividend Divisor Quotient Remainder 4 10 2 8 2
  • 4.  Division of unsigned binary integers is instructive method. There are two methods:  Restore Method  Non - Restore Method Division of unsigned binary integers
  • 6. Flowchart for Unsigned Binary Division- Non-Restore Method start nno of bits M Divisor A 0 Q Dividend A < 0 Shift left AQ A= A + M Shift left AQ A= A - M A < 0 Q[0] = 0 Q[0] = 1 n=n-1 n=0 A < 0 Stop A=A+M Yes No Yes No No No Yes Yes
  • 7. Flowchart for Unsigned Binary Division- Non-Restore Method start nno of bits M Divisor A 0 Q Dividend A < 0 Shift left AQ A= A + M Shift left AQ A= A - M A < 0 Q[0] = 0 Q[0] = 1 n=n-1 n=0 A < 0 Stop A=A+M Yes No Yes No No No Yes Yes
  • 8. Division by Non-Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) N M A Q ACTION 4 00011 00000 1011 Start 00001 011_ Left shift AQ 11110 011_ A=A-M 3 11110 0110 Q[0]=0 11100 110_ Left shift AQ 11111 110_ A=A+M 2 11111 1100 Q[0]=0 11111 100_ Left Shift AQ 00010 100_ A=A+M 1 00010 1001 Q[0]=1 00101 001_ Left Shift AQ 00010 001_ A=A-M 0 00010 0011 Q[0]=1 start nno of bits M Divisor A 0 Q Dividend A < 0 Shift left AQ A= A + M Shift left AQ A= A - M A < 0 Q[0] = 0 Q[0] = 1 n=n-1 n=0 A < 0 Stop A=A+M Yes No Yes No No No Yes Yes M = 00011 M’ = 11100 M’+1 = 11101 -M = 11101 -M = 11101
  • 9. Division by Non-Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) N M A Q ACTION 4 00011 00000 1011 Start 00001 011_ Left shift AQ 11110 011_ A=A-M 3 11110 0110 Q[0]=0 11100 110_ Left shift AQ 11111 110_ A=A+M 2 11111 1100 Q[0]=0 11111 100_ Left Shift AQ 00010 100_ A=A+M 1 00010 1001 Q[0]=1 00101 001_ Left Shift AQ 00010 001_ A=A-M 0 00010(2)(R) 0011(3)(Q) Q[0]=1 start nno of bits M Divisor A 0 Q Dividend A < 0 Shift left AQ A= A + M Shift left AQ A= A - M A < 0 Q[0] = 0 Q[0] = 1 n=n-1 n=0 A < 0 Stop A=A+M Yes No Yes No No No Yes Yes
  • 11. 11 Divide Overflow Condition: 1. The number of bits in dividend is twice as the number of bits in the divisor. AND 2. The higher order half bits of the dividend have a value more than or equal to the value of the total bits of the divisor. OR 1. The divide overflow also checks that whether the divisor is zero or not. • All these conditions are checked before the division process starts. • Let dividend(Q) = 1010 1100 (length 8 bit) Divisor(M) is 0111 (length 4 bit) Here, the number of bits in Q is twice the number of bits in M Higher order half bits of Q is 1010 value 10 total bits value of M is 0111 value 7 so Q>M OR check whether M is 0000 or not if yes also indicate Divide Overflow
  • 12. 12 Reference 1.Computer System Architecture - Morris Mano 2.William Stallings, Computer Organization and Architecture-Designing for Performance, Pearson Education, Seventh edition, 2006.
  • 15. Division by Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) Start nno of bits M Divisor A 0 Q Dividend Shift left AQ A= A - M MSB of A Q[0] = 1 Q[0] = 0 Restore A n = n-1 Is n = 0 Quotient in Q Remainder in A Stop =1 =0 Yes No n M A Q Operation 4 00011 (3) 00000 (0) 1011 (11) initialize 00011 00001 011_ shift left AQ 00011 11110 011_ A=A-M 00011 00001 0110 Q[0]=0 And restore A 3 00011 00010 110_ shift left AQ 00011 11111 110_ A=A-M 00011 00010 1100 Q[0]=0And restore A 2 00011 00101 100_ shift left AQ 00011 00010 100_ A=A-M 00011 00010 1001 Q[0]=1 1 00011 00101 001_ shift left AQ 00011 00010 001_ A=A-M 00011 00010 (2) 0011 (3) Q[0]=1 M = 00011 M’ = 11100 M’+1 = 11101 -M = 11101 -M = 11101
  • 16. Division by Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) n M A Q Operation 4 00011 (3) 00000 (0) 1011 (11) initialize 00011 00001 011_ shift left AQ 00011 11110 011_ A=A-M 00011 00001 0110 Q[0]=0 And restore A 3 00011 00010 110_ shift left AQ 00011 11111 110_ A=A-M 00011 00010 1100 Q[0]=0And restore A 2 00011 00101 100_ shift left AQ 00011 00010 100_ A=A-M 00011 00010 1001 Q[0]=1 1 00011 00101 001_ shift left AQ 00011 00010 001_ A=A-M 00011 00010 (2) 0011 (3) Q[0]=1
  • 17. Division by Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) Start nno of bits M Divisor A 0 Q Dividend Shift left AQ A= A - M MSB of A Q[0] = 1 Q[0] = 0 Restore A n = n-1 Is n = 0 Quotient in Q Remainder in A Stop =1 =0 Yes No n M A Q Operation 4 00011 (3) 00000 (0) 1011 (11) initialize 00011 00001 011_ shift left AQ 00011 11110 011_ A=A-M 00011 00001 0110 Q[0]=0 And restore A 3 00011 00010 110_ shift left AQ 00011 11111 110_ A=A-M 00011 00010 1100 Q[0]=0And restore A 2 00011 00101 100_ shift left AQ 00011 00010 100_ A=A-M 00011 00010 1001 Q[0]=1 1 00011 00101 001_ shift left AQ 00011 00010 001_ A=A-M 00011 00010 (2) 0011 (3) Q[0]=1 M = 00011 M’ = 11100 M’+1 = 11101 -M = 11101 -M = 11101
  • 18. Division by Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) n M A Q Operation 4 00011 (3) 00000 (0) 1011 (11) initialize 00011 00001 011_ shift left AQ 00011 11110 011_ A=A-M 00011 00001 0110 Q[0]=0 And restore A 3 00011 00010 110_ shift left AQ 00011 11111 110_ A=A-M 00011 00010 1100 Q[0]=0And restore A 2 00011 00101 100_ shift left AQ 00011 00010 100_ A=A-M 00011 00010 1001 Q[0]=1 1 00011 00101 001_ shift left AQ 00011 00010 001_ A=A-M 00011 00010 (2) 0011 (3) Q[0]=1
  • 19. Division by Restore Method 11(Dividend)/3(Divisor) 3(Quotient) and 2(Remainder) Start nno of bits M Divisor A 0 Q Dividend Shift left AQ A= A - M MSB of A Q[0] = 1 Q[0] = 0 Restore A n = n-1 Is n = 0 Quotient in Q Remainder in A Stop =1 =0 Yes No n M A Q Operation 4 00011 (3) 00000 (0) 1011 (11) initialize 00011 00001 011_ shift left AQ 00011 11110 011_ A=A-M 00011 00001 0110 Q[0]=0 And restore A 3 00011 00010 110_ shift left AQ 00011 11111 110_ A=A-M 00011 00010 1100 Q[0]=0And restore A 2 00011 00101 100_ shift left AQ 00011 00010 100_ A=A-M 00011 00010 1001 Q[0]=1 1 00011 00101 001_ shift left AQ 00011 00010 001_ A=A-M 00011 00010 (2) 0011 (3) Q[0]=1