Intel Corporation Interview Question

to implement a function with high Z output option