SlideShare a Scribd company logo
COMPUTER ORGANIZATION AND ARCHITECTURE
MODULE-3 PART TWO
- LIPSA SUBHADARSHINI
Subject Code- BC 2007
No. of Credits- 4
BCA 3rd Semester
1
CONTENT
• Computer Arithmetic
• Multiplication Algorithms for fixed point numbers
• Division Algorithms for fixed point numbers
2
MULTIPLICATION ALGORITHM
• Multiplication of two fixed point binary number in signed magnitude representation is done with process
of successive shift and add operation.
• In the multiplication process we are considering successive bits of the multiplier, least significant bit first.
If the multiplier bit is 1, the multiplicand is copied down else 0’s are copied down.
• The numbers copied down in successive lines are shifted one position to the left from the previous
number.
Finally numbers are added and their sum form the product.
• The sign of the product is determined from the sign of the multiplicand and multiplier. If they are alike,
sign of the product is positive else negative.
3
MULTIPLICATION ALGORITHM
Hardware Implementation
4
MULTIPLICATION ALGORITHM
• Registers:
Two Registers B and Q are used to store multiplicand and multiplier respectively.
Register A is used to store partial product during multiplication.
Sequence Counter register (SC) is used to store number of bits in the multiplier.
• Flip Flop:
To store sign bit of registers we require three flip flops (A sign, B sign and Q sign).
Flip flop E is used to store carry bit generated during partial product addition.
• Complement and Parallel adder:
This hardware unit is used in calculating partial product i.e, perform addition required.
Flowchart of Multiplication
• Initially multiplicand is stored in B register and multiplier is stored in Q register.
• Sign of registers B (Bs) and Q (Qs) are compared using XOR functionality (i.e., if both the signs are alike,
output of XOR operation is 0 unless 1) and output stored in As (sign of A register).Note: Initially 0 is
assigned to register A and E flip flop. Sequence counter is initialized with value n, n is the number of bits
in the Multiplier.
5
MULTIPLICATION ALGORITHM
6
MULTIPLICATION ALGORITHM
• Now least significant bit of multiplier is checked. If it is 1 add the content of register A with Multiplicand
(register B) and result is assigned in A register with carry bit in flip flop E. Content of E A Q is shifted to
right by one position, i.e., content of E is shifted to most significant bit (MSB) of A and least significant bit
of A is shifted to most significant bit of Q.
• If Qn = 0, only shift right operation on content of E A Q is performed in a similar fashion.
• Content of Sequence counter is decremented by 1.
• Check the content of Sequence counter (SC), if it is 0, end the process and the final product is present in
register A and Q, else repeat the process.
Example:
Multiplicand = 10111
Multiplier = 10011
7
MULTIPLICATION ALGORITHM
8
DIVISION ALGORITHM
• The Division of two fixed-point binary numbers in the signed-magnitude representation is done by the
cycle of successive compare, shift, and subtract operations.
• The binary division is easier than the decimal division because the quotient digit is either 0 or 1. Also,
there is no need to estimate how many times the dividend or partial remainders adjust to the divisor.
9
DIVISION ALGORITHM
HARDWARE IMPLEMENTATION
• The hardware implementation in the division operation is identical to that required for multiplication and consists of
the following components –
• Here, Registers B is used to store divisor, and the double-length dividend is stored in registers A and Q
• The information for the relative magnitude is given in E.
• A sequence Counter register (SC) is used to store the number of bits in the dividend.
10
DIVISION ALGORITHM
FLOWCHART
11
DIVISION ALGORITHM
• Initially, the dividend is in A & Q and the divisor is in B.
• The sign of the result is transferred into Q, to be part of the quotient. Then a constant is set into the SC to
specify the number of bits in the quotient.
• Since an operand must be saved with its sign, one bit of the word will be inhabited by the sign, and the
magnitude will be composed of n -1 bits.
• The condition of divide-overflow is checked by subtracting the divisor in B from the half of the bits of the
dividend stored in A. If A ≥ B, DVF is set and the operation is terminated before time. If A < B, no
overflow condition occurs and so the value of the dividend is reinstated by adding B to A.
• The division of the magnitudes starts with the dividend in AQ to left in the high-order bit shifted into E.
(Note – If shifted a bit into E is equal to 1, and we know that EA > B as EA comprises a 1 followed by n -1
bits whereas B comprises only n -1 bits). In this case, B must be subtracted from EA, and 1 should insert
into Q, for the quotient bit.
• If the shift-left operation (shl) inserts a 0 into E, the divisor is subtracted by adding its 2’s complement
value and the carry is moved into E. If E = 1, it means that A ≥ B; thus, Q, is set to 1. If E = 0, it means that
A < B, and the original number is reimposed by adding B into A.
• Now, this process is repeated with register A containing the partial remainder.
12
DIVISION ALGORITHM
Example of a binary division using digital
hardware:
Divisor B = 10001, Dividend A = 0111000000
Final Remainder: 00110
Final Quotient: 11010
Now, what if the divisor is greater than or equal to the
dividend. In this process, division overflow occurs. EA
stores the value of A+B, there is no application of Q
here as if the divisor is equal to dividend then Q might
1 and remainder is 0, else in every other condition the
value of quotient 1 and remainder equals to the
dividend.
13

