google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Saturday, March 1, 2014

C++ Program to check whether number is Armstrong number

#include<iostream.h>
int main()
{
      int sum,temp,rem,n;
     cout<<"Enter the number \n";
     cin>>n;
     cout<<" Entered number is \t";
     cout<<n;
     cout<<"\n";
     sum=0; 
     temp=n;
      do
        {
                rem=n%10;
                n=n/10;
                sum=sum+rem*rem*rem;
           }while(n!=0);
     if(sum==temp)
            cout<<"This is Armstrong number.\n";
   else
           cout<<"This is not Armstrong number.\n";
return 0;
}

Output:-
Enter the number
371
Entered number is    371
This is Armstrong number.

Friday, January 24, 2014

Microcontroller

Comparison between micro-controller and microprocessor

Sr No. Microcontroller Microprocessor
1. Inbuilt RAM or ROM Do not have inbuilt RAM or ROM
2. Inbuilt Timer Do not have inbuilt Timer
3. I/O ports are available I/o ports are not available ,requires extra device like 8155 or 8255.
4. Inbuilt serial port Do not have inbuilt serial port , requires extra devices like 8250 or 8251
5. Separate memory to store program and data Program and data are stored in same memory
6. Few instructions to read or write data to or from external memory. Many instructions to read or write data from or to external memory.


A microcontroller is an entire computer manufactured on a single chip. Microcontrollers are usually dedicated  devices embeded within an application
Example microcontrollers are used as engine controllers in engine automobiles and as exposure and focus controllers in cameras .

Features of 8051:-

  • 8 bit bus and 8 bit ALU.
  • 16 bit address bus  -64 KB of RAM and ROM.
  • On-chip RAM 128(256 ) bytes (Data Memory) and On Chip ROM -4 KB (Program memory)
  • Four 8 -bit bi directional input /output ports.
  • Programmable serial ports i.e. One UART(serial port).
  • Power saving mode.
  • All modern versions are CMOS.


अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...