1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Assembly language coding problems .

  1. Jan 18, 2007 #1
    Assembly language coding problems.....

    1. The problem statement, all variables and given/known data

    I am an electrical engineering student and have some HW problems. On the IAS system, what would machine code instruction look like to load the contents of memory address 2??

    I came up with 00001001. Does this look correct?? Also, symbolic respresentation would be: LOAD MQ, M(0010)

    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. Jan 18, 2007 #2


    User Avatar

    Staff: Mentor

    So for those of us who don't understand what you are asking about, but are willing to help, could you please tell us what IAS is? I've coded a lot of assembly, but I'm unfamiliar with the term IAS. But it could be some new standard that I'm not familiar with yet.

    And the title of your thread says "Assembly language" but you appear to be asking about a machine language byte. Those are not the same, correct?
  4. Aug 13, 2011 #3
    Re: Assembly language coding problems.....

    I must be using the same textbook; I am also unsure of this one. berkeman - IAS is a kind of computer that was completed in 1952 and is the prototype of all subsequent general purpose computers. It had a total of 21 instructions and 1000 words of 40 bits each for memory. Each word has a left and right instruction, 20 bits each, first 8 bits are the opcode (tells it to ADD, STOR, SUB, MUL, LOAD, etc) and last 12 bits are the address.

    For the above question I came up with 000010010000000010 or LOAD reg(1), mem(2). According to the IAS instruction chart provided in the book, 00001001 is the opcode for "LOAD MQ,M(X) (transfer contents of memory location X to register MQ)". and the remaining 12 bits I assume should say "2" because that's what memory location we want?

    Also, just for clarification, "machine code" refers to ones and zeros, and "Assembly Language" is using instructions like LOAD, ADD, etc?
  5. Aug 13, 2011 #4


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Re: Assembly language coding problems.....

    You're missing a few bits. You have only 18, not 20, bits. It helps to group them in 4s to make it easier to read and count, e.g. 0000 1001 0000 0000 0010.

    It's also possible that the question is referring to load the contents at location 2 into the accumulator: LOAD M(2).
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Assembly language coding problems .
  1. Assembly Language (Replies: 0)

  2. Assembly Language (Replies: 13)