#include <stdio.h>

void main() {
    int x=0x11;
    int y, z;
    y= x & 0x0f;  //x=0001 0001 y=0000 1111을 &하면 결과는 0000 0001 저장
    z= x | 0x0f;  //x=0001 0001 y=0000 1111을 |하면 결과는 0001 1111 저장
    printf("x=%d, y=%d, z=%d\n", x, y, z); //출력은 %d로 변환해 10진수로 변환해 출력
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: