CSC161 2011S Imperative Problem Solving
[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazzza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
[Current Reading]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
[Reference]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
[CSC161 2010F (Rebelsky)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Back to The Command Line, Continued. On to Binary Representation, Continued.
This outline is also available in PDF.
Held: Tuesday, 15 February 2011
Summary: We begin to study binary representation, focusing on representations of integers.
Related Pages:
Notes:
lecture.
eyes closedquestion: Does anyone ever read my answers?
Overview:
short, long, and more.
on; 0 is
off).
Normally. The remaining N-1 bits are simply an unsigned integer.
Backwards. For the remaining bits, 0 represents a negative 1, 1 represents 0.
Encoded. To represent signed N in k bits, we write unsigned N+2k-1.
negativeand a leading 1 means "positive".
Just plain weird: We think procedurally. To negate a number, we flip all the bits and add 1.
Logical
& - bitwise "and"
| - bitwise "or"
~ - bitwise "not"
Shifting
<< - left shift
>> - right shift
flagsthat they need to pass around.
Back to The Command Line, Continued. On to Binary Representation, Continued.
[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazzza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
[Current Reading]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
[Reference]
Related Courses:
[CSC195 2003S (Rebelsky)]
[CSC161 2009F (Coahran)]
[CSC161 2010S (Walker)]
[CSC161 2010F (Rebelsky)]
Misc:
[SamR]
[ISO]
[GNU Coding Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Tue May 10 10:34:27 2011.
The source to the document was last modified on Wed Jan 5 12:52:12 2011.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CSC161/2011S/Outlines/outline.14.html.