πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

Three address code

Three address code

  • Three-address code is an intermediate code. It is used by the optimizing compilers.
  • In three-address code, the given expression is broken down into several separate instructions. These instructions can easily translate into assembly language.
  • Each Three address code instruction has at most three operands. It is a combination of assignment and a binary operator.

Example

GivenExpression:

  1. a := (-c * b) + (-c * d)  

Three-address code is as follows:

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

t is used as registers in the target program.

The three address code can be represented in two forms: quadruples and triples.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>