Browse Prior Art Database

Shift and Fold Hash Function for Alphanumeric Keys

IP.com Disclosure Number: IPCOM000122555D
Original Publication Date: 1991-Dec-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 2 page(s) / 59K

Publishing Venue

IBM

Related People

Arnold, ME: AUTHOR [+2]

Abstract

Following is a description of a hash function which can be used to improve performance by reducing the cost of searching for a user selected name. The algorithm is general in nature and may be used in any computer systems' software that uses hash coding of alphanumeric keys for searching.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Shift and Fold Hash Function for Alphanumeric Keys

      Following is a description of a hash function which can
be used to improve performance by reducing the cost of searching for
a user selected name. The algorithm is general in nature and may be
used in any computer systems' software that uses hash coding of
alphanumeric keys for searching.

      A simple hash function takes an alphanumeric name of more than
one character, and produces a positive integer greater than or equal
to zero as an output.  This algorithm, commonly called "folding", is
one that has been published elsewhere and is widely used.  It is
described below:

      Characters are divided into two groups of equal size (blanks
may be added prior to splitting to create even number of characters).
A bit-by-bit Exclusive-OR (XOR) operation is then performed between
the two groups. After the result is changed to a positive number if
needed, modular arithmetic is performed to obtain a number between
zero and predefined number.

      The naming convention usually requires that the first character
be alphabetic; remaining characters may be either alphabet or
numeric.  The diagram below shows the bit operations for the
algorithm on names having an alphabetic first character, and numeric
characters in the remaining positions. The alphanumeric characters
are shown in EBCDIC notation. However, the discussion and proposal
equally applies to ASCII standard.
         11xxxxxx  1111xxxx  1111xxxx  1111xxxx
         1111xxxx  1111xxxx  1111xx...