Sunday, December 2, 2012

Bit Operations Question

Given two bits A and B. A can 0 or 1, similarly B can be 0 or 1. The various operations that can be performed are OR, AND, XOR etc etc. So the values range from 0000(0) - 1111(15). Write a function which generates 0000-1111 given two bits. Also provide the test cases for same.

No comments:

Post a Comment