Skip to content

BCNT

32-bit Base **Group:** Bit Operation  |  Ch 12   ALU — Arithmetic Logic Unit  |  **Length:** 32  |  **Decode:**

Assembly Syntax

  • bcnt srcL, M, N, ->{t, u, Rd}

Encoding

BCNT encoding
Bitfield encoding diagram. MSB is on the left, LSB on the right.

Description

Population count. Counts the number of set bits in a register.

Pseudocode (informative)

rd = PopCount(rs1);

Encoding Notes

No additional encoding notes.

Full Catalog Forms

Assembly Length Decode
bcnt srcL, M, N, ->{t, u, Rd} 32
← [Bit Operation](../groups/bit_operation.md)    [Index](../index.md)    [All instructions](index.md) →