Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 03-31-2004, 07:43 PM   #1 (permalink)
 
Newb Techie

Join Date: Mar 2004

Posts: 1

FRNC

Default A hashing algorithm

I'm a novice, not a programmer. I've come across a problem I need help with that a programmer would be the most likely person to be able to solve. Can someone please use the following procedure to "hash" the following number sequence:

545372491


Algorithm for hashing

1) Strip leading digit
2) Group remaining 8 digits into two groups of 4 digits
3) Shift first group one digit to the right, wrapping around
4) Shift second group two digits to the right, wrapping around
5) Represent resulting values in hexadecimal form
(For example 8419 would be represented as 1000010000011001)
6) XOR the two values giving a 4-digit hex result

What is meant by: 6) XOR the two values giving a 4-digit hex result????
FRNC is offline  
Old 04-01-2004, 05:33 PM   #2 (permalink)
 
Super Techie

Join Date: Dec 2003

Posts: 333

Harold III

Send a message via AIM to Harold III
Default

which one is leading digit? 5 or 1?

XOR means you get "one" when only one of the two operants is turned on. like:

1011010
XOR
1001111
=
0010101
then convert the binary to hex.

"3) Shift first group one digit to the right, wrapping around "
IS it one digit to the right or one bit to the right?
Does wrapping around mean something like this:
4537 shift 1 digit to the right wrapping around
=7453?
__________________
I do this for Aiur. NOT YOU.
Harold III is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On