Notice period is actually to protect both parties- the company and the employee to have sufficient time to plan for handover. You cannot simply just resign without 24 notice(unless it was mentioned in your offer letter)