Hexadecimal to Binary
Python 2, 67 62 60 59 bytes



n=input()
try:print bin(int(n,n[1]&lt;'x'))[2:]
except:print 0


Try it online!

Version that errors on invalid input (27 bytes):

lambda n:bin(int(n,16))[2:]


Try it online!