How can i write nested if conditions in salary component formula?

How can i write this given below logic in to a salary component ?

if ( base < 1000 )
{
 	if (total > 11719)
	    basic & vda = 11719
    else
        basic &vda = total 
}
else
{
	 if(11719 > total * 40%)
         basic & vda = 11719
     else
         basic & vda = total * 40%
}

Please explain in more detail. What is total, basic & vda etc?