seems that this should work: #define MSB(a) (1<<((sizeof a) * 8 - 1)) for most unix machines. -- John Bass DMS Design (System Performance and Arch Consultants) {dual,fortune,idi,hpda}!dmsd!bass (408) 996-0557