For getting a good job

DeerSnowGIF.gif

Lets Do it 🚀

Tnp(day-1):

Bitwise operator

OR Table:

A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

OR operator (|) returns 1 if at least one bit is 1

int a = 5;    // 101
int b = 3;    // 011
int c = a | b; // 111 (7 in decimal)

NOR Table:

A B NOR
0 0 1
0 1 0
1 0 0
1 1 0

NOR is the complement of OR operation (!(A OR B))

AND Table:

A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1

AND operator (&) returns 1 only if both bits are 1

int a = 5;    // 101
int b = 3;    // 011
int c = a & b; // 001 (1 in decimal)

NOT Table:

A NOT A
0 1
1 0