Types of 3 address code in Compiler Design,quadruples and triples ppt

Types of 3 address code

3 address code
3 address code types

 

 

 

 

 

 

 

 

Computing 3 address code for simple statements:-

-(a+b)*(c+d)+(a+b+c+d)

Solution:-

Explanation: To make a 3 address code for  a statement  rules of precedence and associative rules are applied.Basic BODMAS rule could be used to check the precedence of the grammar.

Here in this question as Brackets were having more precedence it will be solved first. secondly multiplication as it has more precedence and then addition.

 

Example 2:

 

In this example is having more precedence than other operators ,so it will get solve first ,Secondly ^ symbol is right associative therefore c^f  will be converted  first then b^c. * & / is having equal precedence and both are left associative ,therefore * will be converted first.

 

Here also  is having more precedence than other operators ,so it will get solve first ,Secondly ^ symbol is right associative therefore c^f  will be converted  first then b^c. * & / is having equal precedence and both are left associative ,therefore * will be converted first.

 

 

Example 3:

3 address code

 

 

 

 

Example 4

In this example only rule of associativity is followed .since + is left associative . 3 address code will be generated from left.

 

 

Example 5:

 

Linux operating System

 

What do you think Linux operating system is?

  • It is a operating system just like Window,Mac .’
  • Linux is a generic term referring to Unix-like graphical user interface (GUI) based computer operating systems
  • It is Multi-user, Multitasking, Multiprocessor.
  • Coexists with other Operating Systems
  • Runs on multiple platforms.

Advantages of Linux Operating System.

Read moreLinux operating System

Pizza and Shopping Orders may be Delivered Soon by Drone at your doorstep.

Drone delivery by dominos

Drone which is getting Famous day by day whether it is the Drone used by kids or by Photographers in any event. But one thing is Pretty clear that they are getting Famous and their trend is going Upward for sure.

Read morePizza and Shopping Orders may be Delivered Soon by Drone at your doorstep.

First Ever Driverless Tractor Showcase by Mahindra & Mahindra

Driverless Tractor First Look by Mahindra

The Human Mind and the Technology have grown to a Different Level Today, Human for his ease can do anything and can produce or invent anything that provides him comfort. Following the same approach Mahindra and Mahindra today showcase the first ever Driverless Tractor. 

You must have seen in the movie where the car is moving without the Driver and our First Reaction is wow!!!how that can be possible but it is possible now in the real life as well.

Read moreFirst Ever Driverless Tractor Showcase by Mahindra & Mahindra

Reliance Jio Launches Its 4G featured Phone with an “Effective Price” of “ZERO”

“Reliance Jio” the name when anybody listens must get the feeling of something free. This is the trend made by Mr.Ambani  infact  today when he came to speak in the Reliance AGM,everyone expected something Big due to the very cheap and effective offers provided by him in the recent times.

Read moreReliance Jio Launches Its 4G featured Phone with an “Effective Price” of “ZERO”

Results of 2017 Presidential Election:Ram Nath Kovind elected to be 14th President of India.

 

The NDA candidate Ram Nath Kovind elected to be 14th President of India after defeating opposition Miera Kumar by securing 65.6% of votes.

Out of 4,109 MLA’s , 4,083 i.e 99.37 casted thier vote according to the officials.

Read moreResults of 2017 Presidential Election:Ram Nath Kovind elected to be 14th President of India.

Rakhi Sawant “The Drama Queen” again in trouble:Bail cancelled Fresh Warrents Issused

Rakhi Sawant controversial remarks against sage Valmiki puts her in trouble.Fresh warrants were granted against Rakhi Sawant in Ludhiana Court on Friday.She was supposed to appear in court at the day of hearing on Friday 8 Aug but she he failed to appear in court.

Read moreRakhi Sawant “The Drama Queen” again in trouble:Bail cancelled Fresh Warrents Issused

Type Conversion

Type  conversion generally means a process of converting one type to another type when two different types are assigned. Or we can say that when two variables of different datatypes are used together or are assigned to each other we need to convert type of one variable to match with the type of another variable. When we talk about

Read moreType Conversion

Operator Overloading in C++

 

 

Like Function Overloading C++ also support the Powerful  concept of Operator overloading.Few  operators in C++ such as +,-,++,>,<,<== etc. works on Build in Data types i.e primitive data types such as  (int,char,float) that means we can directly add two integers numbers  or two float numbers .


For Example

int a,b,c;

c=a+b;


Here addition operation is performed on two operands a and b of integer data type .But what if i wants to add two user defined variables. In order to add or compare or to perform any operation on user defined data type , the concept of OPERATOR OVERLOADING is used. When two basic type operands  are added operator overloading takes place but it takes place implicitly.But in-order to perform any operation on user defined datatypes operator overloading is done Explicitly.

Read moreOperator Overloading in C++

Compiler design ppts/notes

In this Compiler Design Section, you will get Complete Notes which is in the Form of Ppts . You just have to click on the Particular link and start reading.