13-11-2012, 01:51 PM
EEP773 Telecom Software Lab Assignment
EEP773 Telecom Software Lab.pdf (Size: 54.2 KB / Downloads: 33)
We have to do the following things:
1. Using command-line argument get the input co-
ecients (a,b,c,d etc.) of these equations. Check
for the consistency of the equations. Solve the
equations if they are consistent.
2. Write a program in C (create a .c le) and obtain
the assembly code using gcc. Further using gnu
assembler obtain object le and linker to obtain
executable le.
3. Try dierent optimization levels during compi-
lation and recording obser- vations.
LOGIC USED
The logic used is CRAMER's RULE. It is an
explicit formula which can be used to solve any
number of equations. Lets take a system of 3 lin-
ear equations:
ax + by + cz = d
lx + my + nz = p
qx + ry + sz = t
The system can be solved by calculating various
determinats using the augmented matrix of A with
the equation constant column matrix. Thus we can
have three cases:
1. Unique Solution: This is the case when A
is not equal to zero and the consistent and unique
solution is given by:
x = Ax/A; y = Ay/A; z = Az/A
2. Innite Solution: This is tha case when all
the determinants are equal to zero.
3. No Solution: This is tha case when all de-
terminant A is equal to zero and any one of the
determinant Ax, Ay, Az is not equal to zero.