Shop by category
Shop all componentsUnit converters
Decimal = Σ digit × base^positionHex digit = 4 bits, so 0xF = 1111Signed value = n − 2^bits if n ≥ 2^(bits−1)Hex FF = decimal 255 = binary 1111 1111. As a signed 8-bit number it is −1. 0x1F4 = 500, and a 12-bit ADC value of 4095 is 0xFFF.
Microcontroller registers, I²C addresses, colour values and memory addresses are all usually written in hexadecimal because each hex digit is exactly four bits.
Two’s complement is how processors store negative numbers: the highest bit means negative. Reading a sensor value in two bytes, you often need to treat it as a signed 16-bit value, as with the MPU6050 accelerometer.
Multiply each digit by 16 to the power of its position. 0x1F = 1 × 16 + 15 = 31.
11111111, eight ones, the largest 8-bit value.
Values at or above 2^(bits − 1) are negative: subtract 2^bits. 0xFF in 8 bits is −1.
Decimal = Σ digit × base^position; Hex digit = 4 bits, so 0xF = 1111; Signed value = n − 2^bits if n ≥ 2^(bits−1).
Hex FF = decimal 255 = binary 1111 1111. As a signed 8-bit number it is −1. 0x1F4 = 500, and a 12-bit ADC value of 4095 is 0xFFF.
Results are estimates for design and learning. Check critical designs against the component datasheet. Made by the Geekobot Learning Team. How we write our calculators