Friday 27 September 2013

VHDL PROGRAM FOR HALF ADDER-USING NOR GATES

LIBrary IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

entity halfadd is
    port (a:in STD_LOGIC;
    b:in STD_LOGIC;
    hsum:out STD_LOGIC;
    hcarry:out STD_LOGIC );
end halfadd;

architecture halfadd_nor of halfadd is

component nor2 is
        port (a:in STD_LOGIC;
    b:in STD_LOGIC;
    c_nor:out std_logic );
end component ;   

signal s1,s2,s3,s4:std_logic;

begin
   
    x1:nor2 port map (a,b,s3);
    x2:nor2 port map (a,a,s1);
    x3:nor2 port map (b,b,s2);
    x4:nor2 port map (s1,s2,s4);
    x5:nor2 port map (s4,s3,hsum);   
    hcarry <= s4;
   
end halfadd_nor;

   

Wednesday 18 September 2013

BASIC OPENGL PROGRAM

#include<GL/glut.h>
#include<stdlib.h>

const int screenWidth=640;
const int screenHeight=480;


void myInit()
{
     glClearColor(1.0,1.0,1.0,0.0);
     glColor3f(1.0,0.0,0.0);
     glPointSize(3.0);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluOrtho2D(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);

    
     }
    
     void myDisplay()
     {
          glClear(GL_COLOR_BUFFER_BIT);
         // glColor3f(0.0,0.0,1.0);
          glRecti(10,10,100,100);
          glFlush();
          }
                            

    
     int main(int argc, char **argv)
     {
         glutInit(&argc,argv);
         glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
         glutInitWindowSize(screenWidth,screenHeight);
         glutCreateWindow("drawing rectangles");
         glutDisplayFunc(myDisplay);
      
         myInit();
        
         glutMainLoop();
         }

OPENGL PROGRAM TO DRAW MOSAIC

#include<GL/glut.h>
#include<stdlib.h>
#include<time.h>

const int screenWidth=640;
const int screenHeight=480;


void myInit()
{
     glClearColor(1.0,1.0,1.0,0.0);
     glColor3f(1.0,0.0,0.0);
     glPointSize(3.0);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluOrtho2D(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);

    
     }
    
     void myDisplay()
     {
          srand(time(NULL));
          GLint i=0;
          GLint x1=0,y1=0,x2=0,y2=0;
          GLfloat col=0;
          glClear(GL_COLOR_BUFFER_BIT);
          for(i=0;i<50;i++)
          {
                           x1=rand()%screenWidth;
                           y1=rand()%screenHeight;
                           x2=rand()%screenWidth;
                           y2=rand()%screenHeight;
                           col=(rand()%10)/10.0;
                           glColor3f(col/2,col,col);
                           glRecti(x1,y1,x2,y2);
                           }
                           glFlush();
          }
                            

    
     int main(int argc, char **argv)
     {
         glutInit(&argc,argv);
         glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
         glutInitWindowSize(screenWidth,screenHeight);
         glutCreateWindow("drawing rectangles");
         glutDisplayFunc(myDisplay);
      
         myInit();
        
         glutMainLoop();
         }

OPENGL PROGRAM TO PLOT AND MEASURE RAND FUNCTION

#include<GL/glut.h>
#include<stdlib.h>
#include<math.h>
#define NUM 480

const int screenWidth=640;
const int screenHeight=480;


void myInit()
{
     glClearColor(1.0,1.0,1.0,0.0);
     glColor3f(1.0,0.0,0.0);
     glPointSize(2.0);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluOrtho2D(0.0,640.0,0.0,480.0);
     }
    


    void myDisplay()
    {
         glClear(GL_COLOR_BUFFER_BIT);
         GLint i=0;
         glBegin(GL_POINTS);
         for(i=0;i<5000;i++)
         glVertex2i((rand()+rand())%NUM,(rand()+rand())%NUM);
         glEnd();
         glFlush();
         }
          
         
          int main(int argc ,char **argv)
          {
               glutInit(&argc,argv);
               glutInitDisplayMode(GLUT_SINGLE| GLUT_RGB );
               glutInitWindowSize(640,480);
               //glutInitWindowPosition(200,200);
               glutCreateWindow("plot showing corelation of consecutive random values");
               glutDisplayFunc(myDisplay);
               myInit();
               glutMainLoop();
               }

