X=55(110111) Y=10(1010) By apply xor operator it X^=Y(111101) print (x) =61
@veeratzxmatey61464 ай бұрын
X is 2 not 61
@Fawz_14702 ай бұрын
yes u did OR ie (x |= y) for which u get 61. but u shld do AND ie (x &= y) for which u get 2
@DrSpooglemon Жыл бұрын
It should be noted that the operators tell the python interpreter to call a corresponding magic method on the object to the left of the operator passing the object to the right as an argument. The + operator utilises the __add__ method and the += operator utilises the __iadd__ method. 'a + b' is equivalent to 'a.__add__(b)' and 'a += b' is equivalent to 'a.__iadd__(b)'. You can create bespoke behaviours in your classes using these double underscore methods(or "dunder methods").
@@crazystatus8249 he did little mistake while typing but answer is correct its 2
@Fawz_14702 ай бұрын
@@crazystatus8249 binary of 55 =110111 binary of 10 = 1010 On doing Bitwise AND operation, ie only when 1 and 1 appears, we take 1 but in case of 0 and 0, 1 and 0,we take 0 So we get 000010 On doing binary to decimal conversion, 0x2⁵ + 0x2⁴ + 0x2³ + 0x2² + 1x2¹ + 0x2⁰ which equals to 2 which is the answer. So >>> x=55 >>> y=10 >>> x &= y >>>x 2 >>>bin(x) 0b10
@Thatipelli_Harishankar5 күн бұрын
Answer of homework problem X is 2
@MayurMitra-i9i4 ай бұрын
Answer = 2. Thanks for the video.
@khushantwankhede831110 ай бұрын
answer : x = 2 & thankyou for making video for us
@FAITHBS2 ай бұрын
thank so much this made a lot of sense
@venkatraman_padmanaban11 ай бұрын
Output value of x is 2
@vivekacharyavivekacharya6456 Жыл бұрын
Sir i will request you to please upload the classes as soon as possible
@249srihari4 Жыл бұрын
Me to sir
@mradulsonare24588 ай бұрын
Answer is 2
@moviesync313110 ай бұрын
2:20 I don't know what sign is that. Is that supposed to be the [and] shortcut sign...?
@billionllc4 күн бұрын
Excellent
@sarswatigoutam8 ай бұрын
Tqqq so much sirr
@pmalik1975 Жыл бұрын
Decimal value is 2
@suryaprakashtumu867111 ай бұрын
How will come 2
@tafaranyamhunga11 ай бұрын
55 = 110111 and 10 = 1010, so 55 & 10 is 000010 or(10), and 10(2) in decimal is 2@@suryaprakashtumu8671
@monicabhattacharya9029 Жыл бұрын
please upload videos daily
@danielquarshie523510 ай бұрын
The decimal value is 2
@stevenmakatu76986 ай бұрын
>>> x = 55 >>> y = 10 >>> x &= y >>> x
@techdigital2808 ай бұрын
Thnx a lot
@maneeshabandaru7 ай бұрын
output=2
@tharunkumar843010 ай бұрын
Answer(2)
@joydeboraon66373 ай бұрын
2
@shikharbhardwaj13528 ай бұрын
answer = 2
@harishmahajan6845 Жыл бұрын
homework answer is 2
@kumarp5954 Жыл бұрын
But how, binary value of 55=110111 and 10=1010 so how we perform & operator in this one is 6 digit and second is 4 digit????!!
@kumarp5954 Жыл бұрын
In my notebook, After performing x&y answer is 110010 which is 50 And computer answers is 2 why
@tafaranyamhunga11 ай бұрын
55 = 110111 and 10 = 1010, so 55 & 10 = 000010 or(10), and 10(2) in decimal is 2@@kumarp5954