fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. int main(){
  4. int byte_1 = 0b00001111;
  5. int byte_2 = 0b11010101;
  6.  
  7. int byte_3 = (byte_1 & 0b01111111) | (byte_1 & 0b10000000);
  8. printf("0->%d\n", byte_3>>7);
  9. int byte_4 = (byte_1 & 0b01111111) | (byte_2 & 0b10000000);
  10. printf("1->%d\n", byte_4>>7);
  11. int byte_5 = (byte_2 & 0b01111111) | (byte_1 & 0b10000000);
  12. printf("0->%d\n", byte_5>>7);
  13. int byte_6 = (byte_2 & 0b01111111) | (byte_2 & 0b10000000);
  14. printf("1->%d\n", byte_6>>7);
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 2884KB
stdin
Standard input is empty
stdout
0->0
1->1
0->0
1->1