Path: utzoo!attcan!uunet!husc6!cmcl2!rutgers!tut.cis.ohio-state.edu!osu-cis!att!ihlpg!bgb From: bgb@ihlpg.ATT.COM (Beuning) Newsgroups: comp.arch Subject: Re: Leading zero and pop count (use in a chess program) Message-ID: <5600@ihlpg.ATT.COM> Date: 12 Nov 88 00:34:21 GMT Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 14 If anyone remembers the chess 0.5 program published in BYTE magazine a long time ago, it had two functions that did these functions in software. They use the idea of a bit board. A bit board has 64 bits (one for each chess square) with a bit being 1 if something interesting was in that square. For example there is a bit board for all white knights. The pop count function (cntrs in the program) would count the number of white knights and the leading zero function (nxtrs in the program) would find the first square that held a white knight. The nxtrs function was the highest time using function so the authors provided an assembly language version that made use of the floating point normalize instruction.