Computer Science, asked by maihuterimaa, 1 year ago

SOLVE THIS JAVA QUESTION PLEASE​

Attachments:

2110: can't get you
maihuterimaa: it's ok
2110: what actually you r trying to ask
maihuterimaa: output

Answers

Answered by msndipapal
0

Answer :::

( a ) 0010100

( b ) 1111111

( c ) 11000011


maihuterimaa: how
msndipapal: because in & operator 1&1=1 and 1&0=0 and 0&1=0 and 0&0=0
msndipapal: and in | operator 1 | 1=1 and 1 | 0=1 and 0 | 1=1 and 0 | 0=0
msndipapal: and in ^ operator 1 ^ 1=0 and 1 ^ 0=1 and 0 ^ 1=1 and 0 ^ 0=0
msndipapal: that's how its calculated
Answered by mn121
0

We know,

Binary and (&) :

0&0=0

0&1=0

1&0=0

1&1=1

Binary or (|) :

0 | 0=0

0 | 1=1

1 | 0=1

1 | 1=1

Binary nor (^) :

0 ^ 0=0

0 ^ 1=1

1 ^ 0=1

1 ^ 1=0

so,

(a) 1010101 & 0010100 = 0010100

(b) 1111111 | 1100100  =   1111111

(c) 00110011 ^ 11110000 = 11000011

Similar questions