OPENGL PROGRAM TO DISPLAY SINC FUNCTION

#include<GL/glut.h>
#include<stdlib.h>
#include<math.h>

const int screenWidth=640;
const int screenHeight=480;


void myInit()
{
     glClearColor(0.0,0.0,0.0,0.0);
     glColor3f(1.0,0.0,0.0);
     glPointSize(3.0);
     //glMatrixMode(GL_PROJECTION);
     //glLoadIdentity();
     //gluOrtho2D(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);
    
     }
    
     //set window
     void setWindow(float left,float right,float bottom,float top)
     {
          glMatrixMode(GL_PROJECTION);
          glLoadIdentity();
          gluOrtho2D(left,right,bottom,top);
          }
         
          //set view port
          void setViewport(int left,int right,int bottom,int top)
          {
               glViewport(left,right,bottom,top);
               }
    
     void myDisplay()
     {
          GLdouble i=0;
          GLfloat x=0;
          glClear(GL_COLOR_BUFFER_BIT);
          setWindow(-4.0,4.0,-0.3,1.0);
          //setViewport(640,0,480,0);
          glBegin(GL_POINTS);
          for(x=-4.0;x<4.0;x+=0.1)
          glVertex2f(x,sin(3.1415*x)/(3.1415*x));
         
          glEnd();
         
         
          glColor3f(0.0,1.0,0.0);
          glBegin(GL_LINE_STRIP);
          glVertex2i(320,480);
          glVertex2i(320,0);
          glEnd();
         
          glFlush();
          }
                                 
                                                   
                                                   
                                                   
    
    
     int main(int argc, char **argv)
     {
         glutInit(&argc,argv);
         glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
         glutInitWindowSize(640,480);
         glutCreateWindow("sinc function = sin(PI*X)/PI*X");
         glutDisplayFunc(myDisplay);
      
         myInit();
        
         glutMainLoop();
         }


3D OPENGL PROGRAM

#include<GL/glut.h>
#include<stdlib.h>

const int screenWidth=640;
const int screenHeight=480;
int x=0,y=0;


void
mykeyboard(unsigned char thekey ,int mx,int my)
{
          switch(thekey)
          {
                        case 'w':
                             y+=1;
                             break;
                             case 's':
                                  y-=1;
                                  break;
                                  case 'a':
                                       x-=1;
                                       break;
                                       case 'd':
                                            x+=1;
                                            break;
                                            case 'q':
                                                 x=0,y=0;
                                                 break;
                                           
                                            default:
                                                    break;
                                                    }
         
         gluLookAt(0,0,2.0,x,y,0.0,0.0,1.0,0.0);
         glutPostRedisplay();
      }

         

void myInit()
{
     glClearColor(0.0,0.0,0.0,0.0);
    
    
           glColor3f(0.0,1.0,0.0);
          glMatrixMode(GL_PROJECTION);
          glLoadIdentity();
          glOrtho(-100,100,-100,100,0.1,100);
          glMatrixMode(GL_MODELVIEW);
          glLoadIdentity();

     }
    
    
     void myDisplay()
     {

          glClear(GL_COLOR_BUFFER_BIT);
          //glutWireCube(25.0);
          //glutWireSphere(20,15,15);
          glutWireTeapot(20);
          glFlush();
          }
         
          int main(int argc,char **argv)
          {
              glutInit(&argc,argv);
              glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
              glutInitWindowSize(screenWidth,screenHeight);
              glutCreateWindow("lines");
              glutDisplayFunc(myDisplay);
              glutKeyboardFunc(mykeyboard);
              myInit();
             
              glutMainLoop();
              }
             

