Question: Given a piece of Java code below in which we define five variables a, b, c, d, and e public class problem1 { public static

Given a piece of Java code below in which we define five variables a, b, c, d, and e

public class problem1 {

public static void main(String[] args) {

short a = 1200;

short b = -200;

char c = 'x';

char d = 'y';

float e = (float) 6.25;

}

}

What is the 16-bit binary number of variable a stored in memory

Rewrite the 16-bit binary number of variable a into the hexadecimal number

What is the 16-bit binary number of variable b stored in memory

Rewrite the 16-bit binary number of variable b into the hexadecimal number

What is the 8-bit binary number of variable c stored in memory

Rewrite the 8-bit (1 byte) binary number of variable c into the hexadecimal number

What is the 8-bit binary number of variable d stored in memory

Rewrite the 8-bit binary number of variable d into the hexadecimal number

What is the 32-bit binary number of variable e stored in memory

Rewrite the 32-bit binary number of variable e into the hexadecimal number

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!