in Programming and DS recategorized by
3,400 views
1 vote
1 vote

What is the result of the following expression?

(1 & 2) + (3 & 4)

  1. 1
  2. 3
  3. 2
  4. 0
in Programming and DS recategorized by
3.4k views

1 Answer

3 votes
3 votes
Best answer

$\frac{\begin{matrix} &0 &0 &1 & (1)\\ \And& 0 &1 & 0 & (2) \end{matrix}}{\begin{matrix} \ \ \ \ & 0 &0 & 0 & (0) \end{matrix}}$               $\frac{\begin{matrix} &0 &1 &1 & (3)\\ \And& 1 &0 & 0 & (4) \end{matrix}}{\begin{matrix} \ \ \ \ & 0 &0 & 0 & (0) \end{matrix}}$

$\frac{\begin{matrix} &0 &0 &0 & (0)\\ + & 0 &0 & 0 & (0) \end{matrix}}{\begin{matrix} \ \ \ \ & 0 &0 & 0 & (0) \end{matrix}}$

( 1 & 2 )=0                      ( 3 & 4 )=0

( 1 & 2 )+( 3 & 4 )=0

Hence,Option(D)0 is the correct choice.

selected by

1 comment

@LeenSharma,I hope the above operation is of bitwise operator. :)
0
0
Answer:

Related questions