Question: Java programming short a = 0x55ff; short b = 0x00ff; System.out.printf(%08x , a & b); System.out.printf(%08x , a | b); System.out.printf(%08x , a ^ b);

Java programming

short a = 0x55ff;

short b = 0x00ff;

System.out.printf(%08x , a & b);

System.out.printf(%08x , a | b);

System.out.printf(%08x , a ^ b);

System.out.printf(%08x , ~a);

//output

000000ff

000055ff

00005500

ffffaa00

*Can you tell me how to transfer to 8 hexadecimal digits??

*Can you please explain me in detail?

Thanks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!