RISC-V ISA Explorer · Bit Manipulation (Zb*)

Zbs: Single-Bit Ops

Ratified 2021-06 · version 1.0.0

Set, clear, invert or test a single bit at a computed index without a mask-and-shift sequence.

Typical use: Bitmap and flag manipulation

Specification

Open Zbs in the explorer

Dependencies

Required by

Instructions (8)

MnemonicNameEncodingMatchMask
BCLRSingle-Bit clear (Register)0100100----------001-----01100110x480010330xfe00707f
BCLRISingle-Bit clear (Immediate)010010-----------001-----00100110x480010130xfc00707f
BEXTSingle-Bit extract (Register)0100100----------101-----01100110x480050330xfe00707f
BEXTISingle-Bit extract (Immediate)010010-----------101-----00100110x480050130xfc00707f
BINVSingle-Bit invert (Register)0110100----------001-----01100110x680010330xfe00707f
BINVISingle-Bit invert (Immediate)011010-----------001-----00100110x680010130xfc00707f
BSETSingle-Bit set (Register)0010100----------001-----01100110x280010330xfe00707f
BSETISingle-Bit set (Immediate)001010-----------001-----00100110x280010130xfc00707f