0% found this document useful (0 votes)
8 views2 pages

Microprocessor Logical Operations Guide

The document discusses the practical aspects of microprocessor instructions, specifically focusing on the Logical AND and OR operations. It outlines the rules for both operations, provides examples of how to apply these instructions using hexadecimal and binary conversions, and shows the expected outputs. The instruction format includes various operand combinations, such as registers and memory.

Uploaded by

Rosemary Odor
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)
8 views2 pages

Microprocessor Logical Operations Guide

The document discusses the practical aspects of microprocessor instructions, specifically focusing on the Logical AND and OR operations. It outlines the rules for both operations, provides examples of how to apply these instructions using hexadecimal and binary conversions, and shows the expected outputs. The instruction format includes various operand combinations, such as registers and memory.

Uploaded by

Rosemary Odor
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

‫كلية األمام الكاظم (ع) قسم هندسة تقنيات الحاسوب‬

‫المحاضرة الثالثة‬

Micro processor (practical part)


And instruction : this instruction take two
operand (REG, memory )(memory, REG) .(REG, REG)
( memory, immediate) .(REG, immediate)

use to apply Logical AND between all bits of two


operands, Result is stored in operand1.

These rules apply:

1 AND 1 = 1
1 AND 0 = 0
0 AND 1 = 0
0 AND 0 = 0
*(to find the output we must first convert the
numbers from hexadecimal to binary and apply
AND process between two number then convert
the result to hexadecimal)

Example:

MOV AX, 8h

AND AX, 3h

ret

Out put :ax=0000h

Example

mov ax,1f h

and ax,2f h

ret

Out put :ax=000fh


‫كلية األمام الكاظم (ع) قسم هندسة تقنيات الحاسوب‬
‫المحاضرة الثالثة‬

OR instruction : this instruction take two


operand (REG, memory )(memory, REG) .(REG, REG)
( memory, immediate) .(REG, immediate)

use to apply Logical OR between all bits of two


operands. Result is stored in first operand.

These rules apply:

1 OR 1 = 1
1 OR 0 = 1
0 OR 1 = 1
0 OR 0 = 0

*(to find the output we must first convert the


numbers from hexadecimal to binary and apply
OR process between two number then convert
the result to hexadecimal)

Example1:

MOV AX,4H
OR AX,8H
RET
Out put :ax=000C h

:Example2
MOV AX,3h

OR AX,2h

RET

Out put :ax=0003 h

You might also like