Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      Bit manipulation(since C23)

      From cppreference.com
      <c‎ |numeric
       
       
       
       

      Contents

      Functions

      Defined in header<stdbit.h>
      counts the number of consecutive0 bits, starting from the most significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive1 bits, starting from the most significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive0 bits, starting from the least significant bit
      (type-generic function macro)[edit]
      counts the number of consecutive1 bits, starting from the least significant bit
      (type-generic function macro)[edit]
      finds the first position of0 bit, starting from the most significant bit
      (type-generic function macro)[edit]
      finds the first position of1 bit, starting from the most significant bit
      (type-generic function macro)[edit]
      finds the first position of0 bit, starting from the least significant bit
      (type-generic function macro)[edit]
      finds the first position of1 bit, starting from the least significant bit
      (type-generic function macro)[edit]
      counts the number of0 bits in an unsigned integer
      (type-generic function macro)[edit]
      counts the number of1 bits in an unsigned integer
      (type-generic function macro)[edit]
      checks if a number is an integral power of2
      (type-generic function macro)[edit]
      finds the smallest number of bits needed to represent the given value
      (type-generic function macro)[edit]
      finds the largest integral power of2 not greater than the given value
      (type-generic function macro)[edit]
      finds the smallest integral power of2 not less than the given value
      (type-generic function macro)[edit]

      Macro constants

      Defined in header<stdbit.h>
      indicates the endianness of scalar types
      (macro constant)[edit]

      [edit]References

      • C23 standard (ISO/IEC 9899:2024):
      • 7.18 Bit and byte utilities <stdbit.h>

      [edit]See also

      C++ documentation forBit manipulation
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/numeric/bit_manip&oldid=180023"

      [8]ページ先頭

      ©2009-2025 Movatter.jp