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
Get step-by-step solutions from verified subject matter experts
