Describe the logic behind a hash table and explain how you would handle hash collisions in an embedded system.