To convert the 8-bit binary value 11010110 to denary (decimal), the exact answer is 214. The formula used is the sum of each bit multiplied by 2 raised to the power of its position index (starting from 0 on the right): (1 × 2^7) + (1 × 2^6) + (0 × 2^5) + (1 × 2^4) + (0 × 2^3) + (1 × 2^2) + (1 × 2^1) + (0 × 2^0) = 128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214. In pure mathematics, base-2 positional notation is the only assumption that fixes this answer. However, in electrical engineering—when reading microcontroller ADC pins or Modbus smart meter registers—the "true" real-world value depends entirely on your hardware scaling assumptions: the reference voltage ($V_{ref}$), the bit-depth, and the potential transformer (PT) ratios.

The Math vs. The Mains: Scaling Denary to Real-World Voltage

Converting binary to denary is only the first step on the bench. Once you have your denary integer, you must scale it to a physical electrical unit. What assumption fixes the final answer? In DC logic, it is the microcontroller's $V_{ref}$ and bit-depth. For an 8-bit ADC with a 5.0V reference, a denary value of 214 translates to: (214 / 255) × 5.0V = 4.19V. If you are using a 3.3V logic board like the ESP32-WROOM-32, that same denary 214 yields (214 / 255) × 3.3V = 2.77V.

When dealing with AC mains monitoring via a smart meter or a Texas Instruments ADC front-end, the denary scaling shifts dramatically based on your regional voltage and phase configuration:

  • 120V vs 230V Systems: If a 16-bit smart meter register is scaled to a 120V nominal system (max 150V peak), a denary value of 214 represents (214 / 65535) × 150V = 0.48V. If that exact same meter hardware is reconfigured for a 230V nominal system (max 300V peak), the denary 214 now represents (214 / 65535) × 300V = 0.97V.
  • 3-Phase Systems: In 3-phase monitoring, you must define whether the denary register represents line-to-neutral (e.g., 230V) or line-to-line (e.g., 400V). This shifts your scaling multiplier by a factor of √3 (1.732). A denary value representing 230V line-to-neutral equates to roughly 398V line-to-line.
  • When Power Factor (pf) and Phase are Meaningless: Power factor and phase angle do not affect the raw binary-to-denary conversion. They only become relevant after you have converted the binary voltage and current registers to denary and are calculating real power (Watts) using the power triangle ($W = VA \times pf$). Applying pf to a raw binary voltage register is mathematically meaningless.

Neighboring Binary-Denary Reference Table (±20% Range)

When debugging a digital logic analyzer or an ADC stream, it helps to visualize the neighboring values to confirm your bit-shifts are correct. The table below shows a ±20% range around our target denary value of 214 (spanning 171 to 255), scaled for both 5V and 3.3V 8-bit references.

Binary (8-Bit) Denary (Decimal) Scaled Voltage (5.0V Ref) Scaled Voltage (3.3V Ref)
10101011 171 3.35V 2.21V
11000000 192 3.76V 2.48V
11010110 214 4.19V 2.77V
11101010 234 4.58V 3.03V
11111111 255 5.00V 3.30V

When Binary-to-Denary Conversion Becomes Meaningless

On the jobsite or in the lab, a raw binary-to-denary conversion becomes electrically meaningless under three specific failure modes:

  1. Unknown $V_{ref}$ or Non-Linear ADCs: If you read an ESP32 ADC raw binary value without accounting for its non-linear attenuation curve at the extremes (near 0V and near 3.3V), the denary conversion will yield a mathematically correct but physically false voltage. Always use the manufacturer's calibration eFuse data for precision work.
  2. Endianness Errors in Modbus: When pulling data from a Modbus RTU power meter, a 16-bit register is split into two 8-bit bytes. If the meter outputs Big-Endian but your PLC or Arduino script reads it as Little-Endian (Word Swap), the binary 11010110 00000001 yields a denary of 54784 instead of the correct 3430. The math works, but the data is garbage.
  3. Signed vs. Unsigned Misinterpretation: If a sensor outputs a signed two's complement binary value to indicate negative current flow (e.g., battery discharging vs. charging), treating it as an unsigned integer will result in massive, meaningless denary numbers (e.g., reading a -5A discharge as 65,531).

Frequently Asked Questions

How do I convert a 16-bit binary Modbus register to denary for a power meter?

First, ensure you know the byte order (endianness) of your specific meter. Combine the two 8-bit binary bytes into a single 16-bit string. For example, if the high byte is 00000010 and the low byte is 10101100, the combined binary is 0000001010101100. Convert this to denary by summing the powers of 2 for every '1' bit, which yields 684. Finally, multiply this denary value by the meter's scaling factor (e.g., if the manual states 1 count = 0.1V, your reading is 68.4V).

Why does my binary to denary conversion give the wrong AC voltage reading?

The most common culprit is ignoring the RMS vs. Peak voltage assumption. If your smart meter's binary register outputs the peak voltage of a 120V AC sine wave (approx 170V), but your scaling formula assumes the denary value represents RMS (120V), your final calculated voltage will be off by a factor of √2 (1.414). Always check the datasheet to see if the binary register maps to RMS, Peak, or Peak-to-Peak.

Does power factor affect how I convert binary sensor data to denary?

No. Power factor (pf) is a dimensionless ratio between real power (Watts) and apparent power (VA). It has zero impact on the foundational binary-to-denary math used to read raw voltage or current registers. You only apply the power factor after you have successfully converted the binary voltage and binary current registers into denary values, scaled them to real-world Volts and Amps, and are ready to calculate true Watts.