Block B

Variables

What is a memory address? Your RAM is segmented into bytes. One bytes is 8 bits. This is the smallest unit of addressable memory. Every byte in ram has a memory address; these are numbered consecutively starting at 0x1 and going up to 0xFFFFFFFF (on a 4GB RAM), higher with more RAM. These are machine memory addresses.

When you program runs, it is granted memory by the OS. The OS renumbers the addresses in the program's process so that the program "thinks" it's on its own private computer. These addresses are called virtual addresses.

Two kinds of memory In your program's memory there are two regions of storage, thestack and the heap. The stack is faster, but of limited size. The heap has plentiful memory, is slower. This is whaere all objects are stored; it is the "data warehouse" for your program.

What do variables actually store? Variables store memory addresses, which are just integers. Variables live on the stack.

Assignment The = sign is assignment. It makes a variable point at an object.

Symbol Tables Contains all variables we create (along with Python's stuff) and their values. Think of it as a dictionary, becaue it actually is one.