Sunday, June 19, 2016

Computer Organization Question set 2

Chapter 2 – instruction cycle
1. Instruction cycle
2. Fetch, decode, execute
3. MAR, MBR, PC, SP, IR, DR, Flag register
4. PSW

Computer Organization Question set 1

Chapter 1 - Introduction
1. Generation of computer, advantages, disadvantages
2. IAS computer structure, block diagram.
3. Von-Neumann concept.
4. Bottleneck of Von-Neumann.
5. Harvard architecture
6.Comparison of Harvard and Von Neumann.

Tuesday, June 14, 2016

Memory

Block diagram of ROM
Short note - PROM,EPROM,EEPROM
SRAM,DRAM
Comparison SRAM,DRAM
Read and write operation of Static ram cell
Read and write operation of Dynamic ram cell
Combinational circuit using ROM
Binary to ASCII using ROM
Full Adder using ROM
Block Diagram of PLA
Combinational circuit using PLA
Comparison ROM,PLA
Block Diagram of PAL
Combinational circuit using PAL
Comparison ROM,PLA,PAL

Sequential circuit using Mealy model and Moore model


Explain Moore type of sequential machine.
Explain Mealy type of sequential machine.
Compare Mealy model and Moore model
State transition,state diagram
Transition table
Rules of conversion
Design serial adder (ignoring carry)
Output=1 when even number of 1's accepted,otherwise output=0
Output=1 when 3k numbers of 1's accepted,otherwise output=0, k>=0
Output=1 when 3k numbers of 1's accepted,otherwise output=0, k>0
Output=1 when 3k+1 numbers of 1's accepted,otherwise output=0, k>=0
Output=1 when even number of 1's and even numbers of 0's accepted,otherwise output=0
Output=1 when even number of 1's and odd numbers of 0's accepted,otherwise output=0
Output=1 when odd number of 1's and even numbers of 0's accepted,otherwise output=0
Output=1 when odd number of 1's and odd numbers of 0's accepted,otherwise output=0
Output=1 when 1011 sequence accepted,otherwise output=0
Sequence generator

Register

Defination of register
Comparison of register and counter
Serial in serial out register
Serial in parallel out register
Parallel in serial out register
Parallel in parallel out register
Register with parallel load (SR,D,JK)
Shift register (Left - SR,D,JK)
Shift register (Right - SR,D,JK)
Bidirectional shift register
Universal shift register

Sunday, May 22, 2016

COUNTER



Synnchronous counter - up- 2 bit,3 bit,4bit
Synnchronous counter - down- 2 bit,3 bit,4bit
Synnchronous counter - up- decimal,octal
Synnchronous counter - down- decimal,octal
Synnchronous counter - up/down 4 bit
Synnchronous counter - up- mod 3,mod 4,mod 6,mod 9,mod 10,mod 12
Synnchronous counter - down- mod 3,mod 4,mod 6,mod 9,mod 10,mod 12
Asynnchronous counter - up- 2 bit,3 bit,4bit
Asynnchronous counter - down- 2 bit,3 bit,4bit
Asynnchronous counter - up- decimal,octal
Asynnchronous counter - down- decimal,octal
Asynnchronous counter - up/down 4 bit
Asynnchronous counter - up- mod 3,mod 4,mod 6,mod 9,mod 10,mod 12
Asynnchronous counter - down- mod 3,mod 4,mod 6,mod 9,mod 10,mod 12
Ring Counter
Johnson Counter
Self stopping counter

Flip-Flop

Flip-Flop

1. Sequential circuit defination, comparison with combnational circuit .
2. What do you mean by memory elements in sequential cir5cuit?
3. Latch - nand based,nor based, compare with flip-flop.
4. Flip-flop- truth table,circuit diagram, state diagram, characteristic equation.
5. Flip-flop - Edge-triggered , level-triggered.
6. Propagation Delay.
7. Race around condition .
8. Master slave flip-flop.
9.Flip flop conversion ( one flip-flop to another flipflop).
10. frequency divider .

Thursday, December 31, 2015

C Program code of Bisection method

 C Program code of Bisection method ( by Shrayashi Majumder)

         1.   Find the root of the equation(x3 - 4x-9=0) using bisection method.
Code:
#include<stdio.h>
#include<math.h>
double f(double x)
{
return x*x*x-4*x-9;
}
void main()
{
int i=0;
double mid,a=0.0,b=1.0,x=0.0,s=1.0,s1=1.0;
while(1)
{
s=f(a)*f(b);
s1=f(-a)*f(-b);
if(s<0.0 || s1<0.0)
        break;
else
{
        a=b;
        b++;
}
}
if(s1<0.0)
{
a=-a;
b=-b;
}
printf("Range %f to %f\n \n",a,b);
printf("\n          a        b        f(a)       f(b)    mid");
while(1)
{
mid=(a+b)/2;
printf("\nStep%d:  %f %f %f %f %f",i++,a,b,f(a),f(b),mid);
if(f(mid)==0.0)
        break;
if(fabs(a-b)<0.0001)
        break;
        if(f(a)*f(mid)<0.0)
                b=mid;
        else
                a=mid;
}
printf("\nx=%f",mid);

}
Output:
Range 2.000000 to 3.000000


          a        b        f(a)       f(b)    mid
