please give the code for this

Faslan

Solid State Member
Messages
19
Translate the expression

IF X = 4 THEN X = X + P × Q + 3
into a low-level language form using any low-level languageyou wish.

Define the action of any instruction you use.
 
Translate the expression

IF X = 4 THEN X = X + P × Q + 3
into a low-level language form using any low-level languageyou wish.

Define the action of any instruction you use.
using C language
 
Translate the expression

IF X = 4 THEN X = X + P × Q + 3
into a low-level language form using any low-level languageyou wish.

Define the action of any instruction you use.

This is fairly trivial in any C-based language, especially since you don't even need to worry about order of operation or anything.

In fact, you can almost type this word-for-word into C and get a working result. Assuming you have the variables P and Q defined and initialized already, it would just mean adding three characters and removing the THEN.

I don't want to just give you the code because this sounds like a homework assignment. If you try it and post your attempt here, we can tell you what you did wrong.
 
Agreed with Ihamil64, this is clearly a homework assignment. At least make an attempt and we can indicate errors, but don't blindly post without any effort of your own - it's pointless and wastes everyone's time.

Writing the question on this forum took more effort than finding the answer and writing the code, as pointed out above - you've practically written the entire thing in English (or rather, the question setter did) - so it could hardly be any simpler!
 
Back
Top Bottom