Problems
Complementary code - 1
Complementary code - 1
Given numbers a and n, print the representation of a in n-bit binary complement code.
Print a line with n digits containing the representation of number a in n-bit binary complement code, where the first digit is the highest bit.
Input
In one line given two numbers a and n (2 ≤ n ≤ 16, -2n-1
≤ a ≤ 2n-1-1
).
Output
Print the number in n-bit complement code.
Input example #1
5 8
Output example #1
00000101
Input example #2
-5 8
Output example #2
11111011