BitCount - 스크립트 및 차트 함수
BitCount()은 숫자와 동등한 2진수에서 1로 설정된 비트의 수를 찾습니다. 즉, 이 함수는 integer_number에 설정된 비트 수를 반환하며, 여기서 integer_number은 부호 있는 32비트 정수로 해석됩니다.
Syntax:
BitCount(integer_number)
Return data type: 정수
Examples and results:
예 | 결과 |
---|---|
BitCount ( 3 ) | 3은 이진수로 101이므로 이는 2를 반환합니다. |
BitCount ( -1 ) | -1은 이진수로 1이 64개이므로 이는 64를 반환합니다. |