1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anastasy [175]
3 years ago
5

Write an ALP to separate odd and even numbers from an array of N numbers; arrange odd

Computers and Technology
1 answer:
Anuta_ua [19.1K]3 years ago
6 0

Answer:

2000H           LXI H, 2000H           memory pointer first is initialized

2003H           LXI D, 2100H           memory pointer second is initialized

2006H           MVI C, 32H  the counter, is initialized

2008H           MOV A, M     We achieve the number

2009H           ANI 0lH         We now check for an odd number

200BH           JZ 2011H      If it is even then never store it

200EH           MOV A, M     Now we achieve the number again

200FH           STAX D         The number is stored in the result list.

2010 H          INX D            Pointer 2 is incremented

2011 H          INX H            Pointer 1 is incremented

2012H           DCR C          The counter is decremented

2013H           JNZ 2008H   If it is not zero, then repeat it

2016H            LXI H, 2000H         the memory pointer 1st, is initialized

2019H            LXI D, 2200H         the memory pointer 2nd is initialized

201CH          MVI C, 32H  the counter, is initialized

201EH           MOV A, M     Achieve the number

201FH           ANI 0lH           Test whether it is even or not

2021H           JNZ 2027H   If it is odd, then never store it

2024H           MOV A, M      Achieve the number

2025H           STAX D        Save the number in the result list

2026H           INX D           Now increment the pointer number 2

2027H           INX H           Increment pointer number 1

2028H           DCR C          Counter is to be decremented

2029H           JNZ 201EH  If! 0 then repeat it

202CH          HLT    Stop

Explanation:

Please check the answer section.

You might be interested in
If you wanted a computer to store a variable with the content of “110 Maple Street,” which data type would be most appropriate?
hichkok12 [17]

Answer:

string

Explanation:

string holds words while boolean only returns true or false and both binary and float  hold numbers

8 0
4 years ago
Read 2 more answers
Question 1 :George, a user, is having trouble connecting to network resources, including shared folders on the local network and
vazorg [7]

Complete Question:

George, a user, is having trouble connecting to network resources, including shared folders on the local network and Internet resources. Yesterday he was able to connect with no problems. You need to ensure that he can connect to these resources. Which tool should you use FIRST?

Group of answer choices

A. ipconfig

B. Device Manager

C. My Network Places

D. Control Panel

Answer:

A. ipconfig

Explanation:

As a network administrator, to ensure that George can connect to the network resources, shared folders, and internet resources, the tool you should use first is the "ipconfig" in the command line. This is a troubleshooting process that would help to identify the problem and to establish a theory of probable cause.

<em>Since George could connect the previous day without any problem, it is most likely that the TCP/IP settings has been altered. Therefore, to view this settings you'll have to use an ipconfig command. </em>

4 0
4 years ago
A large, closet-sized computer capable of simultaneously processing data for hundreds or thousands of users is most likely a ___
Feliz [49]

Answer:

The correct answer is <u>mainframe</u>

I hope this helps! ^-^

4 0
2 years ago
Suppose an array of country codes and country names is created with a statement like this: $country_codes = array('DEU' =&gt; 'G
valentina_108 [34]

Answer:

Following are the code in the PHP Programming Language:

<u>foreach ($country_codes as $code => $name) { </u>

Explanation:

The following option is true because the Foreach statement only works on the objects and array and this statement is good for accessing the key and value pairs from the array.

So, that's why to print following associative array through echo statement we use the Foreach loop statement with following right condition.

<u>syntax</u>:

foreach (array as value)

{

  code or body to execute;

}

8 0
4 years ago
Not a subject question but please help
Doss [256]

Answer:

You go to account settings, edit your profile and click preferences and then go to choose level and put which grade u are in the options r middle school, high school, and college

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Where can you change your web page SafeSearch settings?
    8·1 answer
  • Image below please help
    9·1 answer
  • Who was one of the founders of the location sharing site Foursquare​
    10·1 answer
  • Write a program that converst the temperature from Celcius to Fahrenheit. The formula is: F (9/5)C+32
    12·2 answers
  • Create a file account.cpp containing a Bank Account Class.
    11·1 answer
  • Inattentional blindness occurs when individuals do not observe certain objects or events because they are focused on something e
    10·2 answers
  • PLEASE help me RIGHT NOW!!!!!!!!! I will give a Brainly to anyone who helps me!
    15·1 answer
  • Which protocol sends a request to view or download a website or file ​
    7·1 answer
  • 45 points!
    9·1 answer
  • Greenpeace used "Mister Splashy Pants" to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!