SlideShare uma empresa Scribd logo
ADD instructions
Part #1
University of Duhok,
Computer Science Dept.
ADD instruction
The ADD instruction has the following format:
ADD destination,source
The ADD instruction tells the CPU to add the source and the
destination operands and put the result in the destination.
Destination = Destination + Source
• The destination operand can be a register or a memory location.
• The source operand can be an immediate, a register, or a memory
location.
By: Jawaher A. Fadhil Computer Science Dept.
• Two memory operands cannot be used in one instruction.
• When an immediate value is used as an operand, it is sign-
extended to the length of the destination operand format.
ADD AL,1355H
ADD instruction
ADD [500],[502]
By: Jawaher A. Fadhil Computer Science Dept.
Example#1
To add two numbers such as 25H and 34H, each can be
moved to a register and then added together:
MOV AL,25h
MOV BL,34h
ADD AL,BL AL= 25H +34H
AL=59H BL=34H
By: Jawaher A. Fadhil Computer Science Dept.
Example#2
Write the Assembly language instructions to add the values
6BH and A8H. Place the result in register AX?
MOV AX,0000
MOV AL,6BH
ADD AL,A8
By: Jawaher A. Fadhil Computer Science Dept.
AL=AL+A8
6 B
+
A 8
HEX
0
1
2
.
.
9
A
B
C
D
E
F
10
11
12
13
14
15
16
3
1
1 1
AX= 00 13CF= 1
Example#2
Write the Assembly language instructions to add the values
6BH and A8H. Place the result in register AX?
MOV AX,0000
MOV AL,6BH
ADD AX,A8
By: Jawaher A. Fadhil Computer Science Dept.
AX=AL+A8
6 B
+
A 8
3
1
1 1
AX= 01 13
CF= 0
By: Jawaher A. Fadhil Computer Science Dept.
Add instruction-part1

Mais conteúdo relacionado

Semelhante a Add instruction-part1

MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
RAHUL RANJAN
 
Chapter 7
Chapter 7Chapter 7
4bit PC report
4bit PC report4bit PC report
4bit PC report
tanvin
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
shibbirtanvin
 
Memory reference
Memory referenceMemory reference
Memory reference
rajshreemuthiah
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
Dilum Bandara
 
CH-3 CO-all-about-operating-system(Update).pptx
CH-3 CO-all-about-operating-system(Update).pptxCH-3 CO-all-about-operating-system(Update).pptx
CH-3 CO-all-about-operating-system(Update).pptx
XyzXyz338506
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Bilal Amjad
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
Prof. Dr. K. Adisesha
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGA
Azhar Syed
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
Rai University
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
Education Front
 
Compreport
CompreportCompreport
Compreport
xdarlord
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Rai University
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
shiji v r
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set class
shiji v r
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptx
JEEVANANTHAMG6
 
Addressing Modes of 8051.pptx
Addressing Modes of 8051.pptxAddressing Modes of 8051.pptx
Addressing Modes of 8051.pptx
TumkurInfomedia
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
EfendyMasuli
 

Semelhante a Add instruction-part1 (20)

MPMC UNIT-2.pdf
MPMC UNIT-2.pdfMPMC UNIT-2.pdf
MPMC UNIT-2.pdf
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
4bit PC report
4bit PC report4bit PC report
4bit PC report
 
4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]4bit pc report[cse 08-section-b2_group-02]
4bit pc report[cse 08-section-b2_group-02]
 
