answersLogoWhite

0

How do you detect odd number in microprocessor 8085?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

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

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you detect odd number in microprocessor 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp