{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSE 123C.001 2-11-08

CSE 123C.001 2-11-08 - CSE 123C Long long score=10999999...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 123C February 11, 2008 Long long score=10999999; Long is the same as int Unsigned int is a data type o Unsigned int x=1000; o Unsigned int uses a different range than signed int One bit is used to tell you the sign of the number Computers use a specified number of binary digits (bits) to represent integers Unsigned integers o Represent integers from 0 to 2 maxbits -1 o Represents the integer in binary and all bits represent the value of the number Two’s complement o Used to represent integers o Represent in binary o Switch 1 and 0 o Add 1 to the new number o Example 127 0111111 switch 1 and 0 1000000 add 1 to new number 1000001 = -127 o When added together, should equal 0 Float Values
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
o Float values are represented in scientific notation with a mantissa and an exponent o 288.9= 2.889 * 10 2 = 2.889e2 -0.0456= -4.56 * 10 -2 = -4.56e-2 o Absolute value of mantissa must be between 1 and 10, not including 10 o Exponent must be between -38 and 37 o Mantissa and exponent are represented in binary in the memory
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 4

CSE 123C.001 2-11-08 - CSE 123C Long long score=10999999...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online