M429: Number of One-Bits in a Word

Author(s): M. Metcalf Library: KERNLIB
Submitter: Submitted: 01.06.1973
Language: Assembler Revised: 15.09.1978

NUMBIT counts the one-bits in a word.

Structure:

FUNCTION subprogram
User Entry Names: NUMBIT

Usage:

In an arithmetic expression,

NUMBIT(X)

has the INTEGER value giving the number of one-bits in X.

Examples:

    J=NUMBIT(5)
sets J to 2 as the binary representation of 5 has 2 one-bits.
tex2html_wrap_inline55

Michel Goossens Wed Jun 5 07:20:01 METDST 1996