Skip to content

Main content

I²C Address Read Bit Packing Tool

Calculate i²c address read bit packing from explicit caller-supplied inputs.

Loading tool…

Description

Shift the seven-bit address one bit left and append the read flag as the low bit.

A seven-bit I²C address is distinct from the eight-bit wire byte containing that address and a read/write bit. The ninth clock carries acknowledgment from the receiver.

Shift the seven-bit address one bit left and append the read flag as the low bit.

When to use this tool

Use I²C Address Read Bit Packing when you need a basic I²C address or acknowledgment interpretation.

How to use the tool and how it works

  1. Enter address, read. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read octet. Use the output convention below.

Shift the seven-bit address one bit left and append the read flag as the low bit.1

Input fieldMeaning and unitsAccepted input
addressAddressRequired. Safe integer; minimum 0; maximum 127.
readReadRequired. Boolean.
Output fieldInterpretationReturned shape
octetOctetRequired. Safe integer.
json
{
  "input": {
    "address": 80,
    "read": true
  },
  "output": {
    "octet": 161
  }
}

Limitations and assumptions

  • The returned octet is a wire address byte, not a different seven-bit target address; reserved addresses are not rejected.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Check reserved addressing rules and the device's transaction requirements, then inspect actual bus signals for diagnosis.

References

  1. Calculation and input contract: microcontroller/i2c-address-read-bit-packing — tool.io

Similar or alternative tools