I2C Address Conversion

I2C Address Converter

Convert between a 7-bit I2C slave address and the 8-bit address byte transmitted on the bus. Calculate read and write address bytes and view hexadecimal, decimal and binary forms.

7-Bit Address 8-Bit Address Byte Read Address Write Address R/W Bit
I2C Address Conversion 7-bit ↔ 8-bit
Choose the direction of the address conversion.
Choose how the address value is entered.
Enter a 7-bit hexadecimal address from 00 through 7F.
8-bit write byte = 7-bit address << 1
8-bit read byte = (7-bit address << 1) + 1
In conventional 7-bit I2C addressing, the transmitted address byte contains the seven slave-address bits in bits 7–1 and the Read/Write control bit in bit 0.
I2C Address Result
7-Bit Address
7-Bit Decimal
Write Address Byte
Read Address Byte
Write Decimal
Read Decimal
Input R/W Bit
Direction
7-Bit Binary Address
8-Bit Write Address Byte
8-Bit Read Address Byte

What Is an I2C Address?

I2C uses addresses so a controller can select a particular peripheral on the shared serial bus. The most common form uses a 7-bit device address.

During transfer, those seven address bits are placed into bits 7 through 1 of an eight-bit address byte. Bit 0 is then used as the Read/Write control bit.

7-Bit vs 8-Bit I2C Address

A common source of confusion is that some datasheets describe the device using its 7-bit address, while others list separate 8-bit read and write address bytes.

7-bit address: 3C

Write byte: 78

Read byte: 79

All three values refer to the same 7-bit-addressed device.

Convert 7-Bit I2C Address to Write Address

To produce the write address byte, shift the seven-bit address left by one position. The new bit 0 is then zero.

7-bit: 0x3C

0x3C << 1
= 0x78

Write byte: 0x78

Convert 7-Bit I2C Address to Read Address

The read address uses the same shifted address but sets the least-significant R/W bit to 1.

7-bit: 0x3C

Shifted: 0x78

Set R/W bit: 0x79

Read byte: 0x79

I2C Read/Write Bit

The least-significant bit of the transmitted address byte indicates the transfer direction.

R/W Bit Meaning
0 Write operation
1 Read operation

I2C Binary Address Example

The 7-bit address 0x3C is:

7-bit binary: 0111100

After shifting left:

Write: 01111000

Read: 01111001

The upper seven transmitted bits are identical. Only the final R/W bit changes.

Convert an 8-Bit I2C Address Byte Back to 7 Bits

When an 8-bit address byte is known, its original seven-bit slave address can be recovered by removing the least-significant R/W bit.

8-bit address byte: 0x79

Binary: 01111001

R/W: 1 = Read

7-bit address: 0111100
= 0x3C

Why I2C Address Confusion Happens

A peripheral may be described as having address 0x3C in one document, while another table shows 0x78 for writing and 0x79 for reading.

These are not necessarily three different addresses. The first is the seven-bit device address, while the latter two include the direction bit.

This converter makes the relationship explicit so binary and embedded-system developers can compare documentation correctly.

7-Bit I2C Address Range

A seven-bit binary field can mathematically contain values from 0 through 127.

Binary: 0000000 through 1111111

Hex: 00 through 7F

However, not every value in that mathematical range should be assigned to an ordinary peripheral because I2C reserves certain address patterns for special purposes.

I2C Address vs Device Register Address

The I2C slave address identifies the peripheral on the bus. A register address identifies a location inside that peripheral.

Address Purpose
I2C Device Address Selects the peripheral on the bus
Internal Register Address Selects a register inside the peripheral

This calculator converts the I2C device-address field only.

I2C Address Converter Example

Suppose a sensor datasheet states:

7-bit device address: 0x68

The write address byte is:

0x68 << 1 = 0xD0

The read address byte is:

0xD0 + 1 = 0xD1

So:

7-bit: 68

Write: D0

Read: D1

Important I2C Address Notes

Important: this calculator focuses on conventional 7-bit I2C addressing.

The 7-bit address occupies bits 7 through 1 of the transmitted address byte.

Bit 0 is the Read/Write bit.

R/W = 0 indicates write.

R/W = 1 indicates read.

The mathematical 7-bit range is 0x00 through 0x7F, but some address patterns are reserved by the I2C specification.

The tool does not implement 10-bit I2C addressing.

The device address should not be confused with internal sensor, EEPROM or peripheral register addresses.

Always verify whether a datasheet lists a 7-bit slave address or an already-shifted 8-bit address byte.

I2C Address Converter FAQs

What does this I2C Address Converter do?
It converts a conventional 7-bit I2C device address into the corresponding 8-bit read and write address bytes, or performs the reverse conversion.
How do I convert a 7-bit I2C address to an 8-bit address?
Shift the seven-bit address left one bit. The resulting value with bit 0 equal to zero is the write address byte.
How do I calculate the I2C read address?
Shift the seven-bit address left by one and then set the least-significant bit to 1.
What is the I2C R/W bit?
It is bit 0 of the address byte. Zero represents write and one represents read.
Is 0x3C the same device as 0x78 and 0x79?
In conventional 7-bit addressing, 0x3C is the device address, 0x78 is its write address byte and 0x79 is its read address byte.
What is the maximum mathematical 7-bit I2C address?
Seven bits can represent values through 0x7F, although some address patterns are reserved and should not be treated as normal peripheral addresses.
Does this calculator support 10-bit I2C addresses?
No. This page is intentionally limited to conventional 7-bit addressing.
Is an I2C device address the same as a register address?
No. The device address selects the peripheral on the I2C bus, while a register address selects a location inside that peripheral.
Scroll to Top