Is there a way to have bidirectional ttl logic levels to cmos logic levels conversion in a unique IC. Because right know im trying to create a z80 computer but using a avr as a peripheral as serial port, spi, screen ..., but the z80 considers logic true to be from 2.0V (usually outputs 2.4V) and avr considers logic true to be approximately 4V. My idea was using a CD4504B for the ttl to cmos, but then should I add a tri state buffer between it and the avr?
If both are running off 5V then all you need is a 2.2k pullup resistor to 5V or similar.
TTL threshold is 1.5V with safe levels defined by <0.8 and >2.0V while CMOS is Vss/2 with safe levels defined by <1/4 to >3/4 Vss roughly.
You're in the ballpark. The key issue is "bidirectional" - you haven't explained HOW the direction is chosen.
For example, an SPI bus typically has 3 lines in one direction (MOSI,CLK,CS) and 1 line in the other direction (MISO). It provide bidirectional communication, but none of the lines are bidirectional. So you could use one CD4504B in the low-to-high direction and one in the high-to-low direction.
If, instead, you're using something like I2C, the actual wires are bidirectional. Then you could use something like the MAX14611 which has open drain outputs.
If you have a wire indicating which direction the data is going, you can use a direction-selectable level shifter such as SN74LVC2T45.
TI has a nice overview of the different types: http://www.ti.com/logic-circuit/voltage-level-translation/overview.html