Tag Archives: addition

Write a program in C language for addition of two numbers which have at least 20 digits each – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-025 Course Title : Lab Course Assignment Number : MCA(II)/L-025/Assignment/15-16 Maximum Marks : 50 Weightage : 25% Write a program in C language for addition of two numbers which have at least 20 digits each.   #include<stdio.h> void main() { int I,J,NUM1[20],NUM2[20],RES[21]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; char N1[21],N2[21];/*getchar is excepts NewLIne charter… Read More »

What will be the values of select inputs, carry-in input and result of operation if the following micro-operations are performed? – IGNOU MCA Assignment 2014 – 15

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-012 Course Title : Computer Organisation and Assembly Language Programming Assignment Number : MCA (2)/012/Assign /2014-15 Maximum Marks : 100 Weightage : 25% Assume that you have a machine as shown in section 3.2.2 of Block 3 having the micro-operations as given in Figure 10 on page 62… Read More »

Write a program in ‘C’ for the addition of two polynomials. Use Arrays and Structures. 10m Dec2006

Write a program in ‘C’ for the addition of two polynomials. Use Arrays and Structures. 10m Dec2006 #include<stdio.h> void main() { int poly1[6][2],poly2[6][2],term1,term2,match,proceed,i,j; printf(“Enter the number of terms in first polynomial : “); scanf(“%d”,&term1); printf(“Enter the number of terms in second polynomial : “); scanf(“%d”,&term2); printf(“Enter the coeff and expo of the first polynomial:\n”); for(i=0;i<term1;i++)… Read More »

ASSEMBLY29 An Assembly program using the method of “add-and-shift” loop, in which you use the binary digits of one number to control additions of a shifted version of the other number into a running total; this is essentially the same algorithm you use when multiplying numbers by hand in decimal

Now we will write another Assembly program, Using the method of “add-and-shift” loop, in which you use the binary digits of one number to control additions of a shifted version of the other number into a running total; this is essentially the same algorithm you use when multiplying numbers by hand in decimal Let’s identify variables… Read More »

ASSEMBLY01 An Assembly program to add two numbers present in (variables) memory locations and store the result in next (variable) memory location

Now we will write another Assembly program which does some Addition Operations. Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the variables to be Added and it will be NUM1 and NUM2. Other variables will be holding the Output or Result of the… Read More »