Newsgroups: comp.arch Path: utzoo!utgpu!cunews!dgbt!don From: don@dgbt.doc.ca (Donald McLachlan) Subject: re: bizarre instructions Message-ID: <1991Feb26.145841.12376@dgbt.doc.ca> Sender: don@dgbt.doc.ca (Donald McLachlan) Organization: The Communications Research Centre, Ottawa, Canada Distribution: na Date: Tue, 26 Feb 91 14:58:41 GMT >In article <2998@charon.cwi.nl>, dik@cwi.nl (Dik T. Winter) writes: >> > I would like an instruction which counts the number of ones in >> > the binary representation of an integer but I find it hard to argue >> > that this would be widely used. >> Ask Seymour Cray why that instruction was put in the Cray-1 as an >> afterthought. > >I havn't seen Seymour posting here, and I don't often meet him. >Now that I am suitably impressed, would you share with us what >he would tell us if we did ask him? >> -- >> dik t. winter, cwi, amsterdam, nederland >> dik@cwi.nl > >dan herrick >herrickd@iccgcc.decnet.ab.com I don't know what Seymour Cray would say, but I have an application that would really benefit from this. When performing digital communication over HF (highly error prone media) major problems are encountered. 1. Most HF modems are syncronous. 2. Due to the error proneness of the media, you will rarely get a hard (exact) sync match. 3. Can't go to a short sync sequence because of high probability of false sync. Solution, requires that you write a correlator to count the number of bits in error in the sync sequence, and only accept it as a valid sync sequence if the distance is less than a predetermined limit. The distance is simply the number_of_ones(receieved_seq XOR sync_pattern). I must admit that this is a very specific problem, but one that must be performed once every bit time, and it would benefit greatly from having such an instruction in hardware. Donald McLachlan Brought to you by Super Global Mega Corp .com