COMPUTER NETWORKING

DATA LINK LAYER WIRED NETWORKS

DATA LINK CONTROL DLC

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Two bits are same (0+0 or 1+1), the result is ____ Two bits are different (0+1 or 1+0), the result is ____
A
0, 0
B
0, 1
C
1, 0
D
1, 1
Explanation: 

Detailed explanation-1: -Two numbers can be checked for equality even without using the == operator by employing bitwise operators. If you remember, the XOR operation would map to 0s for like bits. If two numbers are the same, they translate to the same bit sequence in binary.

Detailed explanation-2: -Bit difference of a pair (x, y) is count of different bits at same positions in binary representations of x and y. For example, bit difference for 2 and 7 is 2. Binary representation of 2 is 010 and 7 is 111 ( first and last bits differ in two numbers).

Detailed explanation-3: -Bitwise operations A bitwise operation operates on two-bit patterns of equal lengths by positionally matching their individual bits. For example, a logical AND (&) of each bit pair results in a 1 if both the first AND second bits are 1. If only one bit is a 1, the result is 0.

There is 1 question to complete.