JirR02 03cc5aca86 Exercise 4
Added Exercise 4 to respository with README Files
2025-03-13 19:06:18 +01:00
..
2025-03-13 19:06:18 +01:00
2025-03-13 19:06:18 +01:00

Task

Write a program that performs the binary expansion for a given decimal input number x, where 0 \leq x < 2. Use the algorithm presented in the lecture. The program must output the first 16 digits of the number in the format: b_0, b_1, b_2, ... , b_15.

Important Always print all 16 digits, even the trailing zeros. Do not normalize or round the number.

You can structure your program into functions to avoid code repetition. Do not forget to annotate functions with pre- and post conditions.