Data representation – CS 61
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
- how I think when I think about programming - alice mazalicemaz.com
- The Lost Art of Structure Packingcatb.org
- abseil / Performance Hintsabseil.io
- NYSRGnotes.ekzhang.com
- C++ Memory alignment - should we care? - Stack Overflowstackoverflow.com
- What Every C Programmer Should Know About Undefined Behavior #1/3 - The LLVM Project Blogblog.llvm.org
- Lab 1: C Programming and Makefiles - HackMDcs.brown.edu
- The compiler will optimize that away | RoyalSlothblog.royalsloth.eu
- Optimization · Crafting Interpreterscraftinginterpreters.com
- Optimization of Computer Programs in Cicps.u-strasbg.fr
- Learn C++ – Skill up with our free tutorialslearncpp.com
- Write your Own Virtual Machinejmeiners.com