Previous Lecture | lect05 Slides | Next Lecture |
Code From Class
Code from class: https://github.com/ucsb-cs16-su17/code-from-class/tree/master/Lec05
Topics
ofstream
is quite similar toifstream
- Binary representation
- Converting between bases
- Two’s complement representation of a negative number
- most significant bit is 1 ⟹ the number is negative
- addition of negative/positive numbers works as you’d expect
- Bitwise operations
- Big/little endian representation of multi-byte programs in memory