Write a function for decimal to binary representation without using any arithmetic operator. Only use the while loop and logical operators. Assume…

Write a function for decimal to binary representation without using any arithmetic operator. Only use the while loop and logical operators. Assume that 32-bit memory is used. If n = 12, the output is 0000 0000 0000 0000 0000 0000 0000 1100

From the BUET MSC (CSE) May 2019 – Written exam, question 1 of 16.

More from this paper