November 28, 2009

Finding N-th Fibonacci number and summation up to n-th fibonacci number in series using assembly language.

      This code represents an example of finding Fibonacci number and sum of Fibonacci series up to n-th number. It is written in assembly language and simulated using emu8086 emulator. Though it is a general program, it cannot find more than 8-bit binary number, the reason is 8086 processor registers are 8-bit.

      This is a general program for finding any number in Fibonacci series up to its limit and finding summation of two Fibonacci numbers written in assembly code and I checked this code with emu8086 emulator. Here it goes:

Code:
         
; this program calculates the n-th Fibonacci number
; and the sum of the fibonacci series upto n-th number
;the n-th number must be given in CX register

    CODE SEGMENT
    ASSUME CS:CODE,DS:CODE
    ORG 100H

    ;S=F1+F2 // these 3 lines are algorithom
    ;F1=F2;
    ;F2=S;

    XOR AX,AX      ; clearing garbage value if any
    XOR BX,BX

November 6, 2009

Energy Saving Lamp- working principle and a potential problem

Energy saving lamps are operated at high frequency. They produce low real power consumption which actually mean reduced electricity bill. This is why Energy saving lamps are extensively popular. This may be seem attractive from user point of view, but may not be same for the provider.
This low real power (hence, low cost) consumption comes at the cost of of large reactive power consumption. This large reactive power demand may be easily ignored by user because they are not direct victim of this problem, but user as well as provider will suffer very much in the end. 
Electricity providers only bill for real power, they do not collect money from user level for reactive power since, before the energy saving lamp, general user did not consume high reactive power. But they DO charge industrial customer at a different and higher rate than normal user because of consuming large reactive energy. That is why consumer and industrial feeder and bill rate are different.
The reason providers charge more for industrial application is higher reactive power consumption means