QUESTION DESCRIPTION :
Let us help Raje to perform basic bitwise operation by providing three inputs given to the program with the following conditions are met,
Bitwise And
Bitwise OR
Bit Wise Not
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
TEST CASE 1
INPUT
23 4
OUTPUT
Bitwise And of 23 and 4=4
Bitwise OR of 23 and 4=23
Bit Wise Not of 23 and 4=19
EXPLANATION:
The code requires you to print the AND( & ), OR ( | ) , NOT( ~ ) values of the given integer inputs. ( BITWISE OPERATIONS ). The input will be two integers , on which you have to perform BITWISE operations. ( How do BITWISE operators work )
ALGORITHM :
Let us help Raje to perform basic bitwise operation by providing three inputs given to the program with the following conditions are met,
Bitwise And
Bitwise OR
Bit Wise Not
Input and Output Format:
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
TEST CASE 1
INPUT
23 4
OUTPUT
Bitwise And of 23 and 4=4
Bitwise OR of 23 and 4=23
Bit Wise Not of 23 and 4=19
EXPLANATION:
The code requires you to print the AND( & ), OR ( | ) , NOT( ~ ) values of the given integer inputs. ( BITWISE OPERATIONS ). The input will be two integers , on which you have to perform BITWISE operations. ( How do BITWISE operators work )
ALGORITHM :
- Accept the two numbers ( a,b )
- Calculate AND of the two numbers ( a&b )
- Calculate OR of the two numbers ( a|b )
- Calculate XOR of the two numbers ( a^b )
No comments:
Post a Comment