<!--
{
  "documentType" : "article",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Int32/BinaryInteger-Implementations",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "BinaryInteger Implementations"
}
-->

# BinaryInteger Implementations

## Topics

### Operators

[`static func != <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/!=(_:_:)-2y35c)

Returns a Boolean value indicating whether the two given values are not
equal.

[`static func & (Int32, Int32) -> Int32`](/documentation/Swift/Int32/&(_:_:))

Returns the result of performing a bitwise AND operation on the two given
values.

[`static func & (Self, Self) -> Self`](/documentation/Swift/Int32/&(_:_:)-ui0w)

Returns the result of performing a bitwise AND operation on the two given
values.

[`static func * (Int32, Int32) -> Int32`](/documentation/Swift/Int32/*(_:_:))

Multiplies two values and produces their product.

[`static func + (Int32, Int32) -> Int32`](/documentation/Swift/Int32/+(_:_:))

Adds two values and produces their sum.

[`static func - (Int32, Int32) -> Int32`](/documentation/Swift/Int32/-(_:_:))

Subtracts one value from another and produces their difference.

[`static func == <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/==(_:_:)-1giba)

Returns a Boolean value indicating whether the two given values are
equal.

[`static func ^ (Int32, Int32) -> Int32`](/documentation/Swift/Int32/_(_:_:)-1xb80)

Returns the result of performing a bitwise XOR operation on the two given
values.

[`static func ^ (Self, Self) -> Self`](/documentation/Swift/Int32/_(_:_:)-2t9oy)

Returns the result of performing a bitwise XOR operation on the two given
values.

[`static func % (Int32, Int32) -> Int32`](/documentation/Swift/Int32/_(_:_:)-41rsu)

Returns the remainder of dividing the first value by the second.

[`static func > <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/_(_:_:)-4jn4j)

Returns a Boolean value indicating whether the value of the first
argument is greater than that of the second argument.

[`static func | (Int32, Int32) -> Int32`](/documentation/Swift/Int32/_(_:_:)-5i6yu)

Returns the result of performing a bitwise OR operation on the two given
values.

[`static func | (Self, Self) -> Self`](/documentation/Swift/Int32/_(_:_:)-5zn2u)

Returns the result of performing a bitwise OR operation on the two given
values.

[`static func < <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/_(_:_:)-67qna)

Returns a Boolean value indicating whether the value of the first
argument is less than that of the second argument.

[`static func / (Int32, Int32) -> Int32`](/documentation/Swift/Int32/_(_:_:)-6fvom)

Returns the quotient of dividing the first value by the second.

[`static func > (Self, Self) -> Bool`](/documentation/Swift/Int32/_(_:_:)-9adkd)

[`static func <= <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/_=(_:_:)-1nkpl)

Returns a Boolean value indicating whether the value of the first
argument is less than or equal to that of the second argument.

[`static func >= (Self, Self) -> Bool`](/documentation/Swift/Int32/_=(_:_:)-3jitm)

[`static func <= (Self, Self) -> Bool`](/documentation/Swift/Int32/_=(_:_:)-4p7mg)

[`static func >= <Other>(Self, Other) -> Bool`](/documentation/Swift/Int32/_=(_:_:)-86dc4)

Returns a Boolean value indicating whether the value of the first
argument is greater than or equal to that of the second argument.

[`static func << <Other>(Self, Other) -> Self`](/documentation/Swift/Int32/__(_:_:)-27cld)

Returns the result of shifting a value’s binary representation the
specified number of digits to the left.

[`static func >> <RHS>(Self, RHS) -> Self`](/documentation/Swift/Int32/__(_:_:)-2ny6e)

Returns the result of shifting a value’s binary representation the
specified number of digits to the right.

[`static func >> <Other>(Self, Other) -> Self`](/documentation/Swift/Int32/__(_:_:)-5xz7g)

Returns the result of shifting a value’s binary representation the
specified number of digits to the right.

[`static func << <RHS>(Self, RHS) -> Self`](/documentation/Swift/Int32/__(_:_:)-78esh)

Returns the result of shifting a value’s binary representation the
specified number of digits to the left.

[`static func >>= <Other>(inout Self, Other)`](/documentation/Swift/Int32/__=(_:_:)-1o1y1)

Stores the result of shifting a value’s binary representation the
specified number of digits to the right in the left-hand-side variable.

[`static func <<= <Other>(inout Self, Other)`](/documentation/Swift/Int32/__=(_:_:)-80z6h)

Stores the result of shifting a value’s binary representation the
specified number of digits to the left in the left-hand-side variable.

[`static func ~ (Self) -> Self`](/documentation/Swift/Int32/~(_:))

Returns the inverse of the bits set in the argument.

### Initializers

[`init()`](/documentation/Swift/Int32/init())

Creates a new value equal to zero.

[`init<Other>(clamping: Other)`](/documentation/Swift/Int32/init(clamping:))

Creates a new instance with the representable value that’s closest to the
given integer.

[`init<T>(truncatingIfNeeded: T)`](/documentation/Swift/Int32/init(truncatingIfNeeded:))

Creates a new instance from the bit pattern of the given instance by
sign-extending or truncating to fit this type.

### Instance Properties

[`var bitWidth: Int`](/documentation/Swift/Int32/bitWidth-swift.property)

The number of bits in the current binary representation of this value.

[`var description: String`](/documentation/Swift/Int32/description)

A textual representation of this value.

### Instance Methods

[`func advanced(by: Int) -> Self`](/documentation/Swift/Int32/advanced(by:))

Returns a value that is offset the specified distance from this value.

[`func distance(to: Self) -> Int`](/documentation/Swift/Int32/distance(to:))

Returns the distance from this value to the given value, expressed as a
stride.

[`func isMultiple(of: Self) -> Bool`](/documentation/Swift/Int32/isMultiple(of:))

Returns `true` if this value is a multiple of the given value, and `false`
otherwise.

[`func quotientAndRemainder(dividingBy: Self) -> (quotient: Self, remainder: Self)`](/documentation/Swift/Int32/quotientAndRemainder(dividingBy:))

Returns the quotient and remainder of this value divided by the given
value.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)