The functions/code are the key to hashing. It's impossible to properly hash without knowing which functions work and why.
Anyway, most basic hashing functions are a mod/remainder operation in the style of K = A mod M, K being the key, A the entry and M the reserved memory size. It maps any range of numbers A to a [0,M[ range. A Open Addressing hash would simply look like this:
myMemory[hash(A)] = A;
The entry is stored directly into the table under its key, rather than inside a list/chain/bucket attached to a key. The advantage is ease-of-use/implementation and "instant" lookup. The disadvantages are that the list can actually fill up (result: you need to make sure M >= |A|).
Linear probing is the easiest way to collision-handling in a OA hash table. Again, it's easy to code, but definitely not the best performance-wise. It would/could look something like this:
1 2 3
|
hval = hash(A);
while (myMemory[hval] != NULL) hval++;
myMemory[hval] = A;
|
For anything beyond this, I really suggest taking a good book or article on hashing. The Wikipedia entries aren't bad, but they seem to be missing some of the basics for some reason.