bitWidth
var bitWidth: Int { get }var bitWidth: Int { get }import Swiftprotocol FixedWidthInteger : BinaryInteger, LosslessStringConvertible where Self.Magnitude : FixedWidthInteger, Self.Magnitude : UnsignedInteger, Self.Stride : FixedWidthInteger, Self.Stride : SignedIntegerAn integer type that uses a fixed size for every instance.
@frozen struct IntA signed integer value type.
static var bitWidth: Int { get }The number of bits used for the underlying binary representation of values of this type.
var bitWidth: Int { get }The number of bits in the current binary representation of this value.
init?(_ description: String) Creates a new integer value from the given string.
init<T>(_ source: T) where T : BinaryFloatingPoint init?<S>(_ text: S, radix: Int = 10) where S : StringProtocol Creates a new integer value from the given string and radix.
init(bigEndian value: Self) init<Other>(clamping source: Other) where Other : BinaryInteger init?<T>(exactly source: T) where T : BinaryFloatingPoint init(littleEndian value: Self) init<T>(truncatingIfNeeded source: T) where T : BinaryInteger static func random(in range: ClosedRange<Self>) -> Self Returns a random value within the specified range.
static func random(in range: Range<Self>) -> Self Returns a random value within the specified range.
static func random<T>(in range: ClosedRange<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator Returns a random value within the specified range, using the given generator as a source for randomness.
static func random<T>(in range: Range<Self>, using generator: inout T) -> Self where T : RandomNumberGenerator Returns a random value within the specified range, using the given generator as a source for randomness.
var bigEndian: Self { get }var littleEndian: Self { get }static func &* (lhs: Self, rhs: Self) -> Self static func &*= (lhs: inout Self, rhs: Self) Multiplies two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &+ (lhs: Self, rhs: Self) -> Self Returns the sum of the two given values, wrapping the result in case of any overflow.
static func &+= (lhs: inout Self, rhs: Self) Adds two values and stores the result in the left-hand-side variable, wrapping any overflow.
static func &- (lhs: Self, rhs: Self) -> Self Returns the difference of the two given values, wrapping the result in case of any overflow.
static func &-= (lhs: inout Self, rhs: Self) Subtracts the second value from the first and stores the difference in the left-hand-side variable, wrapping any overflow.
static func &<< <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width.
static func &<< (lhs: Self, rhs: Self) -> Self static func &<<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the left, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func &>> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger Returns the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width.
static func &>> (lhs: Self, rhs: Self) -> Self static func &>>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger Calculates the result of shifting a value’s binary representation the specified number of digits to the right, masking the shift amount to the type’s bit width, and stores the result in the left-hand-side variable.
static func << <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger static func <<= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger static func >> <Other>(lhs: Self, rhs: Other) -> Self where Other : BinaryInteger static func >>= <Other>(lhs: inout Self, rhs: Other) where Other : BinaryInteger static func ~ (x: Self) -> Self func multipliedFullWidth(by other: Self) -> (high: Self, low: Self.Magnitude)