SIMPLE OPENGL PROGRAM TO DRAW AN LINE

#include<GL/glut.h>
#include<stdlib.h>

const int screenWidth=640;
const int screenHeight=480;

void myInit()
{
     glClearColor(1.0,1.0,1.0,0.0);
     glColor3f(0.0,0.0,0.0);
     glPointSize(2.0);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
     gluOrtho2D(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight);
     }
    
    
     void myDisplay()
     {
          glClear(GL_COLOR_BUFFER_BIT);
          glBegin(GL_LINES);
                            glVertex2i(10,10);
                            glVertex2i(100,100);
          glEnd();
          glFlush();
          }
         
          int main(int argc,char **argv)
          {
              glutInit(&argc,argv);
              glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
              glutInitWindowSize(screenWidth,screenHeight);
              glutCreateWindow("lines");
              glutDisplayFunc(myDisplay);
              myInit();
             
              glutMainLoop();
              }
             

SIMPLE TEXT EDITOR IN C IN TURBO C++

#include<conio.h>

#define LEFT 10
#define TOP 8
#define BOTTOM 21
#define RIGHT 50
#define WIDTH (RIGHT-LEFT+1)
#define HEIGHT (BOTTOM-TOP+1)

#define LKEY 75
#define RKEY 77
#define UKEY 72
#define DKEY 80
#define INS 82   //inserts a new line
#define DEL 83   //delets the current line
#define ENTER 10 //to goto next line
#define DELC  8  //delete an single charecter


//int buff[WIDTH][HEIGHT];  //to store current state and to retrive

int main()
{
//variables
int xpos,ypos;  //controlling mouse position
int bck_color;  //present backvground color
char ch;
//clearing the background
textbackground(BLACK);
clrscr();

//...........................initialising the editor......................//
xpos=wherex(); //returns currrent cursor xposition
ypos=wherey(); //returns current  cursor yposition
gotoxy(xpos,ypos); //initialise the cursor at the starting point of the editor
textcolor(RED);
window(LEFT,TOP,RIGHT,BOTTOM);
textbackground(GREEN);
clrscr();
//........................................................................//

while((ch=getch())!='.')//untill pullstop is pressed
{

if(ch==0)  //if it is combined  key
{
switch(getch())
{
case LKEY:
xpos=(xpos<=1)?  (1):(--xpos); //checking the cursor not to cross leftmost limit
gotoxy(xpos,ypos);
break;

case RKEY:
xpos=(xpos>=WIDTH)? (WIDTH):(++xpos); //checking right mostrt bound
gotoxy(xpos,ypos);
break;

case UKEY:
ypos=(ypos<=1)? (1):(--ypos);
gotoxy(xpos,ypos);
break;

case DKEY:
ypos=(ypos>=HEIGHT)? (HEIGHT):(++ypos);
gotoxy(xpos,ypos);
break;

case DEL:
delline();
break;

case INS:
insline();
break;


default:
break;
}//end switch
}//end if

/*else if(ch==13)
{
xpos=LEFT;
ypos=(ypos>=HEIGHT)? (HEIGHT):(++ypos);//goto next line
}*/

//erasing charecters with backspace
else if(ch==8)
{
xpos=wherex();
ypos=wherey();

gotoxy(xpos,ypos);
ch=' ';
putch(ch);
}

//simply writing the charecters
else
{
xpos=wherex();
ypos=wherey();
gotoxy(xpos,ypos);
putch(ch);
}

}//end while

getchar();
return 0;
}

C PROGRAM TO DEMONSTRATE STRUCTURES USING FUNCTIONS

#include<stdio.h>
#include<stdlib.h>


struct personell
{
    char name[20];
    int agnumb;
};

struct personell newname(void);   //function for reading i/p and returns an structure
void agentlist(struct personell); //function takes the structure and displays it

