Sunday, January 18, 2009

Programmability and Digital Electronics

Programming and Digital Electronics:-

What is a Program ?

A program is sequence of instructions made for a purpose ;

suppose you have to find a x b + c;

to find the answer you follow some sequence ;

you can divide your all activities into many small activities ;

In a program these small activities are "instruction " ;

Programmable Digital Electronics :-

suppose i have a digital circuit which can add ,subtract ,multiply , divide,
i can give my variables to its input , and by some function selection inputs , i can tell
it whether to add, or subtract the variables ;it can do one calculation at a time;
what if i want to make it programmable?this is the general idea of programming , and is the core of all digital computers ;whether high speed super fast machines, or a microcontroller in a toy;

i will add a memory ic to the function input of the circuit ;the output of memory will decide what will be done by the circuit ;since my memory has many addresses , i will store my instructions , at consecutive memory locations of the memory;
then i will apply a clock to the address counter, of the memory , that will cause the counter to increment once every clock cycle,so at each new clock cycle , my digital circuit will execute a new instruction , or part of instruction (Microprogram ) , previously stored in that memory location to which address counter is pointing ;

this is a simple picture however inside of a programmable machine is more complex, there are many more circuits to make it perfect.

That digital circuit which performs the arithmetic logical operations is called "ALU"(arithmetic logic unit) ;
when the circuitry needed to fetch the instruction from memory , decode and execute that , is added to it , this is called "microprocessor"; when the memory is provided within the chip itself ,along with the circuitry needed to for external input or output , that is called "Microcontroller".

No comments: