anonymous
  • anonymous
how do I translate pseudocode into machine language like...LOAD STORE MOVE ADD...? for example... if(W=1) then (Z=2) else (if (W=2) then (Y=7) else(if(W=3) then (x=7)
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
RedPrince
  • RedPrince
you need to know a programming language like C/C++, C#, Java, VB, Python etc to turn your pseudo code into machine language!
anonymous
  • anonymous
As RedPrince said, you need to understand the language you are translating into. However, from the example you give, it sounds like you're talking about assembly language, aka machine code. Machine code is tied inextricably to the machine it runs on, hence the name - so you'll also need to know a bit about how that type of CPU works. In general, though, you usually need to retrieve data from memory using commands like "LDA AX, &1" or whatever it's called on your particular system; perform whatever operation you need (eg "CMP AX, 1" to compare W with 1); then store the result (eg STA) or branch to the appropriate part of your code (eg "JNE 4" to jump 4 bytes forward if they're not equal). Unfortunately without knowing exactly what form of machine code you're talking about it's not really possible to give precise details.
anonymous
  • anonymous
First off, two tidbits: Psuedocode is not a real programming language. Assembly is not the same as machine code. You'd need to have a strictly defined language with a functional syntax as described by some grammar, along with developed semantics to understand what the code is doing. Essentially, you'd need to use an actual programming language. The translation from a high-level programming language into low-level assembly (which is assembled into binary machine code) is known as compilation. While you could do compilation by hand, virtually everyone uses automatic compilers. You're probably familiar with these. As an overview, you'd first need to use a real programming language and then compile it somehow to produce the assembly you're looking for.

Looking for something else?

Not the answer you are looking for? Search for more explanations.