ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

setBits

Utility.setBits(b7, b6, b5, b4, b3, b2, b1, b0)

Parameters

b7 The bit in the 8th position (most significant bit).
b6 The bit in the 7th position.
b5 The bit in the 6th position.
b4 The bit in the 5th position.
b3 The bit in the 4th position.
b2 The bit in the 3rd position.
b1 The bit in the 2nd position.
b0 The bit in the 1st position (least significant bit).

Returns

The number in decimal that is equal to the binary number (b7 b6 b5 b4 b3 b2 b1 b0).

Description

Converts the bits given by b7, b6, b5, b4, b3, b2, b1, b0 into decimal and returns the number.