Tuesday, July 8, 2008

Comiling Linking

Ok, So here I am with the most favorite topic of Computer programming industry.

What is the main difference in compiled code and that of executable code??

This is the question which even the experienced programmer don’t answer properly.

When asked you need to be little technical…

Ok when you compile the code a .o file is created. This is what we called compiled code (Rocket Science Funda Reveled ;) ) …

And what you get after linking all the required object files is called executable file.

SO whats the difference ?

When you compile the code some references may not be present in the same file which you are compiling. But compiler recognizes that ( as it sees the declaration in .h file you must have included in the file) from header file. Now this piece of code will not be available until run time, so normal jump instruction address can not be found at compile time. So Now what the compiler does is it leaves that jump filed empty and fills that at the run time… This is the main step which differentiate the object code and executable code. Jump instruction address are there in executable not in the object files…

Please note that that absolute address is even not know in the .exe file, it still does the guess work like 14 byes from beginning etc.

Main difference .o and .exe file is the jump address in the .o file is not known.

Zig Bee

Zig Bee,

This is wireless data transmission technology.

Named zig bee because it finds its path by zig-zag motion like bees do when they find food.

This is quite comparable to the Bluetooth in various aspects. I mean the purpose its used for is almost same as Bluetooth.

But it offers some advantages like :

It works as adhoc network.. so it used the intermidated nodes to transfer data to the other nodes.

These intermediate nodes can be thought as routers, but one thing is to be noted here not every note can act as router it should have certain capabilities enabled.

So whats the pro cons/ uses of the Zig bee

  1. If your requirement is high speed data transmission then do not go for zig bee, its about 1/3 slow then the Bluetooth.
  2. But irrespective of it there are many advantages which zig bee offers. One being in a Bluetooth network maximum 7 devices can be there in a star topology, but in the zig bee it can go some 65k.
  3. Bluetooth device data transmission distance is typically 10 meters but in zig bee it goes up to 100 meters.
  4. The most advantageous feature is that it consumes very low battery power when compared to Bluetooth. Suppose if a Bluetooth enabled device can work for three days then zig bee on same battery can go for years. This point is suits to the perfection for the small sensors which can not be replaced daily. Think of US smart dust project it suits to the perfection there.
  5. In Bluetooth there is 64 bit encryption key, where as here its 128 bit encryption key used. So you have 2^128 combination to break, if you want to hack it.