answersLogoWhite

0

Test the least significant bit of the number. If it is 1, the number must be odd. If it 0 it must be even. To achieve this, place the value in B then use the ANI instruction:

ANI 01H

Thus if B is 01H, B is odd, otherwise it is even. Works for both positive and negative integers.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

How can you separate odd and even numbers from the array of 10 numbers in 8085 microprocessor?

To separate odd and even numbers from an array of 10 numbers in the 8085 microprocessor, you can utilize a loop and the AND instruction. First, load each number from the array into a register and perform a bitwise AND operation with the value 1. If the result is 0, the number is even; if the result is 1, the number is odd. You can then store the odd numbers in one memory location and the even numbers in another, iterating through the entire array until all numbers are processed.


Write a 8085 microprocessor program to check whether a give number is even or odd?

Lxi h, 2000h mov a,m mov b,a inx h mov a,m add b sta 2002h hlt


Ora a is executed in intel 8085 microprocessor?

The ORA A instruction does not change the contents of the accumulator. It does, however, set flags to indicate something about the value of the accumulator. In particular, Z means the result is zero, N means it is negative, and P means it has an odd number of ones.


How can a given number can be checked as even or odd in 8085?

AND it to 1 and test for zero. All even numbers have 0 in the last bit.


Is 27 an odd number or even number?

27 is an odd number.


An odd number minus an odd number?

An odd number minus an odd number is an even number.


What happens when you subtract a odd number and an odd number?

when an odd number is subtracted from an odd number the answer is an even number.


the number 5 is?

odd


Is 825 a odd or even number?

it is an odd number


What is odd x odd?

An odd number times an odd number is an odd number no matter which 2 odds you multiply.


What is an odd number minus an even number?

an odd numberSubtracting an odd number from an even number will always result in an odd number.


An odd number plus an even number is what kind of number?

It is an odd number.