Data Types

Posted On December 10, 2007

Filed under Uncategorized

Comments Dropped leave a response

1. Give a definition and an example of each of the following data types: characters, integers, floating point numbers, strings and Booleans.

Characters-
Information that relates to symbols. This also includes letters and numbers.

Integers-
Any whole number is considered an integer. The integer can be a negative or positive number (-2 and 5). Fractions and decimal numbers (1/2 and 0.5) are not integers.

Floating point numbers-
A string of digits that represents a real number. It is equivilant to the scientific notation but on the computer. The floating point numbers are measured in megaflops and gigaflops. Examples of floating point numbers are 0.0000895236 and 343248.0343. No matter how big or small the number is it is still considered a floating point number if it has alot of digits in the number.

Strings-
A series of symbols, characters and words that came from predetermined set. If Σ = 73 then 737373737373 is a string over Σ.

Booleans-
A datatype that has true and falso as the only two values. Ada is an example of this:

type Boolean is (False, True);
p : Boolean := True;

if p then

end if;

2. Find out as many different computer data types (note: not file types!) as you can, and give descriptions and examples of these too.

Long-
A computer data type that can store more than 32768 bits.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.