1.E. Logical AND

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

1.G.

LOGICAL AND
AIM:
To write an ALP for logical AND operation and execute the program using 8086
microprocessor.

EQUIPMENTS REQUIRED:

1. 8086 microprocessor kit


2. Keyboard
3. Connecting probes

Algorithm:
1. Copy the first operand in the AX register.
2. Copy the Second operand in the BX register.
3. Using the logical AND instruction, AND operation between two contents of AX and BX
and result store in the AX register.
4. Show the Accumulator content by using INT3 Instruction.

LOGICAL AND OPERATION:

MEMORY HEXCODE LABEL MNEMONICS COMMENTS


ADDRESS
Copy the first immediate
operand to the AX register
MOV AX,5678H
AX←5678
Copy the second immediate
operand to the BX register
MOV BX,1234H
BX←1234
AND operation between two
contents of AX and BX and
result is stored in the AX
AND AX,BX
register.

Show the AX content by using


INT 3 INT3 Instruction.
FLOW CHART:
Start

Get the first data in AX

Get the second data in BX

Logical AND operation is performed on the content of AX and BX

Show the result in AX register by INT 3

Stop

INPUT OUTPUT
MEMORY MEMORY
DATA DATA
ADDRESS ADDRESS
8001 78H(AL) AX=1230H
8002 56H(AH)
8004 34H(BL)
8005 12H(BH)

RESULT:

Thus the ALP program for Logical AND was executed successfully and the output was
verified.

You might also like