int main()
{

    struct personell agent1;
    struct personell agent2;

    agent1=newname();
    agent2=newname();

    agentlist(agent1);
    agentlist(agent2);

    getchar();
    return 0;
}


struct personell newname()
{
    char numstr[20];
    struct personell agent;

    printf("enter agent name:");
    gets(agent.name);
    printf("enter agent number:");
    gets(numstr);
    agent.agnumb=atoi(numstr);
    return(agent);
}


void agentlist(struct personell agent)
{

    printf("\n agent name=%s",agent.name);
    printf("\nagent num=%d",agent.agnumb);
}

Sunday 15 September 2013

PASSWORD PROGRAM IN C


#include<stdio.h>
#include<conio.h>
#include<string.h>


int main()
{
    char username[25],password[12];
    int i=0;

    printf("enter your username:");
    gets(username);

    printf("\n\nenter password:");

    while((password[i]=getch())!='\r')
    {
        printf("%c",'*');
        i++;
    }
password[i+1]='\0';



    printf("\n\n<<<<<<<<<<................>>>>>>>>>>>>>....................");
    printf("\nusername=%s",username);
    printf("\npassword=%s",password);
    getch();
    return 0;
}

c program to draw lines with arrow keys


#include<stdio.h>
#include<conio.h>

#define LKEY 75
#define RKEY 77
#define UKEY 72
#define DKEY 80

#define ACROSS 205
#define UPDOWN 186

int main()
{
char ch;
int x=40,y=12;
clrscr();

gotoxy(x,y);

while((ch=getch())==0)
{
switch( getch() )
{
case LKEY :x--;ch=ACROSS;break;
case RKEY :x++;ch=ACROSS;break;
case UKEY :y--;ch=UPDOWN;break;
case DKEY :y++;ch=UPDOWN;break;
}
gotoxy(x,y);
putch(ch);
}

getch();
return 0;
}

Saturday 14 September 2013

C PROGRAM TO DELETE AN ELEMENT IN THE ARRY -C STRING PROGRAMS

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>

int main()
{
    char str[81];
    unsigned int length=0; //to store string length
    unsigned int pos=0; //posotion of the element to be deleted


    printf("enter your string:");
    gets(str);
    length=strlen(str);

    printf("\nenter the position of the  element you want to delete:");
    scanf("%ud",&pos);
    pos=pos-1;   //user thinks first element of the array as 1

    if(pos<0)
    {
        printf("specified element position cnnot be located in the string\n");
        getch();
        exit(1);
    }

    strcpy(&str[pos],&str[pos+1]);
    printf("\n");
    puts(str);
}

Friday 13 September 2013

C PROGRAM FOR ADDITION OF TWO MATRICES


#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

int main()
{
    int i=0,j=0 ;//looping purpose
    unsigned int r1=0,c1=0,r2=0,c2=0;
    unsigned int num_elm=0;
    unsigned int m1[10][10],m2[10][10] ,k[10][10]; //initaliaing the matrices


a:
printf("enter no of rows of matrix_1:");
scanf("%ud",&r1);
printf("enter no of  col of matrix_1:");
scanf("%ud",&c1);

printf("enter no of rows of matrix_2:");
scanf("%ud",&r2);
printf("enter no of  col of matrix_2:");
scanf("%ud",&c2);


if(r1!=r2 || c1!=c2)
{
    printf("matrices with uneqal dimensions cannot be added\n");
    getchar();
    exit(1);
}


//reading values for matrix 1

for(i=0;i<r1;i++)
    for(j=0;j<c1;j++)
{
    printf("\nenter the element m1[%d][%d]: ",i,j);
    scanf("%d",&m1[i][j]);
}


//reading values for matrix 2
for(i=0;i<r2;i++)
    for(j=0;j<c2;j++)
{
    printf("\nenter the element m2[%d][%d]: ",i,j);
    scanf("%d",&m2[i][j]);
}


//implimenting the addition of matrix

for(i=0;i<r1;i++)
    for(j=0;j<c1;j++)
{

    k[i][j]=m1[i][j]+m2[i][j];
}


//printing the output matrix
printf("\n\n\n\n");
for(i=0;i<r1;i++)
{
    for(j=0;j<c1;j++)
        printf("%d\t",k[i][j]);

    printf("\n");
}


getchar();
return 0;
}

