摘要 |
A high speed apparatus and method for determining the number of leading zeros or ones in a binary data field, in particular, a fixed-sized field, and further, indicating whether all of the bits of the binary data field are zero or one, is provided. The apparatus includes a plurality of detector circuits, coupled in parallel, to input different sections of the binary data field. For a leading zero detection operation, each detector circuit is configured to identify the bit location which contains the most significant "1" of the section of the binary data field which the detector inputs, and output a binary number signal representing the number of zeros leading that most significant "1". Each detector circuit also determines whether each bit location in the section which the detector inputs contains a "0" and provides a zero-detect signal representing this condition. The binary number signals and zero detect signals are provided to decoder circuitry and a plurality of multiplexor circuits which cooperate, based on these signals, to output a binary number signal representing the number of leading zeros in the entire binary field, and a zero detect signal indicating whether every bit location in the entire binary field contains a "0". The binary number signal representing the number of leading zeros in the entire binary field can then be provided to shifting circuitry to shift the binary field as desired to normalize the binary field.
|