Computer Science, asked by kngfrankenstein, 11 months ago

Please solve 6 (a), sove the 2nd part "translate the expression (a+b)*(c+d)-(a+b+c) into quadruple and triples".
Please also solve 6(b) representation of statement using three adress code.

Please solve the problems, i'll be very helpful

Attachments:

Answers

Answered by ayushkwar
1

Answer:

Three address code is a type of intermediate code which is easy to generate and can be easily converted to machine code.It makes use of at most three addresses and one operator to represent an expression and the value computed at each instruction is stored in temporary variable generated by compiler. The compiler decides the order of operation given by three address code.

General representation –

a = b op c

Where a, b or c represents operands like names, constants or compiler generated temporaries and op represents the operator

Example-1: Convert the expression a * – (b + c) into three address code.

Example-2: Write three address code for following code

for(i = 1; i<=10; i++)

{

a[i] = x * 5;

}

Similar questions