Computer Science, asked by maheksmulla, 7 hours ago

write an assembly language program to separate odd and even numbers from an array and store them in a seperate array and find the largest among them.​

Answers

Answered by sangramraju143
1

Explanation:

A number is said to be odd if its least significant bit is 1 otherwise it is even. Therefore to identify whether the number is even or odd, we perform AND operation with 01 by the help of ANI instruction. If the number is odd then we will get 01 otherwise 00 in the accumulator. ANI instruction also affects the flags of 8085. Therefore if accumulator contains 00 then zero flag gets set otherwise it gets reset.

Similar questions