Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rochester.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!rochester!ken From: ken@rochester.UUCP (Ken Yap) Newsgroups: net.lang.c Subject: Re: reversing a mask Message-ID: <4069@rochester.UUCP> Date: Sun, 25-Nov-84 01:59:27 EST Article-I.D.: rocheste.4069 Posted: Sun Nov 25 01:59:27 1984 Date-Received: Mon, 26-Nov-84 02:02:48 EST References: <1@imd.UUCP> <469@ncoast.UUCP> <691@gloria.UUCP> Reply-To: ken@seneca.UUCP (Sue-Ken Yap) Organization: U. of Rochester, CS Dept. Lines: 13 Summary: >What's the fastest way to reverse a 16-bit mask in C? In 68000 asl? Actually the 65536 combination answer wasn't too far from a plausible method - split the word up into 2 8 bit bytes and then do two lookups. Then swap bytes. This way you only need one 256 byte table. You could do lookups on nybbles, etc, ad nauseum. -- Ken Yap UUCP: (..!{allegra, decvax, seismo}!rochester!ken) ARPA: ken@rochester.arpa USnail: Ken Yap, Dept. of Comp. Sci., U. of Rochester, NY 14627.