Computer Science, asked by singhveer3222, 6 months ago

4 is 100 in Binary and 11 is 1011 . what is the output
the following bitwise operators ?
a = 4
b=11
print (a/b).
print (a>>2)​

Answers

Answered by Falcon06
3

Answer:

first one is 4/11 which is 0 if it is int.

second one is 4/2^2 as it is right shift operator

Answered by tripathiakshita48
0

Answer:

First one is 4/11, which, assuming it's an integer, is 0.

Since it is a right shift operator, the second one is 4/22.

Explanation:

In C or C++, the & (bitwise AND) accepts two numbers as operands and performs AND on each bit of the two numbers. Only when both bits are 1 will AND produce a result of 1.

In C or C++, the | (bitwise OR) accepts two numbers as operands and performs OR on each bit of the two numbers. If any of the two bits is 1, the result of OR is 1.

When two numbers are used as operands for the (bitwise XOR) function in C or C++, each bit of the two operands is XORed. If the two bits are distinct, XOR produces a value of 1.

In C or C++, the (left shift) takes two numbers, left-shifts the first operand's bits, and uses the second operand to determine the number.\

See more:

https://brainly.in/question/45246859

#SPJ5

Similar questions