Professional Documents
Culture Documents
Name: John Allen E. Atutubo Section: 11STEM (E) - 2 Teacher: Sir Kenneth Lawas Subject: Computer Programming 1
Name: John Allen E. Atutubo Section: 11STEM (E) - 2 Teacher: Sir Kenneth Lawas Subject: Computer Programming 1
Activity 2
3. Create a bitwise XOR (^) for numbers 1201 & 1110 (3 points)
1201 ^ 1110 = 231 10010110001
Bit 1201 = 10010110001 ^ 10001010110
Operation: 1110 = 10001010110 00011100111 = 231
Alternative Method:
77 << 3 = 77+77= 154+154 = 308+ 308 = 616
77 << 5 = 77+77= 154+154 = 308+ 308 = 616 + 616 = 1232 + 1232 = 2464
77 << 6 = 77+77= 154+154 = 308+ 308 = 616 + 616 = 1232 + 1232 = 2464 + 2464 = 4928