CSCI 103L Lecture Notes - Lecture 2: Increment And Decrement Operators, Modulus Guitars, In C

33 views3 pages

Document Summary

Binary works like normal base 10 numbers but with base 2: ie: columns are 2^0 ,2^1 , 2^3, etc. All info is stored in the computer in binary. In c++ variables can be of different types and sizes: integer types (signed by default unsigned with leading keyword unsigned ex: unsigned char) Char - 1 byte , 8 bits: singed range -128 to + 127, unsigned range 0 to 255, if it"s signed it puts half the range as positive and half as negative. Short - 2 bytes, 16 bits: singed ranged -32768 to +32767, unsigned range 0 to 65535. In this class we will mostly use char and int: floating point types. In this class always use double: text. Text has to be represented with binary numbers. Ascii = 8-bit code, can handle 256 characters: english only. Unicode = 16-bit code: 2^16 possible characters ~65000, most languages w/ an alphabet.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents