Tag Archives: 2008

Explain briefly the working of two-pass assembler. 5m Jun2008

Explain briefly the working of two-pass assembler. 5m Jun2008   Two-pass assembler: Assemblers typically make two or more passes through a source program in order to resolve forward references in a program. A forward reference is defined as a type of instruction in the code segment that is referencing the label of an instruction, but… Read More »

List three differences between Dynamic RAM and Static RAM. 3m Jun2008

List three differences between Dynamic RAM and Static RAM. 3m Jun2008 Static RAM   ü  SRAM uses transistor to store a single bit of data ü  SRAM does not need periodic refreshment to maintain data ü  SRAM’s structure is complex than DRAM ü  SRAM are expensive as compared to DRAM ü  SRAM are faster than… Read More »

Draw logic circuit for a converter that converts 4 bit binary input to its equivalent BCD number. 8m Jun2008

Draw logic circuit for a converter that converts 4 bit binary input to its equivalent BCD number. 8m Jun2008 A four bit number can be any number value between 0 to 15  i.e.  0 to F in Hexadecimal. BCD is a number which is represented in binary as a decimal number hence it can have… Read More »

Write an 8086 assembly language program that finds the smallest and the second smallest number from a list of 10 numbers stored in memory. 7m Jun2008

Write an 8086 assembly language program that finds the smallest and the second smallest number from a list of 10 numbers stored in memory. 7m Jun2008 To understand program for Largest or Smallest in an array in detail Please Click this link below http://cssimplified.com/computer-organisation-and-assembly-language-programming/an-assembly-program-for-finding-the-largest-number-in-array-of-10-elements DATA SEGMENT ARR DB 5,3,7,1,9,2,6,8,4 LEN DW $-ARR SMALL DB ? SECOND… Read More »

A computer has 64 words RAM with a word size of 16 bits and a cache memory of 8 Blocks with block size of 32 bits. 9m Jun2008

Assume a computer having 64 word RAM and cache memory of 8 blocks. Where can we find memory location 25 in cache when the following are used:  (i) Direct mapping (ii) Associative mapping (iii) 2-way set associative (2 blocks per set) mapping Assume 1 word – 16 bits, block size = 32 bits. 9m Jun2008 … Read More »

Simplify the following Boolean function in SOP form using K-Map: F (A, B, C, D) = Σ ( 0,1, 2, 4, 6, 8, 9, 12, 14, 15 ). Draw logic circuit diagram. 8m Jun2008

Simplify the following Boolean function in SOP form using K-Map: F (A, B, C, D) = Σ ( 0,1, 2, 4, 6, 8, 9, 12, 14, 15 ). Also, draw the simplified logic circuit diagram. 8m Jun2008  K-Map for F is: Thus, the simplified equations for F (A, B, C, D) = Σ (0,1, 2, 4, 6,… Read More »

Write a program and flowchart to display the following pattern: 6m Jun2008

Write a program and flowchart to display the following pattern: 6m Jun2008 1 2 3 4 5 6 7 8 9 1 0 11 12 13 14 15 16 17 18 19 20 21   Code: #include<stdio.h> void main() { int I,J,C=1; clrscr(); printf(“Result :\n”); for(I=0;I<6;I++) { printf(“\n”); for(J=0;J<=I;J++) { printf(“%d “,C++); } printf(“\n”); }… Read More »

Give a brief note on null pointer assignment. Write a program to illustrate this concept. 6m Jun2008

Give a brief note on null pointer assignment. Write a program in ‘C’ to illustrate this concept. 6m Jun2008 Null Pointer Assignment It does make sense to assign an integer value to a pointer variable. An exception is an assignment of 0, which is sometimes used to indicate some special condition. A macro is used… Read More »

Write a program to read formatted data from the file. 6m Jun2008

Write a program to read formatted data from the file. 6m Jun2008 CODE:- #include<stdio.h> void main() { int account; char name[30]; double bal; FILE *fp; if((fp=fopen(“data.txt”,”r”))== NULL) printf(“FILE not present \n”); else do{ fscanf(fp,”%d%s%lf”,&account,name,&bal); if(!feof(fp)) { if(bal==0) printf(“%d %s %lf\n”,account,name,bal); } }while(!feof(fp)); getch(); } [codesyntax lang=”c”] #include<stdio.h> void main() { int account; char name[30]; double… Read More »

Differences between structure and union in C programming with example

What are the differences between structure and union? Give one illustrative example of usage of the union. 8m Jun2008 Structure in C programming Structure is commonly referred to as a user-defined data type. C’s structures allow you to store multiple variables of any type in one place (the structure). A structure can contain any of… Read More »