I2C Address Converter

Convert between the 7-bit address and the 8-bit read/write byte actually sent on the wire.

8bit7 · Bench Instrument

I2C Address Converter

Click a bit, or type hex/binary into any field — everything else recalculates.
ADDR 0x48
7-bit Addresswhat most datasheets and i2cdetect call “the address”
8-bit Write Bytesent on the wire for a write
8-bit Read Bytesent on the wire for a read

Why there are two numbers for one address

I2C addresses are 7 bits — 128 possible slave addresses. But every byte on the wire is 8 bits, so the controller shifts the 7-bit address left by one and appends a read/write bit in bit 0: 0 for a write, 1 for a read. That means a single device answers to two different byte values depending on the transfer direction, even though it only has one address.

write_byte = (addr7 << 1) | 0
read_byte  = (addr7 << 1) | 1
addr7        = byte >> 1  (either byte — bit 0 just drops out)

This is a frequent source of bugs: Linux’s i2cdetect and most Arduino/embedded HAL calls expect the 7-bit form, but plenty of datasheets print the 8-bit write byte as “the address” instead. If a device that should be at 0x48 only shows up at 0x24 or a scan seems to hit the wrong chip, a mixed-up bit width is usually why.