Javatpoint Logo
Javatpoint Logo

Quadruples

The quadruples have four fields to implement the three address code. The field of quadruples contains the name of the operator, the first source operand, the second source operand and the result respectively.

Quadruples

                Fig: Quadruples field

Example

Three-address code is as follows:

			t1 := -b
			t2 := c + d
            t3 := t1 * t2
			a := t3

These statements are represented by quadruples as follows:

Operator Source 1 Source 2 Destination
(0) uminus b - t1
(1) + c d t2
(2) * t1 t2 t3
(3) := t3 - a

Next TopicTriples





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA