Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

Integer Float

Float or floating point numbers possess a fixed


Integers can be described as whole numbers specific number of bits which are arranged for the
Definition meaning that they do not have any fractional parts. whole number and the fractional portion of the
number.

Integer data types can be represented in three


number systems – Float can be only written using a decimal number
Representation system
Decimal, Octal and Hexadecimal

Generally, integer data types require 2 bytes of Generally, float data types require 4 bytes of
Memory requirement memory memory

Example -125, 567, 4,667 1.2e34, 0.98

The location of decimal and binary point moves


From Latin integer meaning literally "untouched,"
Origin hence "whole"
around, therefore named as floating numbers or
float.

 Byte - 1 byte of information (8 bits), Range


from -128 to 127
 Short - 2 bytes, Range from -32768 to 32767
 Int - 4 bytes, Range from -2147483648 to Occupies 32 bits (4 bytes) and its significand has a
Data type Integers 2147483647 precision of 24 bits (about 7 decimal digits).
 Long - 8 bytes, Range from -
9,223,372,036,854,775,808 to
9,223,372,036,854,775,807

You might also like