Basics Of Bit Manipulation

easy
1. You are given a number n.
2. Print the number produced on setting its i-th bit.
3. Print the number produced on unsetting its j-th bit.
4. Print the number produced on toggling its k-th bit.
5. Also, Check if its m-th bit is on or off. Print 'true' if it is on, otherwise print 'false'.

Input Format

A number Four numbers i,j,k,m.

Output Format

Check the sample ouput and question video.

Constraints

1 <= n <= 10^9
1 <= i <= 9
1 <= j <= 9
1 <= k <= 9
1 <= m <= 9

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
57
3 
3 
3 
3
Output
57
49
49
true
Previous
Gray Code
Next
Print Value Of Rsb Mask

Related Questions