The binary numbering system chart maps base-10 integers to base-2 (binary) and base-16 (hexadecimal) formats, serving as the foundational lookup for microcontroller register manipulation, digital logic states, and bitwise operations. While software engineers memorize these conversions, hardware makers and electrical technicians rely on this chart to decode I2C addresses, set GPIO pin masks, and troubleshoot logic analyzer traces. Below is the complete, bookmark-friendly reference for the most critical byte boundaries and nibble masks used in embedded systems.

The Core Binary Numbering System Chart (Complete 4-Bit Nibble Lookup)

How to read this table: This chart provides the complete 16-row sequence for a 4-bit nibble (0–15), which is the fundamental building block for hexadecimal conversion. The Decimal column is your human-readable base value. The Hex column is the shorthand used in C/C++ firmware (prefixed with 0x). The Binary (4-bit) column shows the raw logic states, while the Padded 8-Bit column shows how that nibble sits in the lower half of a standard microcontroller byte (like an ATmega328P PORT register). Standard base-2 arithmetic follows the mathematical conventions outlined in All About Circuits Digital Volume and ISO/IEC 80000-2.

Decimal Hex Binary (4-bit) Padded 8-Bit Common Embedded Use Case
00x000000000 0000Logic LOW / Clear all bits / I2C ACK
10x100010000 0001Bit 0 set / LSB / Single GPIO HIGH
20x200100000 0010Bit 1 set / I2C Read Bit
30x300110000 0011Lower 2 bits set / UART Stop Bits
40x401000000 0100Bit 2 set / SPI MISO line
50x501010000 0101Alternating bits / 555 Timer Astable
60x601100000 0110Bits 1-2 set / I2C Standard Mode
70x701110000 0111Lower 3 bits set / 3-bit DAC max
80x810000000 1000Bit 3 set / MSB of lower nibble
90x910010000 1001Outer bits set / BCD digit 9
100xA10100000 1010Alternating bits / Hex A
0xB0xB10110000 1011Hex B / 4-bit LCD command
120xC11000000 1100Upper 2 bits of nibble / Hex C
130xD11010000 1101Hex D / Stepper motor winding seq
140xE11100000 1110Hex E / Clear LSB only
150xF11110000 1111Lower nibble mask (0x0F) / Max 4-bit
Bookmark Tip: When debugging a logic analyzer trace, you rarely need the full 0–255 chart. Memorize the 0x0, 0x5 (0101), 0xA (1010), and 0xF (1111) rows. These alternating and boundary patterns are the easiest to spot visually on an oscilloscope or Saleae logic capture, allowing you to quickly verify if a bus is idle, clocking, or stuck.

Which Column Applies to Your Firmware or Logic Circuit?

Knowing which column to use depends entirely on your installation environment and the specific peripheral you are addressing. Makers often default to decimal because it is what the Arduino digitalWrite() function expects for pin numbers, but decimal is virtually useless for register manipulation.

Use the Hex Column for I2C, SPI, and Memory: When configuring an ESP32 to talk to an OLED display over I2C, you will use hex addresses (e.g., 0x3C or 0x3D). Hexadecimal directly maps to physical memory addresses and peripheral registers. If you are writing a driver for a sensor, the Espressif GPIO API documentation relies heavily on hex masks to configure pin direction and pull-up states simultaneously.

Use the Binary Column for Bitwise Masking: When you need to flip a single bit in a hardware register without disturbing the others (e.g., setting the baud rate on a UART peripheral), you use the binary column to create a mask. To set Bit 3 HIGH, you use the binary 0000 1000 (Decimal 8, Hex 0x08) combined with a bitwise OR operator (|). To clear it, you invert that mask using a bitwise AND (&).

Use the Decimal Column for Human-Readable I/O: Decimal is reserved for PWM duty cycles (0–255 on an 8-bit timer), analog sensor readings, and pin assignments. If you are sizing a current-limiting resistor for an LED based on an analogRead() value, stick to decimal math.

How Logic Thresholds and Bit-Shifting Derate Base Values

In wire sizing charts, 'derating' rows reduce the base ampacity based on ambient temperature or conduit fill. In digital logic and binary math, your 'base value' (the ideal mathematical 1 or 0) is similarly derated by two physical and logical realities: voltage logic thresholds and bitwise overflow.

Voltage Threshold Derating (VIH and VIL): A binary '1' is not a universal voltage. According to JEDEC standards for CMOS logic, a microcontroller interprets a binary '1' based on its VCC (supply voltage). For a 5V Arduino Uno (ATmega328P), the Input High Voltage (VIH) threshold is typically 0.6 × VCC, meaning any signal below 3.0V might be derated to a binary '0' or, worse, cause undefined oscillation. For a 3.3V ESP32, the VIH drops to roughly 2.3V. If you are interfacing a 5V sensor to a 3.3V microcontroller without a logic level converter, the sensor's 'LOW' output (which might sit at 0.8V) could exceed the ESP32's Input Low Voltage (VIL) maximum, resulting in a phantom binary '1'. Always check the datasheet's VIH/VIL rows to see how your physical voltage derates your logical binary state.

Bit-Shifting and Overflow Derating: When you manipulate binary values in code using left-shift (<<) or right-shift (>>) operators, you are mathematically multiplying or dividing by powers of two. However, if you left-shift a value past the 8-bit boundary (255), the value overflows and wraps around to 0. This is the binary equivalent of exceeding a component's maximum rating. If you are using signed 8-bit integers (which range from -128 to +127), pushing a value past 127 derates it instantly to -128 due to two's complement wrap-around. Always declare your variables as uint8_t (unsigned) when working with raw binary bitmasks to prevent signed overflow derating.

What This Chart Cannot Tell You: Endianness and Signed Math

While the binary numbering system chart perfectly defines the value of a single byte or nibble, it is completely blind to how multiple bytes are assembled in memory. This is where embedded developers encounter the most frustrating bugs.

Endianness (Byte Order): If your logic analyzer captures a 16-bit value like 0x1234, the chart tells you that 0x12 is 0001 0010 and 0x34 is 0011 0100. But it cannot tell you which byte arrives first on the wire. In Big-Endian systems (like standard network packets or I2C protocols), the Most Significant Byte (0x12) is transmitted first. In Little-Endian systems (like ARM Cortex-M processors and AVR microcontrollers), the Least Significant Byte (0x34) is stored at the lower memory address. If you read a 16-bit temperature sensor over I2C and map it directly to a Little-Endian memory pointer without swapping the bytes, your binary chart won't save you from reading a wildly incorrect temperature.

Floating-Point Representation (IEEE 754): This chart applies strictly to integers. If you attempt to view a 32-bit floating-point number (like 3.14) in binary using a logic analyzer, you will not see the integer '3' followed by a decimal representation. Instead, the hardware uses the IEEE 754 standard, which splits the 32 bits into a sign bit, an 8-bit exponent, and a 23-bit mantissa. To decode floating-point binary traces, you must use an IEEE 754 hex-to-float converter, as standard binary-to-decimal lookup charts will yield meaningless integers.

Safety & Hardware Warning: Never rely on software binary masks to protect hardware from overcurrent conditions. While you can use a binary bitmask to shut off a GPIO pin driving a MOSFET, software execution delays and watchdog freezes can result in catastrophic failure. Always pair your firmware logic with physical hardware protection, such as a properly sized fuse and a hardware enable (EN) pin on your motor driver.