The anode of the diode will produce a TTL logic high (because a disconnected TTL input floats up to a logic high) but not a TTL logic low (because it can't go low enough).
It will produce a Cmos logic low but not a Cmos logic high (because a disconnected Cmos input floats all over the place).