answersLogoWhite

0


Best Answer

Take the mid value of the no. of inputs. If the key is greater than the mid value then add the mid value and the last value; then divide by two. Again check the middle value for the key and keep repeating this until you find the key.

If key is smaller than the mid value. Add the first value to the mid value and divide by two. You will find the new mid value to compare and check for the key. Loop it until you get the key location.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the logic for binary search in masm 8086 program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Implementation of binary search algorithm using ASM assembler in 8086?

Hi, I hope this is useful http://www.indiastudychannel.com/projects/2748-Assembly-language-program-for-Binary-search.aspx good luck!


8086 assembly program to sort a list of integers?

assembly language program for sorting an array using 8086 microprocessor.


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language


Which microprocessor accepts the program written for 8086 without any changes?

Which microprocessor accepts the program written for 8086 without any changes?


Write a program in 8086 assembly language to draw a circle?

You need an 8086 assembly language pencil.


What is usage parity bit in 8086 Microprocessor?

P (parity)is the count of '1's in the last 8 bits of any binary number expressed as even or odd. Logic 0 for odd parity; logic 1 for even parity.-if a number contains three binary one bits, it has odd parity-if a number contains no one bits, it has even parity


Where dowe define interrupts in 8086?

Breaking the sequence of program


Do an 8086 assembler program to find parity of a given number?

sdfsdfsfsggbcvbg


Can a program written in 8085 microprocessor run in 8086 microprocessor?

No. They have a different instruction set. However, the processors are sufficiently similar that an 8086 assembler could assemble an 8085 program, given appropriate constants and macros. Some things, however, such as RIM, SIM, RST, etc. do not have equivalents in the 8086.


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Purpose of program counter in a microprocessor is?

In 8085 program counter stores the address of the next instruction which is to be fecthed.same function is performed by instruction pointer in 8086.