0% found this document useful (0 votes)
66 views8 pages

Lab 9 Objective: To Study and Understand The Assembly Language Instructions For Basic Logic Operations

The document discusses basic logic operations in assembly language such as AND, OR, NOT, XOR, NEG, and TEST. It explains how each logic operation works at the bitwise level and provides examples of assembly code to implement the operations using Intel 8086 instructions. The objective is to understand and study assembly language instructions for basic logic operations.

Uploaded by

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

Lab 9 Objective: To Study and Understand The Assembly Language Instructions For Basic Logic Operations

The document discusses basic logic operations in assembly language such as AND, OR, NOT, XOR, NEG, and TEST. It explains how each logic operation works at the bitwise level and provides examples of assembly code to implement the operations using Intel 8086 instructions. The objective is to understand and study assembly language instructions for basic logic operations.

Uploaded by

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

LAB 9

Objective
To study and understand the Assembly Language instructions for basic logic
operations.

Basic Logic Operations


A logic operation works on a bitwise level. Starting on the left, a bit from each
operand has the logical operation performed and the results in a Boolean value.
This process proceeds until all the bits have had the logical operation performed.
The Intel 8086 Microprocessor instruction set contains instruction for performing
basic logic operations. The examples of these logic operations are AND, OR,
NOT, XOR and NEG instructions.

AND Instruction
The AND Operation is used to set bits to 0. AND a bit with 1, it stays the same.
AND a bit with 0, it becomes 0.

A B A.B
0 0 0
1 0 0
0 1 0
1 1 1
Two Inputs AND Gate

Program
Input

84
Output

OR Instruction
The OR Operation is used to set bits to 1. OR a bit with 0, it stays the same. OR a
bit with 1, it becomes 1.

A B A+B
0 0 0
1 0 1
0 1 1
1 1 1
Two Inputs OR Gate

85
Program
Input

Output

86
NOT Instruction
NOT instruction is an inverter.

A A̅
0 1
1 0
NOT Gate

Program
Input

Output

87
XOR Instruction
The XOR Operation is used to set bits to the opposite value. XOR a bit with 0, it
stays the same. XOR a bit with 1, it becomes the opposite value.

A B A⊕B
0 0 0
1 0 1
0 1 1
1 1 0
Two Input XOR Gate

Program
Input

Output

88
NEG Instruction
NEG instruction is act as 2’s complement.

Program
Input

Output

89
TEST Instruction
TEST instruction is used to check which flag is ON and OFF i.e., CF, PF, ZF.

Program
Input

Output

90
Conclusion
In this lab, we have learnt about the Assembly Language instructions for basic
logic operations. We have also implemented these instructions i.e., AND, OR,
NOT, XOR, NEG and TEST instructions in program using Emu8086.

91

You might also like