# bit32(ロブロックス ライブラリ) > A library of functions to perform bitwise operations. - URL:https://roblox.minecraft-okinawa.com/reference/libraries/bit32/ - 公式:https://create.roblox.com/docs/reference/engine/libraries/bit32 ## 関数 - `bit32.arshift(x: number, disp: number): number`:Returns a number after its bits have been arithmetically shifted to the right by a given displacement. - `bit32.band(numbers: Tuple): number`:Returns the bitwise AND of all provided numbers. - `bit32.bnot(x: number): number`:Returns the bitwise negation of a given number. - `bit32.bor(numbers: Tuple): number`:Returns the bitwise OR of all provided numbers. - `bit32.btest(numbers: Tuple): bool`:Returns a boolean describing whether the bitwise and of its operands is different from zero. - `bit32.bxor(numbers: Tuple): number`:Returns the bitwise XOR of all provided numbers. - `bit32.byteswap(x: number): number`:Returns the given number with the order of the bytes swapped. - `bit32.countlz(n: number): number`:Returns the number of consecutive zero bits in the 32-bit representation of the provided number starting from the left-most (most significant) bit. - `bit32.countrz(n: number): number`:Returns the number of consecutive zero bits in the 32-bit representation of the provided number starting from the right-most (least significant) bit. - `bit32.extract(n: number, field: number, width: number): number`:Extract a range of bits from a number and return them as an unsigned number. - `bit32.replace(n: number, v: number, field: number, width: number): number`:Return a copy of a number with a range of bits replaced by a given value. - `bit32.lrotate(x: number, disp: number): number`:Returns a number after its bits have been rotated to the left by a given number of times. - `bit32.lshift(x: number, disp: number): number`:Returns a number whose bits have been logically shifted to the left by a given displacement. - `bit32.rrotate(x: number, disp: number): number`:Returns a number after its bits have been rotated to the right by a given number of times. - `bit32.rshift(x: number, disp: number): number`:Returns a number whose bits have been logically shifted to the right by a given displacement. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)