A binary numbers chart maps base-2 bit patterns to base-10 decimal and base-16 hexadecimal values. For embedded developers and hardware hackers, the most critical values on this chart are not 1 through 10, but the boundary limits: 127, 128, 255, 32767, and 65535. These boundaries dictate where 8-bit and 16-bit microcontroller registers overflow, flip signs, or indicate I2C bus faults. Below is the definitive reference chart for digital logic and microcontroller debugging, based on integer limits defined by the ISO/IEC 9899 (C17) standard for <stdint.h> data types.

The Master Binary Numbers Chart (Boundary & Overflow Values)

How to read this table: This chart focuses on the critical inflection points in digital logic rather than sequential counting. The Decimal column shows the human-readable base-10 value. The Hex column is what you will see in serial monitor dumps and memory addresses. The 8-Bit Binary and 16-Bit Binary columns show the raw register states. Finally, the 8-Bit Signed (Two's Complement) column shows how the exact same bit pattern is interpreted when your C/C++ compiler treats the variable as a signed int8_t instead of an unsigned uint8_t.

Decimal (Base-10) Hex (Base-16) 8-Bit Binary 16-Bit Binary 8-Bit Signed (Two's Comp.) Common Debugging Context
0 0x00 00000000 00000000 00000000 0 Cleared register / Logic LOW
1 0x01 00000001 00000000 00000001 1 LSB set / Bitmask target
127 0x7F 01111111 00000000 01111111 127 Max positive 8-bit signed integer
128 0x80 10000000 00000000 10000000 -128 MSB set / Sign bit flipped (Overflow)
255 0xFF 11111111 00000000 11111111 -1 I2C NACK / Missing pull-up resistor
256 0x100 Overflow 00000001 00000000 Overflow 8-bit register rolls over to 0
32767 0x7FFF Overflow 01111111 11111111 Overflow Max positive 16-bit signed (Arduino Uno int)
65535 0xFFFF Overflow 11111111 11111111 -1 (16-bit) Max 16-bit unsigned / 16-bit signed -1
Bookmark Quick-Jump: If your serial monitor is printing 255 or 0xFF when reading an I2C sensor like a BME280 or MPU6050, your microcontroller is reading a floating bus. The sensor is not responding (NACK), usually due to a missing 4.7kΩ pull-up resistor on the SDA/SCL lines or an incorrect I2C address.

Applying the Chart: Architecture Limits and Bit-Shifting

Which column applies to your microcontroller architecture? The column you must reference depends entirely on your board's default integer size and whether you explicitly declare signed or unsigned variables. On an 8-bit AVR board like the Arduino Uno, a default int is actually 16 bits wide (ranging from -32768 to 32767), while a byte is 8 bits. On a 32-bit architecture like the ESP32 or Raspberry Pi Pico, a default int is 32 bits wide. If you are reading an 8-bit hardware register into a 32-bit variable without casting, the upper 24 bits will be padded with zeros (or ones, if sign-extending a negative value), which can silently corrupt bitwise math if you assume an 8-bit boundary.

How bit-width constraints and shifting modify the base value: In wire sizing, derating factors reduce ampacity based on temperature. In binary logic, the equivalent constraint is bit-shifting and overflow. When you shift a binary number left (<<), you multiply by two, but you are constrained by the register width. If you take the 8-bit value 01000000 (Decimal 64) and shift it left by one (<< 1), it becomes 10000000 (Decimal 128). Shift it left one more time, and the '1' falls off the edge of the 8-bit register. The result is 00000000 (Decimal 0). The base value wasn't just modified; it was destroyed by the architectural boundary. Always cast to a wider integer type (e.g., (uint16_t)) before shifting an 8-bit value to prevent this silent data loss.

Furthermore, Two's Complement modifies how the most significant bit (MSB) is weighted. In an unsigned 8-bit system, the MSB represents +128. In a signed 8-bit system, that exact same bit represents -128. This is why 11111111 is 255 in unsigned math, but -1 in signed math. When interfacing with sensors that output signed temperature data, failing to cast the raw 8-bit register read to an int8_t will result in a reading of 255°C instead of -1°C.

Practical Bitwise Masking with the Chart

Hardware registers rarely dedicate one full byte to a single setting. A single 8-bit configuration register might hold three different boolean flags and a 5-bit threshold value. You use the binary numbers chart to construct bitmasks to isolate or toggle these specific bits without altering the rest of the register.

  • Isolating a Bit (AND): To check if the 3rd bit (Decimal 4, Hex 0x04, Binary 00000100) is set, you use the bitwise AND operator (&). Register & 0x04 will yield either 0x04 (true) or 0x00 (false), zeroing out all other bits.
  • Setting a Bit (OR): To force the 3rd bit HIGH without touching the others, use bitwise OR (|). Register | 0x04 guarantees that bit is 1, leaving the rest intact.
  • Clearing a Bit (AND NOT): To force the 3rd bit LOW, use AND with the inverted mask. Register & ~0x04 (where ~0x04 is 11111011) clears only that specific bit.

What This Chart Cannot Tell You

While this binary numbers chart is essential for integer math and register mapping, it has strict limitations that catch out hobbyists moving into advanced embedded systems.

1. Endianness (Byte Order): The chart shows 16-bit binary as a single contiguous string (e.g., 00000001 00000000 for 256). It does not tell you how those bytes are stored in physical memory. ARM Cortex-M chips (like the RP2040 on the Pico) and x86 processors are Little-Endian, meaning the least significant byte (00000000) is stored at the lower memory address. Network protocols (like TCP/IP) and many Motorola-derived chips are Big-Endian. If you cast a 16-bit integer pointer to an 8-bit array without accounting for endianness, your bytes will swap, turning 256 into 1.

2. Floating-Point Representation: This chart is useless for decimal fractions. Microcontrollers handle floats using the IEEE 754 standard, which splits a 32-bit register into a sign bit, an 8-bit exponent, and a 23-bit mantissa. The binary pattern for 1.5 is 0 01111111 10000000000000000000000 (Hex 0x3FC00000). You cannot derive this from a standard integer binary chart; you must use an IEEE 754 converter tool when debugging raw float memory dumps.

3. Timing and Clock States: A binary '1' on this chart represents a logical HIGH state. In physical hardware, a logical HIGH on an ESP32 GPIO pin is 3.3V, while on an Arduino Uno it is 5V. Furthermore, the chart assumes static states. It does not account for propagation delay, rise/fall times, or the setup-and-hold times required for synchronous protocols like SPI. A logically perfect binary sequence will still fail if the physical voltage sags below the microcontroller's V_IH (Input High Voltage) threshold due to an undersized trace or excessive capacitive load on the bus.