A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing


  • 4 years ago

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)

  • This Question is Open
  1. RedPrince
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    you need to know a programming language like C/C++, C#, Java, VB, Python etc to turn your pseudo code into machine language!

  2. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

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

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...


  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.