|
In this case: the data type information provides the context to use the correct encoding method.
short x = -1; // signed numeric variable in C++ // It stores 11111111 11111111 in x cout << x; // Prints -1 unsigned short y; // unsigned numeric variable in C++ y = x; // Stores 11111111 11111111 in y cout << y; // Prints 65535 (2^16 - 1) |
The variable type information gives the context to the program on how to interprete the representation
Each data type uses its own code:
unsigned int uses the binary number system unsigned short uses the binary number system int uses the 2s complement code short uses the 2s complement code |
Because each variable in Java (and C) must be defined using a data type, the Java compiler can know which code it needs to use to interpret the binary number stored in a variable.
|
Answer:
You is an English word. |
|
|
(Millie is in Kindergarten,,,,) TEACHER: Millie, give me a sentence starting with 'I. ' MILLIE: I is.. TEACHER: No, Millie..... Always say, 'I am.' MILLIE: All right... 'I am the ninth letter of the alphabet.' |