[MUSIC]. Let's take a look at our road map. We're at our first section that will address the issues of data and addressing. Namely, how do we store information in memory, how do we represent it in terms of 0's and 1's. And how do we reference that data, in other words, what addresses do we provide so we can find the data we've put in memory again. So to before we get into that. And the other topics in this section. We're going to start with a few preliminaries about how we organize our hardware. Lets take a look at this first picture that is a logical view of a modern computing system. You'll notice that very prominently are the CPU, the Central Processing Unit, and the memory. There's a hide bandwidth channel between the memory and the CPU because the CPU has to go to that memory to get all the data and instructions it will need in order to know what to do and to what pieces data. So that is going to be a very big focus of this course that connection is actually going to be a little bit more complex than shown in this diagram. There's going to be various levels of memory that we'll be looking at. in addition, the CPU and memory are connected to a common bus that allows data to flow between all the elements of a computer. Some of the other elements are disks, which provide even more memory for us to use. But are slower and little bit further away from the CPU will also have a connection to the network. So that we can get data over the internet we'll also have connections to peripheral devices like mice and keyboards and cameras and those are often over a USB interfaces. universal serial bus as well as others that might be available depending on the computing, computing system you have. Let's go a little deeper and look at a semi logical view. In this case we're breaking things down a little bit, not only into a main CPU shown here at the top. you'll notice that it's connected to a bunch of memory on one side and maybe some specialized memory and processing for graphics functions on the other. below it is another large chip that's often common in most computers. And that's a IO controller, something that really orchestrates that common buss that connects to all the other devices. Some of those other devices might be the audio system the hard disc drives the USB interfaces and so on. That are, make up the rest of the computer. If we go yet a level deeper and go to the physical view of the device. here we'll see a, a, a motherboard. A board that includes all those major components of a computer. Here in the center is the the CPU chip. it's surrounded by an IO chip, that controls those peripherals connections for adding memory to the system. And connections for hard disk drives to be connected to that common bus. In addition, at the back of the machine, we'll typically see a whole bunch of connections to those peripheral devices. Including audio components, mice, keyboards and networks. If we focus then on the part that will be most concerned with, namely the CPU and memory that we say at the top of our first figure. We go a little deeper in and we'll see that the CPU is composed of some things that hold data, we're going to call these registers. And some things that hold instructions and that will typically be called an instruction cache. the thing that we need to understand at a very high level for now we'll get into a lot more detail on this later but for now we need to understand that data. Namely, the things we operate on are moved from memory to the registers. That's where the CPU can actually have operations on that data. And then, the results from those registers are moved back to memory. This is done on the program control. In other words, we'll have specific instructions to go get memory at a particular location in the memory and bring it into a particular register. And similarly going in the other direction from a specific register to a specific location in memory. We'll also be getting instructions from memory into our instruction cache where the CPU will find. The instructions to execute. this is done under hardware control. In other words, the CPU has it's own devices for getting that ins- next instruction. And figure out whether it needs to go to the memory to find it, or if it already has it in it's cache. why might it already have it in its cache? Well if it's executing a loop for example or a common procedure that had just recently executed, it might already be in the cache. But that's done on the hardware control, we don't worry about where to get the next instruction. What we worry about in our programs is where to get the data, and where to put the date once we've operated on it. We also want to talk about the performance of our computing systems and performance is not just about CPU speed mainly the clock rate the, the speed at which we connect to get one instruction after another. Its also about getting those instructions and the data they have to operate on from memory to the CPU. That CPU memory bandwidth can limit performance. And we have two common strategies for trying to improve that performance. The first tries to make the memory wider. Namely we get more bits at once from the memory. So, rather than getting. one instruction at a time, we might get several instructions at a time, or not one piece of data but several. Another, possibility is to move some of the memory into the CPU itself, and actually have a smaller, but much faster memory available to the CPU. This works particularly well when The data and instructions are located near each other. Or are a very small set of the all the possible locations in memory. So, this memory in the CPU will be much smaller than the larger main memory. We call this a cache, namely some place where we store our valuables. nearby so that we can get to it easy. Now that we've talked about how our computers are organized. we also have to talk about how we represent those zeros and ones that we're going to be building all of our data and instructions from. You'll notice that that bottom in this slide, there's a figure that shows that, in fact, the 0 is represented by a low voltage. A 1 represented by a high voltage. And those can fluctuate a little bit. And it also takes a little bit of time to go from a 0 to a 1 when we have some voltages that are intermediate. We really don't want to be in this region because that can be confusing. And that is in fact what limits the speed of our computing systems, how quickly we can make these transitions between 0 and 1 and 1 to 0. So electronics are designed to make it easy to represent a value at this voltage and a value at a low voltage and not worry about the values in between. Rather, we restore our values as often as we can to these nicer voltages at the top and bottom. How do we represent numbers? Well here's a number in base 10 the number 351, that's the number of this course here at UW. And this is in base 10 we're very familiar with this number representation, we've seen it since elementary school. the binary representation, of 351, is this number. Now, how did I decide on how many 0's and 1's to use? Well, that was kind of arbitrary. In this, I could have also represented it by the much shorter string of 1's and 0's that doesn't have that leading set of 0's. That would be the same thing as writing 351 base 10 or 0's, 0, 0, 351 base 10. You'll notice that we can always put leading 0's in front of something that doesn't change the actual value. So we'll have to decide how many bits we want to use to represent numbers. And that's where we'll be going next.