Click to See Complete Forum and Search --> : exact difference between...


Defiant
February 19th, 2001, 10:49 AM
Hi all,

I have a question which i need very specifiek info about.
Does anyone know online articles or info about the difference between an int and a float. I need to know this for a schoolproject that I am doing.
How does the ALU handle and int and a float, what is a significant bit, bitshift, how is a pointer to a int or a float different from the other? what are bitwise operatoren.
If anyone knows what I am talking about, cause i barely do, please respond to this topic.
I could use all the info on these subjects.

I hope that you guys or girls can help me.

Signed,

Daniel

Phil Parker
February 23rd, 2001, 10:54 AM
An integer is a whole number (10, 276, -12 etc). A floating point number (float) allows you to describe numbers with a decimal point.

Looking at the number in binary, the most significant bit (MSB) is the first one which is describes the largest number. eg 111 = 7 ( 4 + 2 + 1 ) change the MSB to 0 gives 011 = 3 ( 0 + 2 + 1 ).

Bitwise operations work with the binary digits. You can do regular Boolean operations (AND, OR, XOR, NOT) and bit shifts (move the whole thing left or right).

eg.1010 AND 1100 = 1000
0010 shift left = 0100

http://www.hotwired.lycos.com/webmonkey/ for a great introduction to a whole load of programming stuff.
hope this helps.
Phil

Defiant
February 27th, 2001, 03:24 AM
thanks for the info.
and i'll look into the url aswell.

I now know some more then i did before. :)

Daniel