in Compiler Design retagged by
547 views
0 votes
0 votes
$\text{What is three address code representation of this ?}$

-a+b|c^d^e*f|g
in Compiler Design retagged by
547 views

4 Comments

what is '|' ?
0
0
Sir, It is Bitwise OR
0
0

ok, then corresponding 3-addr code will be,
Note: i have taken ^ as exponential operator, otherwise if it is bitwise XOR, answer given by @Reena is correct below

t1=-a

t2=t1+b

t3=d^e

t4=c^t3

t5=t4*f

t6=t2|t5

t7=t6|g

2
2
I expecting same..thank you sir
0
0

1 Answer

1 vote
1 vote
$^$ :Bitwise exclusive OR.

$|$ :bitwise inclusive OR.

$t1$=$e*f$

$t2=-a+b$

$t3$ $=$ $c$ $^$ $d$

$t4=t3$ $^$ $t1$

$t5=t2|t4$

$t6=t5|g$

NOTE: exclusive OR has higher precedence than bitwise inclusive OR in C.

1 comment

Please look above one I think that is Right
0
0