Sign up for your FREE 7-day trial.Get instant access to all the benefits of SparkNotes PLUS! Cancel within the first 7 days and you won't be charged. We'll even send you a reminder.
SparkNotes Plus subscription is $4.99/month or $24.99/year as selected above. The free trial period is the first 7 days of your subscription. TO CANCEL YOUR SUBSCRIPTION AND AVOID BEING CHARGED, YOU MUST CANCEL BEFORE THE END OF THE FREE TRIAL PERIOD. You may cancel your subscription on your Subscription and Billing page or contact Customer Support at custserv@bn.com. Your subscription will continue automatically once the free trial period is over. Free trial is available to new customers only.
Step 2 of 4
Choose Your Plan
Step 3 of 4
Add Your Payment Details
Step 4 of 4
Payment Summary
Your Free Trial Starts Now!
For the next 7 days, you'll have access to awesome PLUS stuff like AP English test prep, No Fear Shakespeare translations and audio, a note-taking tool, personalized dashboard, & much more!
Thanks for creating a SparkNotes account! Continue to start your free trial.
Please wait while we process your payment
Your PLUS subscription has expired
We’d love to have you back! Renew your subscription to regain access to all of our exclusive, ad-free study tools.
Did you know you can highlight text to take a note?x
Figure %: Storing the value 220 into steve
This seems straightforward, and it is. But behind the scenes,
there is more going on. As coders, we are able to access the
variable steve just by using its name. But how does the
computer know where into memory to put the value we store into
steve? The answer is that every variable stored in memory
has an address associated with it, and the computer keeps track
of these addresses. When you tell it to store a value into the
variable steve, the computer finds the address at which
steve is located, and puts the value into the memory at
that location.
Memory Addresses
What does the concept of "addresses" really mean in terms of a
computer? What it means is that every piece of the computer's
memory is numbered so it can be found easily. A better
pictorial representation for memory, as opposed to the blob
above is a straight segment of memory, as follows:
Figure %: A pictorial representation of memory
In this figure, each box represents one byte of memory. What
are the numbers below each box? Those are addresses. Each
number corresponds to one byte; in other words, we can find
and access any byte in memory just by knowing its address
(remember that a byte is 8 bits. A bit is the smallest unit of
storage in a computer, storing either a 0 or a 1).
Let's return to the example from above, and let's say that
steve was stored at address 728 in memory and the value 220
was stored into steve:
Figure %: Storing 220 into memory address 728
This figure raises a few questions.
First, why does steve cover bytes 728, 729, 730, and 731? I
thought we were just storing it into 728? Not exactly.