LinkedIn interview question

Create random number generator from an object with binary output.