+ 1
Help me solve the code #0007
somebody explain the operation of & in detail https://code.sololearn.com/c85dweHE9hou/?ref=app
1 Respuesta
+ 4
l is a list containing 1*3, 2*3, 3*3, 4*3, 5*3, 6*3... .upto 16*3
m is a list containing 3&1, 6&1, 9&1, 12&1, 15&1, 18&1, ........upto 48&1
u probably have a doubt in the ''&" operator..
its nothing but BITWISE AND OPERATOR...LIKE IN AND GATE . ..
eg..
8&2
=>binary(8) and binary(2)
=>1000 and 0010
=>=>=>multiply bit by bit...
=>0000
now.. 12&1
=>1100 and 0001
=>0000(bit by bit multiplicatiin)
perform this operation and will get expected output...