Tuesday 10 September 2013

simple text editor program in c

#include<stdio.h>
#include<conio.h>
#include<process.h>
int i,j,ec,fg,ec2;
char fn[20],e,c;
FILE *fp1,*fp2,*fp;
void Create();
void Append();
void Delete();
void Display();
void main()
{
do {
clrscr();
printf(“\n\t\t***** TEXT EDITOR *****”);
printf(“\n\n\tMENU:\n\t—–\n “);
printf(“\n\t1.CREATE\n\t2.DISPLAY\n\t3.APPEND\n\t4.DELETE\n\t5.EXIT\n”);
printf(“\n\tEnter your choice: “);
scanf(“%d”,&ec);
switch(ec)
{
case 1:
Create();
break;
case 2:
Display();

break;
case 3:
Append();
break;
case 4:
Delete();
break;
case 5:
exit(0);
}
}while(1);
}
void Create()
{
fp1=fopen(“temp.txt”,”w”);
printf(“\n\tEnter the text and press ‘.’ to save\n\n\t”);
while(1)
{
c=getchar();
fputc(c,fp1);
if(c == ‘.’)
{
fclose(fp1);
printf(“\n\tEnter then new filename: “);
scanf(“%s”,fn);
fp1=fopen(“temp.txt”,”r”);
fp2=fopen(fn,”w”);
while(!feof(fp1))
{
c=getc(fp1);
putc(c,fp2);
}
fclose(fp2);
break;
}}
}
void Display()
{
printf(“\n\tEnter the file name: “);
scanf(“%s”,fn);
fp1=fopen(fn,”r”);
if(fp1==NULL)
{
printf(“\n\tFile not found!”);
goto end1;
}
while(!feof(fp1))
{
c=getc(fp1);
printf(“%c”,c);
}
end1:
fclose(fp1);
printf(“\n\n\tPress any key to continue…”);
getch();
}
void Delete()
{
printf(“\n\tEnter the file name: “);
scanf(“%s”,fn);
fp1=fopen(fn,”r”);
if(fp1==NULL)
{
printf(“\n\tFile not found!”);
goto end2;
}
fclose(fp1);
if(remove(fn)==0)
{
printf(“\n\n\tFile has been deleted successfully!”);
goto end2;
}
else
printf(“\n\tError!\n”);
end2: printf(“\n\n\tPress any key to continue…”);
getch();
}
void Append()
{
printf(“\n\tEnter the file name: “);
scanf(“%s”,fn);
fp1=fopen(fn,”r”);
if(fp1==NULL)
{
printf(“\n\tFile not found!”);
goto end3;
}
while(!feof(fp1))
{
c=getc(fp1);
printf(“%c”,c);
}
fclose(fp1);
printf(“\n\tType the text and press ‘Ctrl+S’ to append.\n”);
fp1=fopen(fn,”a”);
while(1)
{
c=getch();
if(c==19)
goto end3;
if(c==13)
{
c=’\n’;
printf(“\n\t”);
fputc(c,fp1);
}
else
{
printf(“%c”,c);
fputc(c,fp1);
}
}
end3: fclose(fp1);
getch();
}

Monday 9 September 2013

COMA OPERATER IN C:IMPORTANT TIPS

/*coma operater works like and in english i.e the value of k would be last expression inthe coma separated expressions
>>those expressiions are evaluated from left to right
*/

#include<stdio.h>
#include<conio.h>

int main()
{
    int x=1;
    int k=0;
   
    k=(x+=1,x+=5);
   
    printf("k=%d",k);
   
    getch();
    return 0;
}


Friday 6 September 2013

PLOTTING SKIN AND NON SKIN PIXELS IN HSV COLOR SPACE

