To find the decimal value of 1111, that is 15, we can use the function:
(a) int(1111,10)
(b) int(‘1111’,10)
(c) int(1111,2)
(d) int(‘1111’,2)
I have been asked this question in an interview.
Origin of the question is Bitwise in chapter Precedence and Associativity, Bitwise & Boolean of Python