{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

20091120-Primitives-II

# 20091120-Primitives-II - CSE115:Introductionto...

This preview shows pages 1–5. Sign up to view the full content.

Click to edit Master subtitle style CSE115: Introduction to  Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 [email protected]

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

View Full Document
Agenda Today: Signed integral types two’s complement representation
int values: 0, 1, -1, 2, -2, … maximum int: 2147483647 = +2(32-1)-1 minimum int: -2147483648 = -2(32-1) operations: + - * / % 5+2 = 7 +: (int,int) X  int 5-2 = 3 -: (int,int) X  int 5*2 = 10 *: (int,int) X  int 5/2 = 2 (quotient)  /: (int,int) X  int

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

View Full Document
integral types’ representations representation used differs according to whether type is  signed (byte, short, int, long) or unsigned (char): signed integral values are represented using “two’s complement”  representation unsigned integral values are represented using “binary”  representation size of representation differs according to type: byte is 1 byte wide (1 byte = 8 bits)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern