An 8 bit upcounter's current value is 10101100 (Least significant bit is at right hand side). After a while it's contents are changed to 00100111. Calculate the clock pulses required for this change code example
Example: how to find the left most bit 1 in binary of any number
//C++ Code to find the value of 2^n = highestOneBit().
int highestOneBit(int i) {
i |= (i >> 1);
i |= (i >> 2);
i |= (i >> 4);
i |= (i >> 8);
i |= (i >> 16);
return i - (i >> 1);
}