Step0:  2.000000 3.000000 -9.000000 6.000000 2.500000
Step1:  2.500000 3.000000 -3.375000 6.000000 2.750000
Step2:  2.500000 2.750000 -3.375000 0.796875 2.625000
Step3:  2.625000 2.750000 -1.412109 0.796875 2.687500
Step4:  2.687500 2.750000 -0.339111 0.796875 2.718750
Step5:  2.687500 2.718750 -0.339111 0.220917 2.703125
Step6:  2.703125 2.718750 -0.061077 0.220917 2.710938
Step7:  2.703125 2.710938 -0.061077 0.079423 2.707031
Step8:  2.703125 2.707031 -0.061077 0.009049 2.705078
Step9:  2.705078 2.707031 -0.026045 0.009049 2.706055
Step10:  2.706055 2.707031 -0.008506 0.009049 2.706543
Step11:  2.706055 2.706543 -0.008506 0.000270 2.706299
Step12:  2.706299 2.706543 -0.004118 0.000270 2.706421
Step13:  2.706421 2.706543 -0.001924 0.000270 2.706482
Step14:  2.706482 2.706543 -0.000827 0.000270 2.706512
x=2.706512
2.  Find the root of equation using bisection method.
Code:
#include<stdio.h>
#include<math.h>
double f(float c3, float c2 , float c1 , float cn , double x)
{
double r;
r=c3*x*x*x+c2*x*x+c1*x+cn;
return r;
}
void main()
{
int i=0;
float c3,c2,c1,cn;
double mid,omid=100.0,a=0.0,b=1.0,s=1.0,s1=1.0,tol;
printf("Enter coefficients:");
scanf("%f%f%f%f",&c3,&c2,&c1,&cn);
printf("Enter Tolerance:");
scanf("%lf",&tol);
while(1)
{
s=f(c3,c2,c1,cn,a)*f(c3,c2,c1,cn,b);
s1=f(c3,c2,c1,cn,-a)*f(c3,c2,c1,cn,-b);
if(s<0.0 || s1<0.0)
        break;
else
{
        a=b;
        b++;
}
}
if(s1<0.0)
{
        a=-a;
        b=-b;
}
printf("Range %f to %f",a,b);
printf("\n    \ta        b        f(a)       f(b)    mid");
while(1)
{
        mid=(a+b)/2;
        printf("\nStep %d: %f %f %f %f %f",i++,a,b,f(c3,c2,c1,cn,a),f(c3,c2,c1,cn,b),mid);
        if(f(c3,c2,c1,cn,mid)==0.0)
                break;
        if(fabs(a-b)<tol)
                break;
        if(f(c3,c2,c1,cn,a)*f(c3,c2,c1,cn,mid)<0.0)
                b=mid;
        else
                a=mid;
        omid=mid;
}
printf("\nx=%f",mid);
}
Output:
Enter coefficients:1 0 -4 -9
Enter Tolerance:0.0001
Range 2.000000 to 3.000000
        a        b        f(a)       f(b)    mid
Step 0: 2.000000 3.000000 -9.000000 6.000000 2.500000
Step 1: 2.500000 3.000000 -3.375000 6.000000 2.750000
Step 2: 2.500000 2.750000 -3.375000 0.796875 2.625000
Step 3: 2.625000 2.750000 -1.412109 0.796875 2.687500
Step 4: 2.687500 2.750000 -0.339111 0.796875 2.718750
Step 5: 2.687500 2.718750 -0.339111 0.220917 2.703125
Step 6: 2.703125 2.718750 -0.061077 0.220917 2.710938
Step 7: 2.703125 2.710938 -0.061077 0.079423 2.707031
Step 8: 2.703125 2.707031 -0.061077 0.009049 2.705078
Step 9: 2.705078 2.707031 -0.026045 0.009049 2.706055
Step 10: 2.706055 2.707031 -0.008506 0.009049 2.706543
Step 11: 2.706055 2.706543 -0.008506 0.000270 2.706299
Step 12: 2.706299 2.706543 -0.004118 0.000270 2.706421
Step 13: 2.706421 2.706543 -0.001924 0.000270 2.706482
Step 14: 2.706482 2.706543 -0.000827 0.000270 2.706512

x=2.706512






Sunday, September 13, 2015