Path: utzoo!attcan!uunet!husc6!mailrus!purdue!i.cc.purdue.edu!k.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.arch Subject: Re: RISC v. CISC --more misconceptions Summary: Wrong question. I am interested in a BIT stream. Message-ID: <1012@l.cc.purdue.edu> Date: 4 Nov 88 19:12:38 GMT References: <156@gloom.UUCP> <18931@apple.Apple.COM> <40@sopwith.UUCP> <232@taux02.UUCP> Organization: Purdue University Statistics Department Lines: 26 In article <232@taux02.UUCP>, yuval@taux02.UUCP (Gideon Yuval) writes: > > If you want to find the first (bottom) "1" bit in a machine word X, try: > > table [ (X xor (X-1)) mod 37 ] The question I asked is the spacing between BITS in a BIT stream. It is possible that the best way on a particular machine is to use words, but not here. What is wanted is to get the distance to the next bit in the stream on demand (this can be vectorized) and then pass over to the next location for the next step. Once a particular bit in the stream is read, it cannot be used for anything else. A similar problem is a conditional transfer on the next bit. The whole process is bit-oriented, and some extraordinary procedure must be used to use larger units. There is also the problem of the bit stream becoming empty and needing refilling. In some cases, this problem can be minimized, even to the point of some cases being able to ignore it. But it cannot be eliminated. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)