0% found this document useful (0 votes)
19 views22 pages

CH 2 - Arithmetic Instruction Group

Uploaded by

Sampada Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views22 pages

CH 2 - Arithmetic Instruction Group

Uploaded by

Sampada Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

1) ADD r

• The content of register r are added to the content of accumulator.


• The result is stored in accumulator.
• Let [D]=35H and [A]=05H
• Instruction: ADD D 35H = 0 0 1 1 0 1 0 1
+ 05H = 0 0 0 0 0 1 0 1

00111010 = 3A H

• After execution: A = 3AH


• Instruction length: 1- byte
• Addressing mode: Register addressing mode
• Flags affected : All
2) ADD M
• The content of the content of memory location, whose address is stored in H-L pair are
added with accumulator.
• The result is placed in accumulator.
• Let HL = D000H and [A]=05H

Memory
D000 35 H

• Instruction: ADD M
• After execution: A = 3AH
• Instruction length: 1- byte
• Addressing mode: Register Indirect Addressing mode
• Flags affected : All
3) ADI 8-bit data
• This instruction adds the 8-bit immediate data specified in second byte of instruction
to the content of accumulator.
• The result is placed in accumulator.
• Let [A] = 05H
• Instruction: ADI 35H
• After execution: A = 3AH
• Instruction length: 2- byte
• Addressing mode: Immediate Addressing mode
• Flags affected : All
4) ADC r
• This instruction adds the content of register and the carry flag to the content of A .

• The result is stored in accumulator.

• Let [A] = 12 H, [D] = 33 H AND [Cy] = 01 H

• Instruction: ADC D

• After execution: [A] = 46H

• Instruction length: 1- byte

• Addressing mode: Register addressing mode

• Flags affected : All


5) ADC M
• The content of memory location whose address place in H-L register pair and content of Cy
flag are added to the content of accumulator
• The result is placed in accumulator.
• Let [HL] = F000H [A] = 35 H [Cy] = 00H

Memory
F000 05 H

• Instruction: ADC M
• After execution: A = 3AH
• Instruction length: 1- byte
• Addressing mode: Register Indirect Addressing mode
• Flags affected : All
6) ACI 8-bit data
• This instruction adds the 8-bit immediate data along with the content of carry flag to
the content of accumulator.
• The result is placed in accumulator.
• Let [Cy]=1H and [A]= 05H
• Instruction: ADI 55H
• After execution: A = 5B H
• Instruction length: 2- byte
• Addressing mode: Immediate Addressing mode
• Flags affected : All
7) SUB r
• The content of register r are subtracted from the content of accumulator.
• The result is stored in accumulator.
• Let [A]=50 H & [C]=40 H
• Instruction: ADD D 50H = 0 1 0 1 0 0 0 0
- 40H = 0 1 0 0 0 0 0 0

00010000 = 10 H

• After execution: A = 10H


• Instruction length: 1- byte
• Addressing mode: Register addressing mode
• Flags affected : All
8) SUB M
• The content of memory location, whose address is stored in H-L pair is subtracted from
accumulator.
• The result is placed in accumulator.
• Let HL = D000H and [A]=07H

Memory
D000 05 H

• Instruction: SUB M
• After execution: A = 02H
• Instruction length: 1- byte
• Addressing mode: Register Indirect Addressing mode
• Flags affected : All
9) SUI 8-bit data
• This instruction subtracts the 8-bit immediate data specified in second byte of
instruction from the content of accumulator.
accumulator
• The result is placed in accumulator.
• Let [A] = 1FH
• Instruction: SUI 1FH
• After execution: A = 00H
• Instruction length: 2- byte
• Addressing mode: Immediate Addressing mode
• Flags affected : All
10) SBB r
• This instruction subtracts the content of register r and the carry flag from the content of
Accumulator .

• The result is stored in accumulator.

• Let [A] = 03 H, [D] = 01 H AND [Cy] = 01 H

• Instruction: SBB D

• After execution: [A] = 01H

• Instruction length: 1- byte

• Addressing mode: Register addressing mode

• Flags affected : All


11) SBB M
• The content of memory location whose address place in H-L register pair and content of Cy
flag are subtracted from the content of accumulator
• The result is placed in accumulator.
• Let [HL] = F000H [A] = 07 H [Cy] = 00H

Memory
F000 05 H

• Instruction: SBB M
• After execution: A = 02H
• Instruction length: 1- byte
• Addressing mode: Register Indirect Addressing mode
• Flags affected : All
12) SBI 8-bit data
• This instruction subtracts the 8-bit immediate data along with the content of carry flag
from the content of accumulator.
• The result is placed in accumulator.
• Let [Cy]= 0 and [A]= 07H
• Instruction: SBI 05H
• After execution: A = 02 H
• Instruction length: 2- byte
• Addressing mode: Immediate Addressing mode
• Flags affected : All
13) INR r
• The content of register r are incremented by one.
• The result is stored in the same place.
• The register r can be A, B, C, D, E, H and L.
• Let [A]= 07H
• Instruction: INR A
• After execution: A = 08 H
• Instruction length: 1- byte
• Addressing mode: Register Addressing mode
• Flags affected : All flags except carry flag may be affected.
14) INR M
• The content of memory location, whose address is stored in H-L pair is incremented by
one.
• The result is placed in the same place.
• Let HL = D000H
Memory
D000 05 H

• Instruction: INR M
• After execution: A = 06H
• Instruction length: 1- byte
• Addressing mode: Register Indirect Addressing mode
• Flags affected : All flags except carry flag may be affected.
15) INX Rp
• The content of register pair Rp are incremented by one.
• The result is stored in the same place.
• Let [HL]= C000H
• Instruction: INX H
• After execution: HL = C001 H
• Instruction length: 1- byte
• Addressing mode: Register Addressing mode
• Flags affected : None.
16) DCR r
• The content of register r is decremented by one.
• The result is stored in the same place.
• The register r can be A, B, C, D, E, H and L.
• Let [C]= 07H
• Instruction: DCR C.
• After execution: C = 06 H
• Instruction length: 1- byte
• Addressing mode: Register Addressing mode
• Flags affected : All flags except carry flag may be affected.
17) DCR M
• The content of memory location, whose address is stored in H-L pair is decremented by
one.
• The result is placed in the same place.
• Let HL = D000H Memory
D000 05 H

• Instruction: DCR M
• After execution: Memory
D000 04 H

• Instruction length: 1- byte


• Addressing mode: Register Indirect Addressing mode
• Flags affected : All flags except carry flag may be affected.
18) DCX Rp
• The content of register pair Rp are decremented by one.
• The result is stored in the same place.
• Let [HL]= C002H
• Instruction: DCX H
• After execution: HL = C001 H
• Instruction length: 1- byte
• Addressing mode: Register Addressing mode
• Flags affected : None.
19) DAD Rp
• The contents of register pair rp are added to the contents of H-L pair.
• Result is placed in register H and L.
• Let [HL]= C002H and [BC] = 0001H
• Instruction: DAD B
• After execution:
[L] = 02H + 01H = 03H
[H]= C0H + 00H = C0H
So [HL] = C003 H
• Instruction length: 1- byte
• Addressing mode: Register Addressing mode
• Flags affected : Only Carry.
20) DAA
• The eight bit number in the accumulator is adjusted to form two four—bit BCD digits by
this instruction.
• Let [A]= 0FH
• Instruction: DAA
• After execution:
[A] = 15BCD
• Instruction length: 1- byte
• Addressing mode: Implied Addressing mode
• Flags affected : All.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy