The maximum value for an 8-bit unsigned binary register is 255 (11111111), while a signed 8-bit register maxes out at 127 (01111111). Whether you are debugging an I2C address on an Arduino, parsing a bitmask from an ESP32 GPIO expander, or calculating the payload limit of a UART packet, translating raw binary data into human-readable decimal or hexadecimal is a daily requirement on the bench. This reference provides the exact bit weights, hex equivalents, and signed/unsigned boundaries you need to map microcontroller registers correctly.

How to Read This Binary Numbers Chart

This chart maps the 8-bit binary sequence to its hexadecimal, unsigned decimal, and signed decimal (Two's Complement) equivalents. The data is structured around the Base-2 Positional Numeral System, the foundational mathematics for digital logic formalized under standards like ISO/IEC 80000-13 for information science units and IEEE Std 91 for logic symbols.

Which column applies to your installation?
If you are configuring an I2C sensor address or writing to an Arduino byte / ESP32 uint8_t register, use the Unsigned Decimal column. If you are reading data from a signed temperature sensor (like the DS18B20) or working with an int8_t variable that must represent sub-zero values, use the Signed Decimal (Two's Complement) column.

Quick-Jump Bookmarks for Critical Bit-Flip Boundaries:
127 (8-Bit Signed Max) | 128 (Sign Bit Trigger / MSB) | 255 (8-Bit Unsigned Absolute Max)

8-Bit Binary, Hex, and Decimal Reference Table

Source Standard: Base-2 Positional Numeral System (ISO/IEC 80000-13 / IEEE Std 91). Bit weights assume standard big-endian bit ordering (MSB on left).
Binary (8-Bit) Hex Unsigned Decimal Signed Decimal Bit Weight (Power of 2)
000000000x00000
000000010x01112^0
000000100x02222^1
000001000x04442^2
000010000x08882^3
000100000x1016162^4
001000000x2032322^5
010000000x4064642^6
011111110x7F1271272^7 - 1
100000000x80128-128Sign Bit (MSB)
111111100xFE254-22^8 - 2
111111110xFF255-12^8 - 1

Scaling to 16-Bit, 32-Bit, and 64-Bit Registers: For larger microcontroller registers (like the 32-bit ARM Cortex-M4 inside the Raspberry Pi Pico or the ESP32's 32-bit GPIO registers), the pattern scales exponentially. A 16-bit unsigned uint16_t maxes at 65,535 (0xFFFF). A 32-bit unsigned uint32_t maxes at 4,294,967,295 (0xFFFFFFFF). When working with ESP-IDF standard types, always verify if your register expects a 32-bit mask or an 8-bit byte slice.

Edge Cases: Signed Overflow and What This Table Cannot Tell You

In electrical wiring, ampacity tables feature derating rows that reduce current capacity based on ambient heat. In binary math, your 'derating' equivalent is the signed integer format (Two's Complement). When you declare a variable as a signed int8_t instead of an unsigned uint8_t, the most significant bit (MSB) is repurposed as a sign flag. This effectively 'derates' your maximum positive capacity from 255 down to 127, trading upper range for the ability to represent negative numbers. If you attempt to store 128 in an int8_t, the system experiences signed overflow, wrapping the value to -128 (10000000).

What this table cannot tell you:
  • Endianness: This chart assumes standard big-endian bit ordering (MSB on the left). However, when combining two 8-bit bytes into a 16-bit integer, the byte order (Little-Endian vs. Big-Endian) depends entirely on your specific MCU architecture. AVR (Arduino Uno) is Little-Endian; network protocols (TCP/IP) are Big-Endian.
  • Floating-Point Encoding: Binary representations of decimals (like 3.14) do not follow this positional chart. They use the IEEE 754 standard, which splits the 32 bits into a sign bit, an 8-bit exponent, and a 23-bit mantissa.
  • Hardware Pin Mapping: A binary 1 in a register does not universally mean 3.3V or 5V. The physical voltage depends on the MCU's logic level and whether the pin is configured as an input, output, or open-drain.

Binary Numbers Chart FAQ

How do I read a 16-bit binary number using an 8-bit chart?

Split the 16-bit binary string into two 8-bit chunks (a high byte and a low byte). Look up each chunk individually on the 8-bit chart above. To get the final decimal value, multiply the high byte's decimal value by 256 (or shift it left by 8 bits: high_byte << 8), then add the low byte's decimal value. For example, 00000001 00000010 splits into 1 and 2. The math is (1 * 256) + 2 = 258. In hex, this is simply concatenated as 0x0102.

Why does my ESP32 serial monitor print negative numbers for binary values over 127?

This happens when your code implicitly casts an 8-bit value into a signed integer type. According to the Arduino and ESP32 data type references, standard int variables are signed. If you read an I2C register that returns 11111111 (255 unsigned) and pass it directly to Serial.println() without casting it as a byte or uint8_t, the compiler interprets the leading 1 as a negative sign flag (Two's Complement), printing -1 instead of 255. Fix this by explicitly declaring your variable as uint8_t or casting it during the print statement.

How do bitwise operators modify the base binary value?

Bitwise operators manipulate the binary chart values directly at the register level without converting to decimal first. The AND operator (&) is used to mask out specific bits (e.g., value & 0x0F isolates the lower 4 bits). The OR operator (|) forces specific bits high. The XOR operator (^) toggles bits. Left-shifting (<<) multiplies the base value by powers of 2, while right-shifting (>>) divides it. When debugging, always write your masks in hex (0x0F) or binary (B00001111) rather than decimal, so the bit-pattern remains visible in your code.