Lecture4 BitWiseOperation
Lecture4 BitWiseOperation
:
Name:
Page 1 of 2
2. Task to be Done : Write the java code to do the following. Explain the binary operations you do to (5)
reach the goal.
(a) Request the user to enter a Byte Number.
(b) Request the user to Enter the bit number that needs to be RESET(0).
(c) Check if the particular bit is SET(1) or RESET(0) and inform the user.
(d) If the particular bit is SET(1),RESET(0) the particular bit.
3. Write the java code to take two byte inputs from the user and do the bitwise exclusive OR operation (2)
and print the result.
Question: 1 2 3 Total
Points: 3 5 2 10
Score:
⇔⇔⇔
Page 2 of 2