%%
clear all;
close all;
clc;



figure
xlabel('s');
ylabel('h');
hold on;
grid on;





%%
k=dir('*face*'); %reading the files that has "face" in the name of the image
%facial images
for i=1:6
    filename=k(i).name;
    img=imread(filename);
    hsv=rgb2hsv(img);
    h=hsv(:,:,1);
    s=hsv(:,:,2);
 
    h=h(:);
    s=s(:);
 
    plot(s,h,'.b');
end


%%
%non facial images
k=dir('*dummy*');%reading images containing name dummy

for i=1:3
    filename=k(i).name;
    img=imread(filename);
    hsv=rgb2hsv(img);
    h=hsv(:,:,1);
    s=hsv(:,:,2);
 
    h=h(:);
    s=s(:);
 
    plot(s,h,'.r');
end

Thursday 5 September 2013

PROGRAM TO INVERSE THE IMAGE

img=imread('img1.jpg');
gray=rgb2gray(img);

negative=255-gray;

figure
imshow(gray)
figure
imshow(negative)



Wednesday 4 September 2013

VHDL PROGRAM TO IMPLIMENT "JK-FLIP FLOP"

library IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

entity jkff is
    port(j:in STD_LOGIC;
    k:in STD_LOGIC;
    clk:in STD_LOGIC;
    q:inout STD_LOGIC
    );
end jkff;

