Silicon Image interview question

random, some basic coding.