edited by
987 views
0 votes
0 votes

Suppose $x$ and $y$ are two Integer Variables having values $0\text{x5AB6}$ and $0\text{x61CD}$ respectively. The result (in hex) of applying bitwise operator and to $x$ and $y$ will be :

  1. $0\text{x5089}$

  2. $0\text{x4084}$

  3. $0\text{x78A4}$

  4. $0\text{x3AD1}$

edited by

2 Answers

Best answer
2 votes
2 votes
$0\text{x5AB6}$ and $0\text{x61CD}$ are the hexadecimal representation of two integers and each hexadecimal digit can be represented by a $4-bit$ $(\log_2 16 = 4)$ binary number.

$0\text{x}$ is the prefix used to represent hexadecimal numbers in C.

$\frac{\begin{matrix} &5AB6 &=  &0101 &1010 &1011 &0110 \\ \& &61CD &= &0110 &0001  &1100  &1101 \end{matrix}} {\begin{matrix}  &4084 &= &0100  &0000  &1000  &0100\end{matrix}}$

Option $2$, $0\text{x4084}$ is correct.
selected by
0 votes
0 votes
$           $$5AB6$ $=$  $0101$  $1010$  $1011$  $0110$

 and $61CD$ $=$ $0110$  $0001$  $1100$  $1101$

                       $=$$0100$  $0000$  $1000$  $0100$ $=$ $4084$

Hence option B is the answer
Answer:

Related questions

1 votes
1 votes
5 answers
1
2 votes
2 votes
1 answer
2
go_editor asked Mar 26, 2020
507 views
Consider the following statements,Int i=4, j=3, k=0; k=++i - j + i++ -j +j++;What will be the values of $i, j $ and $k$ after the statement.$7,2,8$$5,2,10$$6,2,8$$4,2,8$...
1 votes
1 votes
1 answer
3
go_editor asked Mar 26, 2020
422 views
A function object :is an instance of a class for which operator ( ) is a member functionis an instance of a class for which operator → is a member functionis a pointer ...
2 votes
2 votes
2 answers
4
go_editor asked Mar 27, 2020
905 views
Which of the following is not collision resolution technique?Hash addressingChainingBoth (A) and (B)Indexing