If you need to know how to convert binary to decimal using a binary table for the standard 8-bit sequence 10110101, the direct decimal answer is exactly 181. This assumes an unsigned integer representation. The formula used with values substituted is: 181 = (1 × 27) + (0 × 26) + (1 × 25) + (1 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20). While pure mathematics requires no environmental assumptions, translating these raw numbers into real-world electrical and embedded systems requires a firm understanding of your hardware context and data types.

The Core Math: Binary to Decimal Table Method

The fastest way to decode a byte on the bench without a calculator is to map each bit position to its corresponding power of 2. You read the binary string from right to left (Least Significant Bit to Most Significant Bit). If the bit is a 1, you add that column's decimal weight to your total. If it is a 0, you ignore it.

8-Bit Binary Position Reference Table
Bit Position (Right to Left) Power of 2 Decimal Weight Cumulative Max (All lower bits = 1)
Bit 0 (LSB)2011
Bit 12123
Bit 22247
Bit 323815
Bit 4241631
Bit 5253263
Bit 62664127
Bit 7 (MSB)27128255

To visualize how this scales, here is a small table of neighboring values within a ±20% range of our target value (145 to 217). Notice how flipping a single high-order bit causes a massive jump in the decimal equivalent.

Neighboring Values (±20% Range of 181)
Decimal 8-Bit Binary Hex Equivalent Delta from Target (181)
145100100010x91-36 (-19.8%)
163101000110xA3-18 (-9.9%)
181101101010xB50 (Target)
199110001110xC7+18 (+9.9%)
217110110010xD9+36 (+19.8%)

Hardware Context: How 120V, 230V, and 3-Phase Shift the Result

In AC power theory, converting apparent power (kVA) to real power (kW) shifts entirely based on assumptions like voltage, power factor (pf), and whether the system is 120V single-phase, 230V single-phase, or 400V 3-phase. Pure binary math does not shift based on AC topology. However, when you are reading binary registers from a power monitoring IC (like the Microchip ATM90E32 or ATM90E26) via SPI or I2C, the physical meaning of that decimal output shifts dramatically based on your mains configuration.

Assume your ESP32 reads a 16-bit binary register from an energy monitor and converts it to the decimal value 5461. What does that mean in volts?

  • 120V Split-Phase (US): If your potential transformer (PT) and burden resistor are scaled for 120V nominal, a decimal reading of 5461 might map directly to 120.5V RMS after applying the IC's internal scaling constant.
  • 230V Single-Phase (EU/UK): If you move that exact same hardware to a 230V system without updating the scaling registers, the decimal output will clip or saturate at the maximum 16-bit value (65535) because the physical voltage exceeds the ADC's assumed range. The binary-to-decimal conversion is mathematically correct, but the engineering unit is entirely wrong.
  • 400V 3-Phase (Industrial): In a 3-phase system, you are typically reading three separate voltage registers and three current registers. The decimal values must be converted individually, then combined using vector math (accounting for the 120-degree phase shift) to calculate total system power.

The takeaway: Never present a single-voltage scaling factor as universal. The assumption that fixes the real-world answer is your CT/PT ratio, your burden resistor value, and the specific AC topology you are measuring. For deeper reading on AC measurement topologies, refer to the All About Circuits guide on three-phase systems.

When the Conversion is Meaningless (Data Type Assumptions)

Just as calculating real AC power is meaningless if the power factor (pf) is unknown, converting a raw binary string to an unsigned decimal is meaningless if you do not know the data type assumption. If you pull a byte off an I2C bus and blindly apply the unsigned binary table method, you will get the wrong physical value in three common scenarios:

Data Type Assumptions: When Unsigned Conversion Fails
Data Type Example Binary Unsigned Decimal (Wrong) Actual Physical Meaning
Signed Two's Complement 11111001 249 -7 (e.g., -7°C from an LM75 temp sensor)
IEEE 754 Floating Point 01000001... (32-bit) 1094713344 12.5 (e.g., a calibrated voltage constant)
ASCII Character Encoding 01010011 83 The letter 'S' (e.g., from a serial GPS NMEA sentence)

If you are debugging a sensor and the decimal output looks like a massive, random number (e.g., reading 249 when the room is clearly not 249 degrees), check the datasheet. The sensor is likely returning a signed two's complement value. You must invert the bits, add 1, and apply a negative sign to get the true decimal equivalent. The MIT OpenCourseWare computation structures notes provide an excellent deep dive into how hardware handles signed binary arithmetic at the logic gate level.

FAQ: Binary Table Conversions in Practice

How do I handle 10-bit or 12-bit ADC readings on an ESP32?
The standard ESP32 ADC returns a 12-bit value (0 to 4095). You cannot use an 8-bit table for this. Extend the table method up to Bit 11 (211 = 2048). If you read a binary value of 100000000000, the decimal is 2048. Assuming a 3.3V reference, the physical voltage is (2048 / 4095) * 3.3V = 1.65V.

Does endianness affect my binary table conversion?
Endianness (Big-Endian vs Little-Endian) does not change how you convert a single byte using a binary table. However, if you are combining two 8-bit registers to form a 16-bit decimal number (common in Modbus RTU or I2C sensors), endianness dictates which byte gets multiplied by 256 (28) and which byte remains the base value. Always verify byte order in the component datasheet.

What is the fastest way to convert binary to decimal without a calculator on the bench?
Memorize the first 6 powers of 2 (1, 2, 4, 8, 16, 32). When looking at a byte, immediately identify the MSB (128). If it's a 1, start your mental total at 128. Then scan the remaining bits and just add the weights of the '1's. With practice, you can decode an 8-bit register in about three seconds.