 Hello and welcome. This lecture is about a simple computer's architecture. Here is a quick recap of some relevant topics that we have already discussed earlier. We have discussed the Dumbo model of computing in which we have seen that there are named drawers for storing values and retrieving values from. There are some workbench registers which Dumbo uses for doing computation and Dumbo also uses cards to do input and output when we instruct Dumbo to do some input or output operation. In this lecture, we are actually going to see a little bit in detail what is it that we will actually be programming. Essentially from the Dumbo model of computer, we are going to move towards a real computer, which by the way is almost like a Dumbo. We will see a lot of similarities between what we have seen for Dumbo and what a real computer contains, but we would like to see what this real computer is, what are its different parts, what are its architecture, what do the different parts do and how is information represented inside a real computer. So, that is our agenda for this lecture. So, here is a very high level block diagram of a simple real computer. I am going to explain each of these color coded parts in more detail, but just to get going, here is something that I have labeled as main memory and in it I have put these labels location 0, location 1, location 2 and so on. Now, these are like Dumbo's drawers. Remember that Dumbo needs named drawers to store information and also to retrieve information. So, this main memory in a real computer is much like Dumbo's drawers. Then recall that Dumbo had a workbench in which Dumbo would keep values and then do some operations with them. Dumbo would fetch values from the named drawers to the workbench and then do some operations with them. So, in a real computer that part is what is called a central processing unit or a CPU. A CPU has several registers in the Dumbo model as well we had seen registers. We will study a little bit more about what registers really do. A CPU also has a arithmetic and logic unit where the real computation happens and it has a controller. Now, Dumbo also shipped information from one part to another. For example, from the named drawers to the workbench or from the named drawers to the input or output devices by means of some cards. Now, in a real computer the analog of these cards are what are called buses. So, here you can see I have written a bus and on this bus there are disks, input devices, output devices. Here are some other buses which is called an address bus and a data bus and these also transfer information between different parts of a real computer. So, having seen the similarity between the Dumbo model of computation and what a real computer looks like inside. Let us go a little bit more in detail into each of these parts. Here I have highlighted the main memory that we just mentioned. Now, this main memory is usually also called random access memory or RAM or it may simply be called memory. Basically, it contains a large number of addressable locations just like Dumbo's chest of drawers had a large number of named drawers. Each location in main memory stores exactly one value at a time. What is very important to remember is that even if you did not store a value at a location of memory, there is some garbage value already there. So, every location in memory at every point of time has a value. If you stored it then it contains the value that you stored. If your program stored it then it contains the value that the program stored. Otherwise, it contains some arbitrary garbage value. So, when you are accessing a location in a memory, you should be prepared to encounter garbage values if you have not already saved something or if your computation is not already saved something there. This is very important when you get to real programs. Now, writing to a memory location destroys the value that was originally there. However, reading from a location makes a copy. It does not destroy the value that was there. Note that these are exactly how Dumbo's drawers also operate. Let us now focus on another part of a computer which is the set of registers or the bank of registers. Now, registers are pretty much like main memory except that they are much faster. You can read and write from registers much faster than you can do from main memory. Of course, you pay a price for it. They are much more costlier. To design maybe 32 registers, you may have to use the same amount of resources as to design maybe a thousand locations in memory. So, that is why registers are much costlier. Because they are costlier, they are usually present in smaller numbers which means you have fewer registers than you have locations in main memory. Now, for most of the programs that we are going to study in this course, we will not directly see these registers. Although, of course, these registers are going to work behind the scenes. The real computation happens in the central processing unit by taking values from registers and storing values back in registers. However, in our programs, we are not going to see too much of these registers. Nevertheless, it is important to remember that advanced programming can refer to registers directly. We will not cover this in this course. Now, here I have tried to highlight two other parts of the computer, the arithmetic and logic unit and the controller which are also parts of the central processing unit. The arithmetic logic unit is really the workhorse of the computer. All the arithmetic operations like addition, multiplication, division, subtraction and also all logical operations like logical anding, oring, xorring, complimenting, all of these happen here. The arithmetic logic unit usually takes operands from registers and stores the result back in registers. The controller, if you see the controller here has some arrows going to the registers and the arithmetic logic unit. So, the controller is responsible for sequencing various actions that are involved in executing instructions on the computer. We are not going to directly see this controller as we write programs to execute on a computer. Nevertheless, this controller plays a very central role in the functioning of a computer. In this picture, I have highlighted the disk and some input devices and output devices which are connected on the bus. Disks are basically longer term storage for files and files could contain your programs, could contain some data, it could contain some logs, some outputs and so on. Now, disks serve the purpose much like main memory. They are used for storing information and retrieving information. However, they are much, much slower than main memory. They also have much larger capacity, many more locations than main memory and they are also significantly cheaper than main memory. So, as you can see in this picture, there is main memory and then there is this register file which is faster, smaller and costlier and then there is this disk which is slower, larger and cheaper than main memory. Now, we are going to look at disks much more later on when we study about files. Input output devices also called IO devices, these basically allow a computer to interact with the world outside. For our purposes, an input device is going to be a keyboard and output device is going to be a console, although computers can interact with a lot of other kinds of IO devices. Finally, I want to highlight the buses. Here there is a address bus, data bus and this is a bus on which the disk and input output devices are connected. The buses are really the highways for transferring information between different parts of a computer. In the Dumbo model, Dumbo would transfer information using carts in a real computer buses serve that purpose. We can have different kinds of buses like address buses in which addresses for specifying locations of memory are sent, data buses through which data may be shipped between a memory and central processing unit, IO buses through which data information could be transferred between IO devices and the computer. External device buses for example, all of you are familiar with USB, which is basically a bus, the universal serial bus. For our purposes, as we write programs, we are not explicitly going to see buses, they are going to be working behind the scenes, nevertheless they are an important part of the computer. Now, how is information represented in a computer? All information in a computer is represented as sequences of 0s and 1s. So, if you were to take a snapshot of the computer that we just saw, it would probably look something like this that there is main memory and there are sequences of 0s and 1s stored in various locations on the address bus and on the data bus, there are sequences of 0s and 1s and everywhere it is basically sequences of 0s and 1s. Now, why is it that computers talk only in the language of 0s and 1s? Because electronic circuits in the computer can efficiently store and process electrical signals in one of two states. For our purposes, we call them 0 and 1 and therefore, all information in a computer is basically going to be represented as 0 and 1. So, this is also called a binary representation and these two binary digits are also called bits. Information is usually accessed in a computer not in terms of individual bits, but in chunks of 8 bits which is also called a byte. So, for example, when we access memory IO device register or when we send an address, we usually send chunks of 8 bits and it is very important to understand how numbers, characters, strings, the different kinds of things that a computer is going to process that we will write programs to manipulate are represented using bits and bytes, but this will be the topic of another lecture. So, in summary what we saw in this lecture is the architecture of a simple material computer. The main parts are a main memory registers and arithmetic logic unit, input output devices, disk, bus and of course, there is also a controller which along with the arithmetic logic unit constitutes the central processing unit. We have also seen that information is represented in a computer using 0s and 1s which are called bits and we access bits in chunks of 8 bits at a time which are also called bytes. Thank you.