UGC NET CS 2004 Dec-Paper-2
March 31, 2024Question 3118 – Environment
March 31, 2024UGC NET CS 2004 Dec-Paper-2
Question 11 |
Suppose x and y are two Integer Variables having values 0x5AB6 and 0x61CD respectively. The result (in hex) of applying bitwise operator and to x and y will be :
0 x 5089 | |
0 x 4084 | |
0 x 78A4 | |
0 x 3AD1 |
Question 11 Explanation:
Given two integer numbers are 0x5AB6 and 0x61CD
Step-1: Convert hexadecimal numbers into binary number because we want to perform AND operation.
0x5AB6 equivalent into binary number is 0101 1010 1011 0110
0x61CD equivalent into binary number is 0110 0001 1100 1101
Step-2: Perform Bitwise AND operation
0101 1010 1011 0110
0110 0001 1100 1101
—————————–
0100 0000 1000 0100(Bitwise AND operation)
——————————
Step-3: Convert result into hexadecimal number.
0100 0000 1000 0100 equivalent into hexadecimal number is 0x4084
Step-1: Convert hexadecimal numbers into binary number because we want to perform AND operation.
0x5AB6 equivalent into binary number is 0101 1010 1011 0110
0x61CD equivalent into binary number is 0110 0001 1100 1101
Step-2: Perform Bitwise AND operation
0101 1010 1011 0110
0110 0001 1100 1101
—————————–
0100 0000 1000 0100(Bitwise AND operation)
——————————
Step-3: Convert result into hexadecimal number.
0100 0000 1000 0100 equivalent into hexadecimal number is 0x4084
Correct Answer: B
Question 11 Explanation:
Given two integer numbers are 0x5AB6 and 0x61CD
Step-1: Convert hexadecimal numbers into binary number because we want to perform AND operation.
0x5AB6 equivalent into binary number is 0101 1010 1011 0110
0x61CD equivalent into binary number is 0110 0001 1100 1101
Step-2: Perform Bitwise AND operation
0101 1010 1011 0110
0110 0001 1100 1101
—————————–
0100 0000 1000 0100(Bitwise AND operation)
——————————
Step-3: Convert result into hexadecimal number.
0100 0000 1000 0100 equivalent into hexadecimal number is 0x4084
Step-1: Convert hexadecimal numbers into binary number because we want to perform AND operation.
0x5AB6 equivalent into binary number is 0101 1010 1011 0110
0x61CD equivalent into binary number is 0110 0001 1100 1101
Step-2: Perform Bitwise AND operation
0101 1010 1011 0110
0110 0001 1100 1101
—————————–
0100 0000 1000 0100(Bitwise AND operation)
——————————
Step-3: Convert result into hexadecimal number.
0100 0000 1000 0100 equivalent into hexadecimal number is 0x4084
Subscribe
Login
0 Comments