# Shouldn't an I2C address be 7-bit binary?

I have a charging IC which I want to use with I2C. In the datasheet on page 31 it says that the I2C slave address is 6BH. Shouldn't this be a 7-bit binary number?

• And how many bits does a 6B have? Commented Aug 1, 2021 at 18:32
• 6B = 1101011 needs only 7 bits to represent it. Btw, 10-bit addresses are also sometimes used. Commented Aug 1, 2021 at 18:33
• The "H" just indicates it's a hex number. 6BH == 0x6B. Commented Aug 1, 2021 at 18:35
• "H" - short form of "hexadecimal" when discussing numbers with various bases.
– JRE
Commented Aug 1, 2021 at 18:35
• Curses! curses on i2c folks who've caused so much confusion by concatenating the read/write bit with 7-bit address. Commented Aug 1, 2021 at 18:48

The address 6BH can be written with just 7 bits, as binary 1101011.

The fact that a number is written in hexadecimal does not necessarily imply that it must be expressed using an integer multiple of 4 bits.

No, it really shouldn't. Or in fact, it depends who you ask, as it is a matter of opinion and depends on manufacturer and people who write code how they want to represent the I2C address.

Basically, there are two different notations:

• 7-bit notation, with 7-bit value, which does not include the read/write bit
• 8-bit notation, with 8-bit value, that contains the read/write bit.

The I2C specification always uses the 7-bit notation, where read/write bit is not part of the value. Some follow this notation.

For practical reasons, many follow the 8-bit notation, as that's what the 8-bit byte is on the bus, and what is written to 8-bit data register to transmit it, and so on. Sometimes the read address and write address are given separately, which is a definite sign of 8-bit addressing used.

So what this means is that when you are reading a chip datasheet and using MCU code to interface the chip, that sometimes addresses are used as 7-bit notation and sometimes in 8-bit notation, so you need to sometimes convert the notation to access the chip. It does not change the address or the bit pattern in any way, it's just how you look at the bits.

It is hard to see from the datasheet, if 0x6B is used as a 7-bit or 8-bit address, but the protocol diagrams indicate that 0x6B is the 7-bit address as the read/write bit is separate in the transactions.

• The read and write at two different addresses in 8-bit notation has fooled me up more than once. Commented Aug 1, 2021 at 22:33
• Also: some manufacturer say that their part has two address (which are simply the read/write part variant of the same). I guess the official notation is the NXP/Philips one, 7 bin plus RW bit. Otherwise handling the 10 bit addressing would be even more complex Commented Aug 2, 2021 at 6:16
• if "The I2C specification always uses the 7-bit notation" then I think we should say that yes, indeed, it really should be a 7-bit number. (Which still doesn't mean that some might give a different answer, just that they're the ones who are wrong.) Commented Aug 2, 2021 at 10:18
• So in 8-bit the addresses would be D6 and D7? Commented Aug 3, 2021 at 2:32
Hex 7-bit hex Binary
6B 6B 110 1011