Datasheet
17
Chapter 1: Computer Programming Exposed!
look inside a computer, as opposed to the hard disk which is slower and
permanent storage.) It requests the data it needs from memory, processes it,
and writes new data back to memory millions of times every second.
But if the data is all in memory, the CPU needs to be able to find a particular
instruction or piece of data. How does it do that?
The location in memory for each instruction and each piece of data is iden-
tified by an address, like the mailboxes in the post office or an apartment
house you see in Figure 1-4 (and notice that the first address for a mailbox in
your computer is always 0). But these are very small mailboxes that can hold
only one character of information at a time (not technically true, but good
enough) referred to as a byte. So for all practical purposes (although again
not technically true), you can think of the smallest division of memory as a
byte, with each byte being able to be addressed on its own. The good news
is that if you need more mailboxes, they are yours for the taking. So if you
get more than one letter a day, the number of mailboxes assigned to you will
increase to hold all the letters you need them to.
Figure 1-4:
Finding
things in
memory.
0 1 2 3
Address
4 5 6 7
What Is Objective-C, Anyway?
Objective-C is an object-oriented programming language, which means that it
was created to support a certain style of programming. Yes, I know it is hard
to believe, but even things like programming have different styles, in fact a lot
of them, although the two heavyweights are object oriented and procedural.
Unless you’re a dyed in the wool member of a particular camp, it is really
unnecessary to get into that discussion here (or probably ever). But you will,
I promise, intimately understand what object-oriented programming is by
the time you’re done with this book, and you’ll probably wonder why anyone
would ever want to program in any other way.
05_522752-ch01.indd 1705_522752-ch01.indd 17 8/27/09 9:45:03 PM8/27/09 9:45:03 PM