architecture jkff_arch of jkff is
begin
    process (clk,j,k)
    begin
        if(clk='1' and clk'event)then
            if(j='0' and k='0')
                then q<=q;
                elsif(j='0' and k='1')then
                    q<='0';
                    elsif(j='1' and k='0')then
                        q<='1';
                        elsif(j='1' and k='1')then
                            q<=not q;
                        end if;
                    end if;
                end process;
            end jkff_arch;
           
                       
                       
           

VHDL PROGRAM TO IMPLEMENT SR-FLIPFLOP

library IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

entity srff is
    port (s:in STD_LOGIC;
    r:in STD_LOGIC;
    clk:in STD_LOGIC;
    q:inout STD_LOGIC
    );
end srff;

architecture srff_arch of srff is
begin
    process (clk,s,r)
    begin
        if(clk='1' and clk'event)then
            if(s='0' and r='0')
                then q<=q;
            elsif(s='0' and r='1')then
                q<='0';                   
            elsif(s='1' and r='0')then
                q<='1';
            elsif(s='1' and r='1')then   
                q<='X';
            end if;
            end if;
            end process;
        end srff_arch;
       

quantum computer full article explained



QUANTUM COMPUTER THE FUTURE OF COMPUTING


Will we ever have the amount of computing power we need or want? If, as Moore's Law states, the number of transistors on a microprocessor continues to double every 18 months, the year 2020 or 2030 will find the circuits on a microprocessor measured on an atomic scale. And the logical next step will be to create quantum computers, which will harness the power of atoms and molecules to perform memory and processing tasks. Quantum computers have the potential to perform certain calculations significantly faster than any silicon-based computer. 

EARLY DEVELOPMENTS
Quantum computing was first theorized less than 30 years ago, by a physicist at the Argone National Laboratory. Paul Benioff is credited with first applying quantum theory to computers in 1981. Benioff theorized about creating a quantum Turing machine based on the Turing Theory. 
Shor's algorithm, named after mathematician Peter Shor, is a quantum algorithm (an algorithm which runs on a quantum computer) for integer factorization formulated in 1994. Informally it solves the following problem: Given an integer N, find its prime factors.




Defining the Quantum Computer
THE WEIRED LAWS OF QUANTUM MECHANICS
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet (Neil’s Bohr). As we are humans we likely to predict it to happen as we likely to think it happens. But Quantum’s laws are so mysterious and weird like Quantum Superposition [existence of an subatomic particle’s in both the states (clockwise and antilock wise) at the same time], Quantum Entanglement (Quantum mechanical phenomenon in which the quantum states of two or more objects have to be described with reference to each other, even though the individual objects may be spatially separated theoretically even by infinity) . An quantum Computer is constructed or formalized on above properties of subatomic particles.
PRINCIPLE OF WORKING:




  The Turing Machine developed by Alan Turing in the 1930s, is a theoretical device that consists of tape of unlimited length that is divided into little squares. Each square can either hold a symbol (1 or 0) or be left blank. A read-write device reads these symbols and blanks, which gives the machine its instructions to perform a certain program. Well, in a quantum Turing machine, the difference is that the tape exists in a quantum state, as does the read-write head. This means that the symbols on the tape can be either 0 or 1 or a superposition of 0 and 1; in other words the symbols are both 0 and 1 (and all points in between) at the same time. While a normal Turing machine can only perform one calculation at a time, a quantum Turing machine can perform many calculations at once

Today's computers, like a Turing machine, work by manipulating bits that exist in one of two states: a 0 or a 1. Quantum computers aren't limited to two states; they encode information as quantum bits, or qubits, which can exist in superposition. Qubits represent atoms, ions, photons or electrons and their respective control devices that are working together to act as computer memory and a processor. Because a quantum computer can contain these multiple states simultaneously, it has the potential to be millions of times more powerful than today's most powerful supercomputers. A quantum computer maintains a sequence of qubits. A single qubit can represent a one, a zero, or any quanturm superposition of these two qubit states; moreover, a pair of qubits can be in any quantum superposition of 4 states, and three qubits in any superposition of 8. In general, a quantum computer with N qubits can be in an arbitrary superposition of up to  2n different states simultaneously (this compares to a normal computer that can only be in one of these  2n states at any one time).

Significant Developments in the field :
1.In 2001, researchers were able to demonstrate Shor's algorithm to factor the number 15 using a 7-qubit NMR compute.
2.In 2009, researchers at Yale University created the first rudimentary solid-state quantum processor. The two-qubit superconducting chip was able to run elementary algorithms. Each of the two artificial atoms (or qubits) were made up of a billion aluminum atoms but they acted like a single one that could occupy two different energy states
3. In 2011, D-Wave Systems announced the first commercial quantum annealer on the market by the name D-Wave One. The company claims this system uses a 128 qubit processor chipset. On May 25, 2011 D-Wave announced that Lockheed Martin Corporation entered into an agreement to purchase a D-Wave One system.
4. In September 2011 researchers also proved that a quantum computer can be made with a Von Neumann architecture (separation of RAM)
4. In November 2012, the first quantum teleportation from one macroscopic object to another was reported
5. Google Inc. announced that it was launching the Quantum Artificial Intelligence Lab, to be hosted by NASA’s Ames Research Center. The lab will house a 512-qubit quantum computer from D-Wave Systems, and the USRA (Universities Space Research Association). The goal being to study how quantum computing might advance machine learning


Potential of Quantum Computer:
1. The ability of quantum computing to solve problems thousands of times faster than traditional computers is attracting attention of the world.
2. Integer factorization is believed to be computationally infeasible with an ordinary computer for large integers if they are the product of few prime numbers (e.g., products of two 300-digit primes). By comparison, a quantum computer could efficiently solve this problem using Shor's algorithm to find its factors that a classical computer cannot. This ability would allow a quantum computer to decrypt many of the cryptographic systems in use today, in the sense that there would be a polynomial time (in the number of digits of the integer) algorithm for solving the problem.
3.Quantum Computers can be fully exploited in the field of Artificial Intelligence, Physical and Chemical Simulation’s.









Dstar-quantum-computer-outperforms-top-supercomputer-3

Editors Quote
Although the quantum computers were at the early developments as of that of classical computers in the 60’s and 70’s, the developments are at the peak and growing exponentially and soon a day will come that a classical computer is likely to be replaced by the quantum computer. Then even your (RSA)RSA  would be broken in no time. So please keep in mind while using your credential details in a real quantum world.