i understand how to use the IF formulae if the subject is greater than or less than

eg =IF(B1>20,1,0) or =IF(B1<20,1,0)

But how would i write this if i wanted, for example to equal 1 if B1 is greater than 10 and less than 20?