Class Notes (834,986)
Canada (508,846)
CMPT 120 (49)
Greg Baker (15)
Lecture

Integers, Characters, and Strings

2 Pages
113 Views
Unlock Document

Department
Computing Science
Course
CMPT 120
Professor
Greg Baker
Semester
Fall

Description
9242007CMPT120SignedIntegersAddition can be done on 2s complement values the same way as for unsignedoNote throw away any carry in the most significant placeoeg010110 22 1110115 01000117now when subtracting one to convert 2s complement to decimal we can add 1 insteadoeg convert the twos complement value 11101000 to signed decimal11101000 11111111add 1 11100111flip0001100028162410Answer24other types of numbers we have seenolong integers Python uses for values too largesmall for 32bit 2s compofloating point like scientific notationwont discuss details of theseCharacters and Stringswe know how to represent unsigned integers so characters are easywe can co
More Less

Related notes for CMPT 120

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit