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
juin [17]
3 years ago
6

Assume that the variables v, w, x, y, and z are stored in memory locations 200, 201, 202, 203, and 204, respectively.

Computers and Technology
1 answer:
d1i1m1o1n [39]3 years ago
8 0

Answer and Explanation:

A. To translate the above algorithm to machine language, we first assign have to perform the first part of the operation which is x-y and set the value to the v variable. The x, y and v values are stored in memory location 202, 203 and 200 respectively.

The z value in the memory location 204 is then added to the v value in memory location 200. The first code sequence is stored in memory location 50 and the second code sequence to achieve x+y-z stored in v is stored in memory location 51(as asummed in question)

B. In the second algorithm, we add value in w which is in memory location 201 to value in x in memory location 202 and assign the result to v in memory location 200. The same is done for y+z in memory locations 203 and 204 respectively with result stored in w. We then subtract the values in v in memory location 200 from w and assign the value to v in memory location 200

C. in the first memory location 50, the code sequence v compared to w is stored. If v(stored in memory location 201)is greater than or equal to w(in memory location 202), it moves to address 54 and assigns the y value to x in memory locations 203 and 202 respectively else it assigns z valuein memory 204 to x value in 202 and jumps to next instruction

D. In this algorithm, it first compares y and z in memory locations 203 and 204 respectively in the first code sequence memory 50. In 51, it checks to see if the condition is satisfied and if it is, it jumps to address 53 and adds y and w in their various memory locations and stores it in memory 203 in y otherwise it moves to address 57. Now to get y+w+z, It then adds y +w in memory location 203 in y to z in memory location 204 and then stores the result in y. Subsequently it adds the z value to v and stores the result in v and moves to address 50 where it compares a new set of value as in a loop in the algorithm which continues till the "while" condition can no longer be satisfied.

You might be interested in
Which teamwork characteristic motivates your team members to perform better?
scoundrel [369]
Maybe Encouragement? I don't know, are there any choices to choose from?
4 0
3 years ago
Read 2 more answers
Write and test a Python program to find and print the largest number in a set of real (floating point) numbers. The program shou
fenix001 [56]

I can't read oooooyeaaaa

3 0
4 years ago
Write a program that reads the contents of the two files into two separate lists. The user should be able to enter a boy’s name,
insens350 [35]

Answer:

Check Explanation.

Explanation:

A programming language is used by engineers, technologists, scientists or someone that learnt about programming languages and they use these programming languages to give instructions to a system. There are many types for instance, c++, python, Java and many more.

So, the solution to the question above is given below;

#define the lists

boyNames=[]

girlNames=[]

#open the text file BoyNames.txt

with open('BoyNames.txt','r') as rd_b_fl:

boyNames=rd_b_fl.readlines()

boyNames=[name.strip().lower() for name in boyNames]

#open the text file GirlNames.txt

with open('GirlNames.txt','r') as rd_b_fl:

girlNames=rd_b_fl.readlines()

girlNames=[name.strip().lower() for name in girlNames]

#print the message to prompt for name

print('Enter a name to see if it is a popular girls or boys name.')

while True:

#prompt and read the name

name=input('\nEnter a name to check, or \"stop\" to stop: ').lower()

# if the input is stop, then exit from the program

if name=='stop':

break

# If the girl name exits in the file,then return 1

g_count=girlNames.count(name)

# if return value greater than 0, then print message

if g_count>0:

print(name.title()+" is a popular girls name and is ranked "

+str(girlNames.index(name)+1))

# if return value greater than 0, then print message

#"Not popular name"

else:

print(name.title()+" is not a popular girls name")

## If the boy name exits in the file,then return 1

b_count=boyNames.count(name)

if b_count>0:

print(name.title()+" is a popular boys name and is ranked "

+str(boyNames.index(name)+1))

# if return value greater than 0, then print message

#"Not popular name"

else:

print(name.title()+" is not a popular boys name")

3 0
3 years ago
What is the difference between a hard drive and a tape drive? Hard drives use magnetic heads and are fast to write data; tape dr
liraira [26]

Answer:

A tape drive provides sequential access storage, unlike a hard disk drive, which provides direct access storage. A disk drive can move to any position on the disk in a few milliseconds, but a tape drive must physically wind tape between reels to read any one particular piece of data.

Explanation:

Architecturally tape drives are sequential storage, meaning that if you need to access some data at the end of the tape you needed to seek to the end and retrieve it. This can take seconds or minutes. Disks, OTOH are random access. Some hard drives use rotating media and movable heads , so the seek times are instantaneous , at least compared with tape drives. However, like tapes, there is a big advantage to using a rotating hard drive as sequential storage. It takes time, measured in milliseconds, for a head to move to another track. So traditionally, random access is much slower than sequential access.

SSDs have no internal moving parts so random access occurs in the same time frame as sequential access. Moreover, these drives usually have very high performance. For example, they can saturate a SATA data link, meaning that the SATA connection to the motherboard is now a bottleneck in disk access.

At one time tape drives were very popular. They were a low-cost alternative to using disks as backup. They were especially useful when IBM invented the Winchester “fixed” drive. This meant that the hard drive is fixed within its enclosure like they are today. Prior to this one could remove the drive pack and replace it. This was helpful when upgrading to a new version of the operating system as it was simple to replace the older drive pack should there be a problem.

Tape drives can be used in larger data centers, due to the fact that tape volumes can be removed and replaced so that the actual tape drive can backup many disk sets. Also the tape volumes can be stored off-site or in a fire-proof vault so this is valuable in a data recovery scenario.

4 0
3 years ago
List 7 internal components in a computer system
MrRa [10]
Motherboard
processor
graphic card
memory
storage
power supply
sound card
6 0
3 years ago
Read 2 more answers
Other questions:
  • Select the correct answer
    8·1 answer
  • Windows uses a memory-management technique known as ________ to monitor which applications you frequently use and preloads them
    15·1 answer
  • The part of the poppet valve that contacts the valve seat is called the A. face. B. margin. C. head. D. stem.
    6·2 answers
  • What item on a business card is generally the most prominent?
    10·2 answers
  • Assembling parts and using various machines to create a final product is the process of ______.
    14·1 answer
  • Create a class template for a class named GeneralStackthat holds
    8·1 answer
  • Which term describes the surrounding area of this image?
    10·1 answer
  • You are working on a ticket for a user who cannot access the Internet from their PC. After troubleshooting, how do you confirm t
    10·1 answer
  • Write the text of the program in Python.
    12·1 answer
  • Lab: even/odd values in an array
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!