20091120-Primitives-II

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

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

View Full Document Right Arrow Icon
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 alphonce@buffalo.edu
Background image of page 1

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

View Full DocumentRight Arrow Icon
Agenda Today: Signed integral types two’s complement representation
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/13/2011 for the course CSE 115 taught by Professor Decker during the Fall '08 term at SUNY Buffalo.

Page1 / 13

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

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

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