06-numbers

06-numbers - << Demonstration...

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

View Full Document Right Arrow Icon
CPE 357 - Systems Programming Fall 2009, Day 6 Number Representation Last Modified: Fri Oct 2 10:58:59 PDT 2009 Serious C Exam: True/False is all about exceptions, edge cases, etc. Understand parameter passing Remember your survey questions Know about strings See parts.c Know about macros See badmac.c Basics of file use open vs. fopen use of printf Binary Bits Octal Hex Negative numbers 1's comp 2's comp sign-and-magnitude Arithmetic compare signed and unsigned add 250 = FF - 5 = FA 7 7 --- -- 1 1 -6 7 -- 1 Bitwise ~ ^ | >> (signed vs. unsigned)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: << Demonstration shift&mask to extract group permissions from a mode set group permission to something -- say 6 or 1 (they're likely to suggest 'or' without thinking. point out that plain add will do as well Endianness Storage model If there's time EOF problem count bits show that and ==> carries show the overflow conditions relate to carries into and/or out of high bit Lab: strtoi() function (reimplement strtol). vim: set sts=4 sw=4 ai et :...
View Full Document

This note was uploaded on 10/12/2009 for the course CPE 357 taught by Professor O'gorman during the Spring '09 term at Cal Poly.

Page1 / 2

06-numbers - << Demonstration...

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

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