Memory reference
Memory referenceMemory reference
Memory reference
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
CH-3 CO-all-about-operating-system(Update).pptx
CH-3 CO-all-about-operating-system(Update).pptxCH-3 CO-all-about-operating-system(Update).pptx
CH-3 CO-all-about-operating-system(Update).pptx
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 4 (Introduction ...
 
Central processor organization
Central processor organizationCentral processor organization
Central processor organization
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGA
 
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed controlB.sc cs-ii-u-3.1-basic computer programming and micro programmed control
B.sc cs-ii-u-3.1-basic computer programming and micro programmed control
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 
Compreport
CompreportCompreport
Compreport
 
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed controlBca 2nd sem-u-3.1-basic computer programming and micro programmed control
Bca 2nd sem-u-3.1-basic computer programming and micro programmed control
 
Instruction set of 8085
Instruction set  of 8085Instruction set  of 8085
Instruction set of 8085
 
Instruction set class
Instruction set   classInstruction set   class
Instruction set class
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptx
 
Addressing Modes of 8051.pptx
Addressing Modes of 8051.pptxAddressing Modes of 8051.pptx
Addressing Modes of 8051.pptx
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
 

Mais de Jawaher Abdulwahab Fadhil

Binary adder
Binary adderBinary adder
Number system
Number systemNumber system
Dealing with 8086 memory
Dealing with 8086 memoryDealing with 8086 memory
Dealing with 8086 memory
Jawaher Abdulwahab Fadhil
 
MOV instruction part1
MOV  instruction part1MOV  instruction part1
MOV instruction part1
Jawaher Abdulwahab Fadhil
 
Cisco webex installation guide
Cisco webex installation guideCisco webex installation guide
Cisco webex installation guide
Jawaher Abdulwahab Fadhil
 
A survey on the applications of smart home
A survey on the applications of smart homeA survey on the applications of smart home
A survey on the applications of smart home
Jawaher Abdulwahab Fadhil
 
Flag register and add instruction
Flag register and  add instructionFlag register and  add instruction
Flag register and add instruction
Jawaher Abdulwahab Fadhil
 
Computer Organization -part 1
Computer Organization -part 1Computer Organization -part 1
Computer Organization -part 1
Jawaher Abdulwahab Fadhil
 
iOS Operating System
iOS Operating SystemiOS Operating System
iOS Operating System
Jawaher Abdulwahab Fadhil
 
Android Operating system
Android Operating systemAndroid Operating system
Android Operating system
Jawaher Abdulwahab Fadhil
 
Types of Mobile Applications
Types of Mobile ApplicationsTypes of Mobile Applications
Types of Mobile Applications
Jawaher Abdulwahab Fadhil
 
Ultrasonic with buzzer
Ultrasonic with buzzerUltrasonic with buzzer
Ultrasonic with buzzer
Jawaher Abdulwahab Fadhil
 
Lecture6 modulation
Lecture6 modulationLecture6 modulation
Lecture6 modulation
Jawaher Abdulwahab Fadhil
 
Lecture 5: The Convolution Sum
Lecture 5: The Convolution SumLecture 5: The Convolution Sum
Lecture 5: The Convolution Sum
Jawaher Abdulwahab Fadhil
 
Lecture 4: Classification of system
Lecture 4: Classification of system Lecture 4: Classification of system
Lecture 4: Classification of system
Jawaher Abdulwahab Fadhil
 
Lecture3: Operations of Ct signals
Lecture3: Operations of Ct signalsLecture3: Operations of Ct signals
Lecture3: Operations of Ct signals
Jawaher Abdulwahab Fadhil
 
Lecture2 : Common continuous time signals
Lecture2 : Common continuous time signalsLecture2 : Common continuous time signals
Lecture2 : Common continuous time signals
Jawaher Abdulwahab Fadhil
 
Lecture1: Introduction to signals
Lecture1: Introduction to signalsLecture1: Introduction to signals
Lecture1: Introduction to signals
Jawaher Abdulwahab Fadhil
 
Arduino- Serial communication
Arduino-  Serial communicationArduino-  Serial communication
Arduino- Serial communication
Jawaher Abdulwahab Fadhil
 
Arduino based Applications-part 6
Arduino based Applications-part 6Arduino based Applications-part 6
Arduino based Applications-part 6
Jawaher Abdulwahab Fadhil
 

Mais de Jawaher Abdulwahab Fadhil (20)

Binary adder
Binary adderBinary adder
Binary adder
 
Number system
Number systemNumber system
Number system
 
Dealing with 8086 memory
Dealing with 8086 memoryDealing with 8086 memory
Dealing with 8086 memory
 
MOV instruction part1
MOV  instruction part1MOV  instruction part1
MOV instruction part1
 
Cisco webex installation guide
Cisco webex installation guideCisco webex installation guide
Cisco webex installation guide
 
A survey on the applications of smart home
A survey on the applications of smart homeA survey on the applications of smart home
A survey on the applications of smart home
 
Flag register and add instruction
Flag register and  add instructionFlag register and  add instruction
Flag register and add instruction
 
Computer Organization -part 1
Computer Organization -part 1Computer Organization -part 1
Computer Organization -part 1
 
iOS Operating System
iOS Operating SystemiOS Operating System
iOS Operating System
 
Android Operating system
Android Operating systemAndroid Operating system
Android Operating system
 
Types of Mobile Applications
Types of Mobile ApplicationsTypes of Mobile Applications
Types of Mobile Applications
 
Ultrasonic with buzzer
Ultrasonic with buzzerUltrasonic with buzzer
Ultrasonic with buzzer
 
Lecture6 modulation
Lecture6 modulationLecture6 modulation
Lecture6 modulation
 
Lecture 5: The Convolution Sum
Lecture 5: The Convolution SumLecture 5: The Convolution Sum
Lecture 5: The Convolution Sum
 
Lecture 4: Classification of system
Lecture 4: Classification of system Lecture 4: Classification of system
Lecture 4: Classification of system
 
Lecture3: Operations of Ct signals
Lecture3: Operations of Ct signalsLecture3: Operations of Ct signals
Lecture3: Operations of Ct signals
 
Lecture2 : Common continuous time signals
Lecture2 : Common continuous time signalsLecture2 : Common continuous time signals
Lecture2 : Common continuous time signals
 
Lecture1: Introduction to signals
Lecture1: Introduction to signalsLecture1: Introduction to signals
Lecture1: Introduction to signals
 
Arduino- Serial communication
Arduino-  Serial communicationArduino-  Serial communication
Arduino- Serial communication
 
Arduino based Applications-part 6
Arduino based Applications-part 6Arduino based Applications-part 6
Arduino based Applications-part 6
 

Último

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 

Último (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 

Add instruction-part1

  • 1. ADD instructions Part #1 University of Duhok, Computer Science Dept.
  • 2. ADD instruction The ADD instruction has the following format: ADD destination,source The ADD instruction tells the CPU to add the source and the destination operands and put the result in the destination. Destination = Destination + Source • The destination operand can be a register or a memory location. • The source operand can be an immediate, a register, or a memory location. By: Jawaher A. Fadhil Computer Science Dept.
  • 3. • Two memory operands cannot be used in one instruction. • When an immediate value is used as an operand, it is sign- extended to the length of the destination operand format. ADD AL,1355H ADD instruction ADD [500],[502] By: Jawaher A. Fadhil Computer Science Dept.
  • 4. Example#1 To add two numbers such as 25H and 34H, each can be moved to a register and then added together: MOV AL,25h MOV BL,34h ADD AL,BL AL= 25H +34H AL=59H BL=34H By: Jawaher A. Fadhil Computer Science Dept.
  • 5. Example#2 Write the Assembly language instructions to add the values 6BH and A8H. Place the result in register AX? MOV AX,0000 MOV AL,6BH ADD AL,A8 By: Jawaher A. Fadhil Computer Science Dept. AL=AL+A8 6 B + A 8 HEX 0 1 2 . . 9 A B C D E F 10 11 12 13 14 15 16 3 1 1 1 AX= 00 13CF= 1
  • 6.
  • 7. Example#2 Write the Assembly language instructions to add the values 6BH and A8H. Place the result in register AX? MOV AX,0000 MOV AL,6BH ADD AX,A8 By: Jawaher A. Fadhil Computer Science Dept. AX=AL+A8 6 B + A 8 3 1 1 1 AX= 01 13 CF= 0
  • 8. By: Jawaher A. Fadhil Computer Science Dept.