flâneur — a map of the web's best reading

Data representation – CS 61

cs61.seas.harvard.edu · 12,532 words · saved by 1 readers

This course is about learning how computers work, from the perspective of systems software: what makes programs work fast or slow, and how properties of the machines we program impact the programs we write. We want to communicate ideas, tools, and an experimental approach. The first unit, data representation, is all about how different forms of data can be represented in terms the computer can understand. Remember to check out the textbook for more readings. Computer memory is an enormous array of bytes. A byte is a value between 0 and 255. A slot in this array is identified by its address, so the value at an address is a number between 0 and 255. As programmers our job boils down to reading and writing bytes from different addresses. On a computer with M bytes of memory, and therefore M slots, you can think of an address as a number between 0 and M−1. My laptop has 16 gibibytes of memory, so M = 16×230 = 234 = 17,179,869,184 = 0x4'0000'0000—a very large number! The problem of data rep

Data representation – CS 61 This is not the current version of the class . Data representation Contents Overview Bytes of memory Objects Segments Abstract machine Unsigned integer representation Signed integer representation Pointer representation Array representation Compiler layout Alignment Array access performance Collection representation Consequences of size and alignment rules Uninitialized objects Pointer arithmetic Undefined behavior Computer arithmetic Overview This course is about learning how computers work, from the perspective of systems software: what makes programs work fast or

Explore this link on the map →

related reading