Tuesday, January 10, 2012

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

No comments: