I will encourage you to solve the problem and its quite interesting, nevertheless, I will provide you the hints just to help you out in decoding the logic.
decrementing 1 from a binary number is equivalent to adding it's 2's complement to it.
Let's take an example:
Let a 4-bit binary number, A=0111 (+7),
add 4-bit -1 to it, lets call it B=1111(-1)
Notice is LSB is 1, its directly switched to 0.
Decreasing the result further by 1, we get +5, as, 0101.
So if LSB is 0, and second bit from Left is 1, make it 0 and Leftmost bit as 1.
Generalizing it, if k bits from left are 0 and k+1th is 1 then make all the k bits 1 and k+1th bit will become 0 from 1.
Extrapolate the result on various examples and ones you understand the logic, try to design the machine by your own.