/* This code is to check kth bit is set
submitted by Manish Gowda T
accomplished by leftshift and AND function*/
#include <stdio.h>
#include <stdint.h>
uint8_t is_bit_set(uint8_t reg, uint8_t pos) {
uint8_t setter=(1<<pos);
return (reg&setter)!=0;
}
int main() {
uint8_t reg, pos;
scanf("%hhu %hhu", ®, &pos);
printf("%u", is_bit_set(reg, pos));
return 0;
}