Infosys Interview Question

Asked me write a very simple algorithm based on microprocessor