More Related Content

PPTX
UNIT-3 Complete PPT.pptx
PPTX
COA(Unit_3.pptx)
PPTX
Unit_3 OF COMPUTER ARCHITECTUREUnit.pptx
PDF
N akkk4lmealkkk3eqklaflerkpwoerkwflskkes
PPTX
Computer arithmetic
PPTX
1.COMPUTER ARITHMETIC which is related to coa.pptx
PDF
Computer arithmetic
PPTX
Lecture-5b - BCD Adder and Carry Propagation, Comparator (2).pptx
UNIT-3 Complete PPT.pptx
COA(Unit_3.pptx)
Unit_3 OF COMPUTER ARCHITECTUREUnit.pptx
N akkk4lmealkkk3eqklaflerkpwoerkwflskkes
Computer arithmetic
1.COMPUTER ARITHMETIC which is related to coa.pptx
Computer arithmetic
Lecture-5b - BCD Adder and Carry Propagation, Comparator (2).pptx

Similar to Module 3 of computer organization and architecture (20)

PDF
Unit-8-Computer-Arithmetic.pdf
PDF
Digital Logic 06Booith Algorithm (1).pdf
PPTX
Multiplication algorithm
PPTX
Computer arithmetics (computer organisation &amp; arithmetics) ppt
PPTX
18CSC203J_COA_Unit 2 final.pptx
PDF
Arithmetic Unit Addition Subtraction Multiplication and Division
PPT
Addition and subtraction with signed magnitude data (mano
PDF
Arithmetic Microoperation.pdf
PPTX
CSO PPT.pptx
PDF
Computer arithmetics coa project pdf version
PPTX
Hemanth143
PPTX
Restoring & Non-Restoring Division Algorithm By Sania Nisar
PPTX
EPC Module-5 ES.pptxModule-5 ES.pptxModule-5 ES.pptx
DOCX
Computer organization and architecture lab manual
PPTX
Computer organization algorithms like addition and subtraction and multiplica...
PDF
Lecture2 binary multiplication
PPTX
Unit-3 PPT_Updated COA.pptx (1).pptx coa
PDF
2.1COMPUTER ORG_ Computer Arithmetic.pdf
PPTX
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
PPTX
CA UNIT II.pptx
Unit-8-Computer-Arithmetic.pdf
Digital Logic 06Booith Algorithm (1).pdf
Multiplication algorithm
Computer arithmetics (computer organisation &amp; arithmetics) ppt
18CSC203J_COA_Unit 2 final.pptx
Arithmetic Unit Addition Subtraction Multiplication and Division
Addition and subtraction with signed magnitude data (mano
Arithmetic Microoperation.pdf
CSO PPT.pptx
Computer arithmetics coa project pdf version
Hemanth143
Restoring & Non-Restoring Division Algorithm By Sania Nisar
EPC Module-5 ES.pptxModule-5 ES.pptxModule-5 ES.pptx
Computer organization and architecture lab manual
Computer organization algorithms like addition and subtraction and multiplica...
Lecture2 binary multiplication
Unit-3 PPT_Updated COA.pptx (1).pptx coa
2.1COMPUTER ORG_ Computer Arithmetic.pdf
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
CA UNIT II.pptx
Ad

Recently uploaded (20)

PPTX
Artificial Intelligence
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
Project quality management in manufacturing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
573137875-Attendance-Management-System-original
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPT
introduction to datamining and warehousing
PPTX
Current and future trends in Computer Vision.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
PPT on Performance Review to get promotions
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
additive manufacturing of ss316l using mig welding
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Artificial Intelligence
Safety Seminar civil to be ensured for safe working.
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
R24 SURVEYING LAB MANUAL for civil enggi
Project quality management in manufacturing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
573137875-Attendance-Management-System-original
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
introduction to datamining and warehousing
Current and future trends in Computer Vision.pptx
UNIT 4 Total Quality Management .pptx
Mechanical Engineering MATERIALS Selection
OOP with Java - Java Introduction (Basics)
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT on Performance Review to get promotions
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Internet of Things (IOT) - A guide to understanding
Lecture Notes Electrical Wiring System Components
additive manufacturing of ss316l using mig welding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Ad

Module 3 of computer organization and architecture

  • 1. COMPUTER ORGANIZATION AND ARCHITECTURE MODULE-3 PART TWO - LIPSA SUBHADARSHINI Subject Code- BC 2007 No. of Credits- 4 BCA 3rd Semester 1
  • 2. CONTENT • Computer Arithmetic • Multiplication Algorithms for fixed point numbers • Division Algorithms for fixed point numbers 2
  • 3. MULTIPLICATION ALGORITHM • Multiplication of two fixed point binary number in signed magnitude representation is done with process of successive shift and add operation. • In the multiplication process we are considering successive bits of the multiplier, least significant bit first. If the multiplier bit is 1, the multiplicand is copied down else 0’s are copied down. • The numbers copied down in successive lines are shifted one position to the left from the previous number. Finally numbers are added and their sum form the product. • The sign of the product is determined from the sign of the multiplicand and multiplier. If they are alike, sign of the product is positive else negative. 3
  • 5. MULTIPLICATION ALGORITHM • Registers: Two Registers B and Q are used to store multiplicand and multiplier respectively. Register A is used to store partial product during multiplication. Sequence Counter register (SC) is used to store number of bits in the multiplier. • Flip Flop: To store sign bit of registers we require three flip flops (A sign, B sign and Q sign). Flip flop E is used to store carry bit generated during partial product addition. • Complement and Parallel adder: This hardware unit is used in calculating partial product i.e, perform addition required. Flowchart of Multiplication • Initially multiplicand is stored in B register and multiplier is stored in Q register. • Sign of registers B (Bs) and Q (Qs) are compared using XOR functionality (i.e., if both the signs are alike, output of XOR operation is 0 unless 1) and output stored in As (sign of A register).Note: Initially 0 is assigned to register A and E flip flop. Sequence counter is initialized with value n, n is the number of bits in the Multiplier. 5
  • 7. MULTIPLICATION ALGORITHM • Now least significant bit of multiplier is checked. If it is 1 add the content of register A with Multiplicand (register B) and result is assigned in A register with carry bit in flip flop E. Content of E A Q is shifted to right by one position, i.e., content of E is shifted to most significant bit (MSB) of A and least significant bit of A is shifted to most significant bit of Q. • If Qn = 0, only shift right operation on content of E A Q is performed in a similar fashion. • Content of Sequence counter is decremented by 1. • Check the content of Sequence counter (SC), if it is 0, end the process and the final product is present in register A and Q, else repeat the process. Example: Multiplicand = 10111 Multiplier = 10011 7
  • 9. DIVISION ALGORITHM • The Division of two fixed-point binary numbers in the signed-magnitude representation is done by the cycle of successive compare, shift, and subtract operations. • The binary division is easier than the decimal division because the quotient digit is either 0 or 1. Also, there is no need to estimate how many times the dividend or partial remainders adjust to the divisor. 9
  • 10. DIVISION ALGORITHM HARDWARE IMPLEMENTATION • The hardware implementation in the division operation is identical to that required for multiplication and consists of the following components – • Here, Registers B is used to store divisor, and the double-length dividend is stored in registers A and Q • The information for the relative magnitude is given in E. • A sequence Counter register (SC) is used to store the number of bits in the dividend. 10
  • 12. DIVISION ALGORITHM • Initially, the dividend is in A & Q and the divisor is in B. • The sign of the result is transferred into Q, to be part of the quotient. Then a constant is set into the SC to specify the number of bits in the quotient. • Since an operand must be saved with its sign, one bit of the word will be inhabited by the sign, and the magnitude will be composed of n -1 bits. • The condition of divide-overflow is checked by subtracting the divisor in B from the half of the bits of the dividend stored in A. If A ≥ B, DVF is set and the operation is terminated before time. If A < B, no overflow condition occurs and so the value of the dividend is reinstated by adding B to A. • The division of the magnitudes starts with the dividend in AQ to left in the high-order bit shifted into E. (Note – If shifted a bit into E is equal to 1, and we know that EA > B as EA comprises a 1 followed by n -1 bits whereas B comprises only n -1 bits). In this case, B must be subtracted from EA, and 1 should insert into Q, for the quotient bit. • If the shift-left operation (shl) inserts a 0 into E, the divisor is subtracted by adding its 2’s complement value and the carry is moved into E. If E = 1, it means that A ≥ B; thus, Q, is set to 1. If E = 0, it means that A < B, and the original number is reimposed by adding B into A. • Now, this process is repeated with register A containing the partial remainder. 12
  • 13. DIVISION ALGORITHM Example of a binary division using digital hardware: Divisor B = 10001, Dividend A = 0111000000 Final Remainder: 00110 Final Quotient: 11010 Now, what if the divisor is greater than or equal to the dividend. In this process, division overflow occurs. EA stores the value of A+B, there is no application of Q here as if the divisor is equal to dividend then Q might 1 and remainder is 0, else in every other condition the value of quotient 1 and remainder equals to the dividend. 13