--%>

Explain Sign extension

Sign extension: Whenever an integer value from a type with a specific range is stored in a variable with a larger range, Java employs sign extension to determine the resultant value. The most important bit in the original value is employed to fill the extra bits of the novel value. For example, assume a byte variable comprises the bit pattern, 10000000. When this is stored in a short variable, the resultant bit pattern will be 1111111110000000. When the original value is 01000000, the resultant bit pattern will be 0000000001000000.

   Related Questions in Programming Languages

  • Q : What is Filter stream Filter stream :

    Filter stream: It is an input-output class which filters or manipulates its stream of input- or output-data in some manner. Two illustrations are: DataInputStream and DataOutputStream.

  • Q : Define Anonymous object Anonymous

    Anonymous object: An object formed without an identifier. They are generally formed as array elements, actual arguments or method outcomes. For example:     private Point[] vertices = { &n

  • Q : Describe Last in-first out Last in,

    Last in, first out: It is the LIFO semantics of a stack data structure. Items are eliminated in the opposite order to which it arrived in the stack; therefore newer items are always eliminated before older ones.

  • Q : Default function arguments C++ allows

    C++ allows us to call

  • Q : Explain the way to initialize contents

    Explain the way to initialize contents of a dialog.

  • Q : Define Primitive type Primitive type :

    Primitive type: Java's eight standard non-class types are the primitive types as: Boolean, byte, char, float, int, double, long and short.

  • Q : Explain Program counter Program counter

    Program counter: A program counter is an integral portion of a computer's Central Processing Unit. It includes a reference to the memory address of the subsequent instruction to be fetched, ready to be executed throughout the next fetch-execute cycle.

  • Q : Define Data type Data type : There are

    Data type: There are 8 primitive data types in Java; five of such symbolize numerical types of changeable range and precision - float, double, int, long and short. The remaining three are employed to symbolizing single-bit values (that is, Boolean), s

  • Q : Define User Datagram Protocol User

    User Datagram Protocol: The User Datagram Protocol (abbreviated as UDP) is a set of rules which permit communication among two processes across a network. The protocol is unreliable, that means that information is not guaranteed to be

  • Q : Define Checked exception Checked

    Checked exception: An exception which should be caught locally in the try statement, or propagated through a throws clause stated in the method header.