2025-02-20 23:51:20 +01:00
..
2025-02-20 23:51:20 +01:00
2025-02-20 23:51:20 +01:00

Task

This task is a text-based task but mostly automatically checked. You are required to write your answers into submission.txt by replacing the question marks with the correct solution. Please, do not change the line formating.

You can check whether your solution is correct by clicking on the test button.

Numbers can be provided in various formats in C++. Literals prefixed with 0b indicate binary encoding. Assume unsigned arithmetics with sufficient numbers of bits, i.e. no overflows. Convert the following binary numbers into decimal numbers (1-4) and decimal numbers to binary (5-8):

# Lines starting with # are comments. Spaces is ignored.
# Lines starting with a whitespace before # will not be a comment.

# Convert to decimal:
0b1           = ?
0b10          = ?
0b000001      = ?
0b101010      = ?

# Convert to binary:
7             = ?
11            = ?
28            = ?
1024          = ?