Advertisement
SpeedContestant

CS118 Spring 2018 Shared Notes

Feb 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. This is a pastebin for general note-taking.
  2.  
  3. ~~~~~~~~~~2-22-2018~~~~~~~~~~
  4. We got yelled at for not doing well enough on the quiz up to 1.4.1
  5. ->CPU doesn't know if a number is stored in hex,m binary, or decimal. All numbers are stored as decimal
  6. ->Most people got the question for how a word is stored. IA32 doesn't require a word to start on byte 0 or 4. bytes 1-4 CAN form a word.
  7. ->Signed-magnetude stores a negative number as 1 in bit n-1 followed by a base 2 representation of magnitude.
  8. -> the following code WILL BE ON FINAL:
  9. int f()
  10. { int x=1;
  11. char *p;
  12. p = (char *) &x;
  13. return *p;
  14. }
  15. returns 1 if machine is big endian and 0 if little endian, and returns the value of x.
  16. -> the range of numbers that can bbe stored using an n-bit word is [0,2^n-1] NOTE: it is not [0,2^(n-1)]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement