Plot[UnitStep[t]+UnitStep[t-1],{t,-2,4}]