Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:07:54+00:00 2026-06-01T16:07:54+00:00

I have to write a program using the IAS instruction set that will loop

  • 0

I have to write a program using the IAS instruction set that will loop through two arrays and add each element of the one to the other and store the result in a thrid array. So for example I have to take A(1) + B(1) and store it in C(1) and then take A(2) + B(2) and store in C(2) and so on until I get to A(20) + B(20) stored in C(20). But I don’t know how to create a counter controlled loop in IAS… anyways… here is what I have done.. but it doesn’t work 🙂

00000001 LOAD M(A[1]) Transfer M(A[1]) to the accumulator
00000101 ADD M(B[1]) Add M(B[1]) to AC and store result in AC
00100001 STOR M(C[1]) Transfer contents of accumulator to memory location C[1]

thanks for any help 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:07:55+00:00Added an answer on June 1, 2026 at 4:07 pm

    For anyone in the future. There are actually numerous solutions to this question, this is the one I went with (it may need some elaboration):

    * Initialize a variable 'count' to 999
    Label: TOP
    00000001    LOAD M(A[count])            Transfer M(A[count]) to the accumulator
    00000101    ADD M(B[count])             Add M(B[count]) to AC and store result in AC
    00100001    STOR M(C[count])            Transfer contents of accumulator to memory location C[count]
    00001010    LOAD M(address of count)    Transfer the contents of M(address of count) to the AC
    00000110    SUB M(the number 1)         Subtract one from AC and store in AC
    00100001    STOR M(D)                   Transfer contents of AC to location M(D)
    00001111    JUMP+ M(X,0:19)             If number in accumulator is non-negative take next
                                            instruction from left half of M(X)
    LH: go to TOP
    RH: exit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to write a program that test if two files are duplicates (have
I have to write a simple program that will draw something in a Windows
I have to write program that create process using pipe() . My first task
I am using Python to write a program that looks through lists of lists
I'm trying to write a program using MPI and I have a question that
I have been asked to write a program using python for an assignment. I
I have to write a program that sniffs network packets (part1-the simple part). And
I have to write a daemon program that constantly runs in the background and
I have been assigned wit the task to write a program that takes a
I have to write a program that performs highly computationally intensive calculations. The program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.