Tuesday, January 10, 2012

http://www.microbuilder.eu/home.aspx

http://www.microbuilder.eu/home.aspx
http://www.dreamincode.net/forums/topic/29787-extracting-a-digit-from-a-15-bit-integer/


http://www.cisco.com/en/US/products/hw/optical/ps2006/ps5320/index.html
Cisco ONS 15454 Multiservice Transport Platform (MSTP)


http://www.cisco.com/en/US/docs/optical/15000r6_2/ethernet/guide/454_327/462intcf.html cisco CTC-Cisco Transport Controller (CTC).

insert 0000 1010

unsigned int orig = 0xF0F0; // 1111 0000 1111 0000
unsigned int insert = 0x000A; // 0000 0000 0000 1010

unsigned int OR = orig | (insert << 6); // 1111 0010 1111 0000

The left shift operator isn't only useful for setting individual bits in a 32-bit value; it can also be used to 'read' a single bit from a larger valu

The left shift operator isn't only useful for setting individual bits in a 32-bit value; it can also be used to 'read' a single bit from a larger value, as you can see in the following code: unsigned long testValue = 0xFF00FF00;

// Check if the fifth bit is equal to 1 (hint: it isn't!)
if (testValue & (1 << 4))
{
// Fifth bit is equal to 1
}
else
{
// Fifth bit is equal to 0
}

Can you understand how this example code works? We are shifting a '1' bit 4 positions to the left (which will give us the following 32-bit value: 0000 0000 0000 0000 0000 0000 0001 0000). We are then 'comparing' this to our testValue with an & AND operator, which means that if bit 5 of our testValue is also 1 (as in the value we have just created), a '1' will be returned. If the values are different, the AND operator will fail and return 0.

The left shift operator isn't only useful for setting individual bits in a 32-bit value; it can also be used to 'read' a single bit from a larger valu

The left shift operator isn't only useful for setting individual bits in a 32-bit value; it can also be used to 'read' a single bit from a larger value, as you can see in the following code: unsigned long testValue = 0xFF00FF00;

// Check if the fifth bit is equal to 1 (hint: it isn't!)
if (testValue & (1 << 4))
{
// Fifth bit is equal to 1
}
else
{
// Fifth bit is equal to 0
}

Can you understand how this example code works? We are shifting a '1' bit 4 positions to the left (which will give us the following 32-bit value: 0000 0000 0000 0000 0000 0000 0001 0000). We are then 'comparing' this to our testValue with an & AND operator, which means that if bit 5 of our testValue is also 1 (as in the value we have just created), a '1' will be returned. If the values are different, the AND operator will fail and return 0.

macros to manipulate the flags

Imagine there are two flags in the program that are independent of each other. We might implement macros to manipulate them as shown in the code sample below. It would probably be wise to put the macros in a header file.
// the flag definitions
#define CAR_LOCKED 0x01 // 0000 0001
#define CAR_PARKED 0x02 // 0000 0010
#define CAR_RESET 0x00 // 0000 0000

// macros to manipulate the flags
#define RESET_CAR(x) (x = CAR_RESET)

#define SET_LOCKED(x) (x |= CAR_LOCKED)
#define SET_PARKED(x) (x |= CAR_PARKED)

#define UNSET_LOCKED(x) (x &= (~CAR_LOCKED))
#define UNSET_PARKED(x) (x &= (~CAR_PARKED))

#define TOGGLE_LOCKED(x) (x ^= CAR_LOCKED)
#define TOGGLE_PARKED(x) (x ^= CAR_PARKED)

// these evaluate to non-zero if the flag is set
#define IS_LOCKED(x) (x & CAR_LOCKED)
#define IS_PARKED(x) (x & CAR_PARKED)

// a short program that demonstrates how to use the macros
int
main(void)
{
unsigned char fMercedes, fCivic;

RESET_CAR(fMercedes);
RESET_CAR(fCivic);

SET_LOCKED(fMercedes);

if( IS_LOCKED(fMercedes) != 0 )
{
UNSET_PARKED(fCivic);
}

TOGGLE_LOCKED(fMercedes);

return 0;
}

Monday, January 2, 2012

AjithaBachan carrier

My first school was a playschool called Tiny Tots, followed by another one called Miniland... Sadly, it doesn’t exist now. It was near Vie Lounge. Then, it was Bombay Scottish. We were 15-16 of us in a car pool. One car would drop us, one brought the lunch and another picked us up.

It was quite a starry bunch. Aditya and Uday Chopra, Goldie and Shrishti Behl, my cousins, sister and I, Jatin, who was Sujit Kumar’s son, Amit and Sumit Mehra, who were Prakash Mehra’s sons, and Hrithik and Sunaina Roshan.

Hrithik was three years my senior and John Abraham and he were classmates. Aamir Khan and Dharmesh Darshan were apparently in the same class. They were our seniors. I was then shifted to Jamnabai Narsee, which was closer to home. Then my father got into politics and we moved to Delhi where I went to Modern School, Vasant Vihar. At nine, I was moved to the boarding school in Switzerland.

I went off to Boston University, USA, for a degree in performing arts. Back in Mumbai, my father
had launched ABCL company that was running through bad weather. I left my studies half way and returned. He assigned me the job of a production boy on Major Saab, where I graduated to be an assistant director. Manmohan Desai having tea with my father at our place. Or for that matter, have Yash uncle (Yash Chopra) at home. For the world, and for me after growing up, he’s this big producer-director. Back then, he was my friends’ father. So star kids take this life in their stride

http://www.hindustantimes.com/Entertainment/Tabloid/My-father-never-made-a-film-for-me-Abhishek/Article1-790023.aspx