Implement Function Using Mux And Demux