Arithmetic Operations Multiplication – Division

Published  . 0 views
↓ Download
Arithmetic Operations Multiplication – Division
1 / 1
Arithmetic Operations Multiplication – Division - slide 1 of 20 Arithmetic Operations Multiplication – Division - slide 2 of 20 Arithmetic Operations Multiplication – Division - slide 3 of 20 Arithmetic Operations Multiplication – Division - slide 4 of 20 Arithmetic Operations Multiplication – Division - slide 5 of 20 Arithmetic Operations Multiplication – Division - slide 6 of 20 Arithmetic Operations Multiplication – Division - slide 7 of 20 Arithmetic Operations Multiplication – Division - slide 8 of 20 Arithmetic Operations Multiplication – Division - slide 9 of 20 Arithmetic Operations Multiplication – Division - slide 10 of 20 Arithmetic Operations Multiplication – Division - slide 11 of 20 Arithmetic Operations Multiplication – Division - slide 12 of 20 Arithmetic Operations Multiplication – Division - slide 13 of 20 Arithmetic Operations Multiplication – Division - slide 14 of 20 Arithmetic Operations Multiplication – Division - slide 15 of 20 Arithmetic Operations Multiplication – Division - slide 16 of 20 Arithmetic Operations Multiplication – Division - slide 17 of 20 Arithmetic Operations Multiplication – Division - slide 18 of 20 Arithmetic Operations Multiplication – Division - slide 19 of 20 Arithmetic Operations Multiplication – Division - slide 20 of 20
Description: Arithmetic Operations Multiplication Division System Programming Lab Computer Engineering Department College of Engineering Objectives Write programs in 8086 assembly language for multiplication and division by using different size of

Related Topics

Download Presentation

"Arithmetic Operations Multiplication – Division" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Arithmetic Operations Multiplication – Division System Programming Lab
Computer Engineering Department
College of Engineering<br>
slide2. Objectives Write programs in 8086 assembly language for multiplication and division by using different size of data as bytes or words.
Use arithmetic instructions to accomplish simple binary, BCD, and ASCII arithmetic.<br>
slide3. Theory Another arithmetic instructions found in any microprocessor includes multiplication and division.
Also shown are their uses in manipulating register and memory data.
These operations used any addressing mode with 8-bit or 16 bit.
These arithmetic instructions can be divided into two types of instructions:
First Group : MUL, IMUL, TEST
Second group: DIV, IDIV, CBW, CWD<br>
slide4. Theory These types of operands are supported:
REG
Memory
REG: AX, BX, CX, DX, DI, SI, BP, SP.
Memory: [BX], [BX+SI+7], variable, etc...
Multiplication is performed on bytes, words, or double words, and can be signed integer or unsigned.<br>
slide5. Theory After operation between operands, result is always stored in AL, AX.
The product after a multiplication is always a double-width product.
Some flag bits (overflow and carry) change when the multiply instruction executes
CF, OF<br>
slide6. Multiplication MUL – unsigned multiply
When operand is a byte AX = AL * operand (8 bit)
When operand is a word (AX,DX) = AX * operand
(8 or 16 bit)

IMUL – signed multiply
When operand is a byte AX = AL * operand (8 bit)
When operand is a word (AX,DX) = AX * operand
(8 or 16 bit)<br>
slide7. Unsigned Multiply<br>
slide8. Signed Multiply<br>
slide9. TEST Instruction<br>
slide10. Division DIV – unsigned division
When operand is a byte AL = AX / operand (8 bit)
AH = remainder (modulus)
When operand is a word AX = (AX,DX) / operand
(8 or 16 bit)
DX = remainder (modulus)

IDIV – signed division
When operand is a byte AL = AX / operand (8 bit)
AH = remainder (modulus)
When operand is a word AX = (AX,DX) / operand
(8 or 16 bit)
DX = remainder (modulus)<br>
slide11. Unsigned Divide<br>
slide12. Signed Divide<br>
slide13. Convert Byte into Word<br>
slide14. Convert Word to Double word<br>
slide15. Examples<br>
slide16. Examples<br>
slide17. Examples<br>
slide18. Examples<br>
slide19. Examples 10+10+10 =30
30 + 6 = 36

36 – 2 –2 –2 –2 –2 –2 –2 –2 = 16 2+2+2 =6
6 + 2 = 8

8 – 2 –2 = 4<br>
slide20. Examples<br>