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

# FixedWidthInteger Implementations

## Topics

### Operators

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

Returns the product of the two given values, wrapping the result in case
of any overflow.

[`static func &*= (inout Self, Self)`](/documentation/Swift/Int32/&*=(_:_:))

Multiplies two values and stores the result in the left-hand-side
variable, wrapping any overflow.

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

Returns the sum of the two given values, wrapping the result in case of
any overflow.

[`static func &+= (inout Self, Self)`](/documentation/Swift/Int32/&+=(_:_:))

Adds two values and stores the result in the left-hand-side variable,
wrapping any overflow.

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

Returns the difference of the two given values, wrapping the result in
case of any overflow.

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

Subtracts the second value from the first and stores the difference in the
left-hand-side variable, wrapping any overflow.

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

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 &>> <Other>(Self, Other) -> Self`](/documentation/Swift/Int32/&__(_:_:)-2odv2)

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 &>> (Self, Self) -> Self`](/documentation/Swift/Int32/&__(_:_:)-5dixx)

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 &<< (Self, Self) -> Self`](/documentation/Swift/Int32/&__(_:_:)-6cb7m)

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 &>> (Int32, Int32) -> Int32`](/documentation/Swift/Int32/&__(_:_:)-7sh72)

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 &<< (Int32, Int32) -> Int32`](/documentation/Swift/Int32/&__(_:_:)-98mep)

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 &<<= <Other>(inout Self, Other)`](/documentation/Swift/Int32/&__=(_:_:)-1642g)

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>(inout Self, Other)`](/documentation/Swift/Int32/&__=(_:_:)-7weao)

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.

### Initializers

[`init?(String)`](/documentation/Swift/Int32/init(_:)-6wz3b)

Creates a new integer value from the given string.

[`init<T>(T)`](/documentation/Swift/Int32/init(_:)-97yta)

[`init?<S>(S, radix: Int)`](/documentation/Swift/Int32/init(_:radix:))

Creates a new integer value from the given string and radix.

[`init(bigEndian: Self)`](/documentation/Swift/Int32/init(bigEndian:))

Creates an integer from its big-endian representation, changing the byte
order if necessary.

[`init?<T>(exactly: T)`](/documentation/Swift/Int32/init(exactly:)-77qpt)

[`init(littleEndian: Self)`](/documentation/Swift/Int32/init(littleEndian:))

Creates an integer from its little-endian representation, changing the
byte order if necessary.

### Instance Properties

[`var bigEndian: Self`](/documentation/Swift/Int32/bigEndian)

The big-endian representation of this integer.

[`var littleEndian: Self`](/documentation/Swift/Int32/littleEndian)

The little-endian representation of this integer.

### Type Methods

[`static func random(in: Range<Self>) -> Self`](/documentation/Swift/Int32/random(in:)-47fh7)

Returns a random value within the specified range.

[`static func random(in: ClosedRange<Self>) -> Self`](/documentation/Swift/Int32/random(in:)-4xbuz)

Returns a random value within the specified range.

[`static func random<T>(in: Range<Self>, using: inout T) -> Self`](/documentation/Swift/Int32/random(in:using:)-2c18d)

Returns a random value within the specified range, using the given
generator as a source for randomness.

[`static func random<T>(in: ClosedRange<Self>, using: inout T) -> Self`](/documentation/Swift/Int32/random(in:using:)-thxt)

Returns a random value within the specified range, using the given
generator as a source for randomness.

---

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)