Integer vs. Pointer

Difference Between Integer and Pointer

For those who are into computer programming, the words Integer and Pointer are already common among them as it is part of their studies. The term Integer is defined as information or data that is a subset of integers in mathematics, on the other hand, Pointers refers to a type whose value points to or refer to another value which has been saved somewhere in the computer’s hard drive or memory using the address of the value.

Integer

In the science of computer programming, an Integer is defined as any information or data this is a representative of a subset of mathematical integers. In computer programming languages, an integer is a data type that represents subset of mathematical integers. The value of the information that contains an integral part is the mathematical integer to which it corresponds. Integers may be of two types: Signed and unsigned. Signed Integers can stand for negative integers whereas unsigned ones may represent non- negative integers,

The usual and most common method of representing a positive integer is through a string of bits using the binary numeral system. There are differences and variations in the order of these bits and the precision or width of the Integer represents the bits number.

In binary numeral system, the negative figures can be signified in three ways which are as follows:

  1. One’s Complement
  2. Two’s Complement
  3. Sign- Magnitude

Another method existed before called the Binary- Coded Decimal, it is, however, rarely used as of present.

Pointer

In the language of computer programming, a pointer refers to a daya type whose value points to or directly refers to another value that has been stored in another area within the computer’s memory. These pointers take the place of general purpose registers in case of high level languages though is there us low level language like in assembly language, it is simply accomplished in the available computer memory. Another definition of a pointer as a less subtracted or simple implementation of a more abstract information/ data type, these are supported by a host of programming languages although there are certain limitations on the use of pointers in some languages.

Also, Pointers can be employed to hold the addresses of entry points in procedural programming and are used to bind methods in functions in Object- Oriented Programming.

 

Category: Education & Training  |  Tags: ,